Bug 1289049 Part 1 - Use shape source instead of clip path in naming. r=boris

This function can be used to implement animation for <basic-shape> for
shape-outside, so I remove the clip path in naming to make it more general.

MozReview-Commit-ID: LwVe0Dk5Web

--HG--
extra : rebase_source : eb0136c79b494222cca38ebd68d62f3f825bd29e
This commit is contained in:
Ting-Yu Lin 2017-09-19 16:59:38 +08:00
Родитель 02c39abdd3
Коммит 28602b96b1
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -4152,13 +4152,13 @@ ExtractImageLayerSizePairList(const nsStyleImageLayers& aLayer,
}
static bool
StyleClipBasicShapeToCSSArray(const StyleShapeSource& aClipPath,
nsCSSValue::Array* aResult)
StyleShapeSourceToCSSArray(const StyleShapeSource& aShapeSource,
nsCSSValue::Array* aResult)
{
MOZ_ASSERT(aResult->Count() == 2,
"Expected array to be presized for a function and the sizing-box");
const StyleBasicShape* shape = aClipPath.GetBasicShape();
const StyleBasicShape* shape = aShapeSource.GetBasicShape();
nsCSSKeyword functionName = shape->GetShapeTypeName();
RefPtr<nsCSSValue::Array> functionArray;
switch (shape->GetShapeType()) {
@ -4236,7 +4236,7 @@ StyleClipBasicShapeToCSSArray(const StyleShapeSource& aClipPath,
MOZ_ASSERT_UNREACHABLE("Unknown shape type");
return false;
}
aResult->Item(1).SetEnumValue(aClipPath.GetReferenceBox());
aResult->Item(1).SetEnumValue(aShapeSource.GetReferenceBox());
return true;
}
@ -4560,7 +4560,7 @@ StyleAnimationValue::ExtractComputedValue(nsCSSPropertyID aProperty,
aComputedValue.SetEnumValue(clipPath.GetReferenceBox());
} else if (type == StyleShapeSourceType::Shape) {
RefPtr<nsCSSValue::Array> result = nsCSSValue::Array::Create(2);
if (!StyleClipBasicShapeToCSSArray(clipPath, result)) {
if (!StyleShapeSourceToCSSArray(clipPath, result)) {
return false;
}
aComputedValue.SetCSSValueArrayValue(result, eUnit_Shape);