Index: Source/core/layout/svg/ReferenceFilterBuilder.cpp |
diff --git a/Source/core/layout/svg/ReferenceFilterBuilder.cpp b/Source/core/layout/svg/ReferenceFilterBuilder.cpp |
index 26a3e338e862eefba52876eb11e3489bf4e2849c..0c08e165b199e035e690f5b660fdb94097baa063 100644 |
--- a/Source/core/layout/svg/ReferenceFilterBuilder.cpp |
+++ b/Source/core/layout/svg/ReferenceFilterBuilder.cpp |
@@ -124,7 +124,9 @@ PassRefPtrWillBeRawPtr<Filter> ReferenceFilterBuilder::build(float zoom, Element |
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)); |
+ bool primitiveBoundingBoxMode = filterElement.primitiveUnits()->currentValue()->enumValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX; |
+ Filter::UnitScaling unitScaling = primitiveBoundingBoxMode ? Filter::BoundingBox : Filter::UserSpace; |
+ RefPtrWillBeRawPtr<Filter> result(Filter::create(referenceBox, filterRegion, zoom, unitScaling)); |
if (!previousEffect) |
previousEffect = result->sourceGraphic(); |
RefPtrWillBeRawPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(previousEffect); |