| Index: Source/core/css/resolver/FilterOperationResolver.cpp
|
| diff --git a/Source/core/css/resolver/FilterOperationResolver.cpp b/Source/core/css/resolver/FilterOperationResolver.cpp
|
| index 8079f9c41c72166637c782cb0bb86006c82f84a1..58fc56365e060df2eaebfe3e2dfd8d5074321399 100644
|
| --- a/Source/core/css/resolver/FilterOperationResolver.cpp
|
| +++ b/Source/core/css/resolver/FilterOperationResolver.cpp
|
| @@ -50,11 +50,6 @@
|
|
|
| namespace WebCore {
|
|
|
| -static Length convertToFloatLength(CSSPrimitiveValue* primitiveValue, const RenderStyle* style, const RenderStyle* rootStyle, double multiplier)
|
| -{
|
| - return primitiveValue ? primitiveValue->convertToLength<FixedConversion | PercentConversion>(style, rootStyle, multiplier) : Length(Undefined);
|
| -}
|
| -
|
| static FilterOperation::OperationType filterOperationForType(CSSFilterValue::FilterOperationType type)
|
| {
|
| switch (type) {
|
| @@ -129,7 +124,7 @@ static PassRefPtr<CustomFilterParameter> parseCustomFilterTransformParameter(con
|
| {
|
| RefPtr<CustomFilterTransformParameter> transformParameter = CustomFilterTransformParameter::create(name);
|
| TransformOperations operations;
|
| - TransformBuilder::createTransformOperations(values, state.style(), state.rootElementStyle(), operations);
|
| + TransformBuilder::createTransformOperations(values, state.cssToLengthConversionData(), operations);
|
| transformParameter->setOperations(operations);
|
| return transformParameter.release();
|
| }
|
| @@ -352,7 +347,7 @@ static PassRefPtr<CustomFilterOperation> createCustomFilterOperation(CSSFilterVa
|
| }
|
|
|
|
|
| -bool FilterOperationResolver::createFilterOperations(CSSValue* inValue, const RenderStyle* style, const RenderStyle* rootStyle, FilterOperations& outOperations, StyleResolverState& state)
|
| +bool FilterOperationResolver::createFilterOperations(CSSValue* inValue, const CSSToLengthConversionData& unadjustedConversionData, FilterOperations& outOperations, StyleResolverState& state)
|
| {
|
| ASSERT(outOperations.isEmpty());
|
|
|
| @@ -368,7 +363,8 @@ bool FilterOperationResolver::createFilterOperations(CSSValue* inValue, const Re
|
| if (!inValue->isValueList())
|
| return false;
|
|
|
| - float zoomFactor = (style ? style->effectiveZoom() : 1) * state.elementStyleResources().deviceScaleFactor();
|
| + float zoomFactor = unadjustedConversionData.zoom() * state.elementStyleResources().deviceScaleFactor();
|
| + const CSSToLengthConversionData& conversionData = unadjustedConversionData.copyWithAdjustedZoom(zoomFactor);
|
| FilterOperations operations;
|
| for (CSSValueListIterator i = inValue; i.hasMore(); i.advance()) {
|
| CSSValue* currValue = i.value();
|
| @@ -467,7 +463,7 @@ bool FilterOperationResolver::createFilterOperations(CSSValue* inValue, const Re
|
| case CSSFilterValue::BlurFilterOperation: {
|
| Length stdDeviation = Length(0, Fixed);
|
| if (filterValue->length() >= 1)
|
| - stdDeviation = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
|
| + stdDeviation = firstValue->convertToLength<FixedConversion | PercentConversion>(conversionData);
|
| if (stdDeviation.isUndefined())
|
| return false;
|
|
|
| @@ -483,8 +479,8 @@ bool FilterOperationResolver::createFilterOperations(CSSValue* inValue, const Re
|
| continue;
|
|
|
| CSSShadowValue* item = toCSSShadowValue(cssValue);
|
| - IntPoint location(item->x->computeLength<int>(style, rootStyle, zoomFactor), item->y->computeLength<int>(style, rootStyle, zoomFactor));
|
| - int blur = item->blur ? item->blur->computeLength<int>(style, rootStyle, zoomFactor) : 0;
|
| + IntPoint location(item->x->computeLength<int>(conversionData), item->y->computeLength<int>(conversionData));
|
| + int blur = item->blur ? item->blur->computeLength<int>(conversionData) : 0;
|
| Color shadowColor;
|
| if (item->color)
|
| shadowColor = state.document().textLinkColors().colorFromPrimitiveValue(item->color.get(), state.style()->visitedDependentColor(CSSPropertyColor));
|
|
|