Index: Source/core/layout/svg/ReferenceFilterBuilder.cpp |
diff --git a/Source/core/layout/svg/ReferenceFilterBuilder.cpp b/Source/core/layout/svg/ReferenceFilterBuilder.cpp |
index 5bf2b0ba372c7928fe04367ef7093eff76870370..26a3e338e862eefba52876eb11e3489bf4e2849c 100644 |
--- a/Source/core/layout/svg/ReferenceFilterBuilder.cpp |
+++ b/Source/core/layout/svg/ReferenceFilterBuilder.cpp |
@@ -26,7 +26,6 @@ |
*/ |
#include "config.h" |
- |
#include "core/layout/svg/ReferenceFilterBuilder.h" |
#include "core/css/CSSPrimitiveValue.h" |
@@ -40,7 +39,7 @@ |
#include "core/svg/SVGDocumentExtensions.h" |
#include "core/svg/SVGFilterPrimitiveStandardAttributes.h" |
#include "core/svg/graphics/filters/SVGFilterBuilder.h" |
-#include "platform/graphics/filters/ReferenceFilter.h" |
+#include "platform/graphics/filters/Filter.h" |
#include "platform/graphics/filters/SourceGraphic.h" |
namespace blink { |
@@ -90,7 +89,7 @@ static EColorInterpolation colorInterpolationForElement(SVGElement& element, ECo |
return parentColorInterpolation; |
} |
-PassRefPtrWillBeRawPtr<ReferenceFilter> ReferenceFilterBuilder::build(float zoom, Element* element, FilterEffect* previousEffect, const ReferenceFilterOperation& filterOperation) |
+PassRefPtrWillBeRawPtr<Filter> ReferenceFilterBuilder::build(float zoom, Element* element, FilterEffect* previousEffect, const ReferenceFilterOperation& filterOperation) |
{ |
TreeScope* treeScope = &element->treeScope(); |
@@ -120,12 +119,12 @@ PassRefPtrWillBeRawPtr<ReferenceFilter> ReferenceFilterBuilder::build(float zoom |
SVGFilterElement& filterElement = toSVGFilterElement(*filter); |
- FloatRect targetBoundingBox; |
+ FloatRect referenceBox; |
if (element->inDocument() && element->layoutObject() && element->layoutObject()->isBoxModelObject()) |
- targetBoundingBox = toLayoutBoxModelObject(element->layoutObject())->borderBoundingBox(); |
- targetBoundingBox.scale(1.0f / zoom); |
- FloatRect filterRegion = SVGLengthContext::resolveRectangle<SVGFilterElement>(&filterElement, filterElement.filterUnits()->currentValue()->enumValue(), targetBoundingBox); |
- RefPtrWillBeRawPtr<ReferenceFilter> result(ReferenceFilter::create(targetBoundingBox, filterRegion, zoom)); |
+ referenceBox = toLayoutBoxModelObject(element->layoutObject())->borderBoundingBox(); |
+ referenceBox.scale(1.0f / zoom); |
+ FloatRect filterRegion = SVGLengthContext::resolveRectangle<SVGFilterElement>(&filterElement, filterElement.filterUnits()->currentValue()->enumValue(), referenceBox); |
+ RefPtrWillBeRawPtr<Filter> result(Filter::create(referenceBox, filterRegion, zoom)); |
if (!previousEffect) |
previousEffect = result->sourceGraphic(); |
RefPtrWillBeRawPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(previousEffect); |
@@ -142,7 +141,7 @@ PassRefPtrWillBeRawPtr<ReferenceFilter> ReferenceFilterBuilder::build(float zoom |
continue; |
effectElement->setStandardAttributes(effect.get()); |
- effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement.primitiveUnits()->currentValue()->enumValue(), targetBoundingBox)); |
+ effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement.primitiveUnits()->currentValue()->enumValue(), referenceBox)); |
EColorInterpolation colorInterpolation = colorInterpolationForElement(*effectElement, filterColorInterpolation); |
effect->setOperatingColorSpace(colorInterpolation == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB); |
builder->add(AtomicString(effectElement->result()->currentValue()->value()), effect); |