Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
index 7a74cd77b9b53809b7c27d04914bf85e81cbe8c4..dc3f54006a73233e6d35ac059c0c64431ada37fa 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
@@ -264,22 +264,20 @@ bool LayoutSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundin |
return false; |
} |
-FloatRect LayoutSVGResourceClipper::resourceBoundingBox(const LayoutObject* object) |
+FloatRect LayoutSVGResourceClipper::resourceBoundingBox(const FloatRect& referenceBox) |
{ |
- // Resource was not layouted yet. Give back the boundingBox of the object. |
+ // The resource has not been layouted yet. Return the reference box. |
if (selfNeedsLayout()) |
- return object->objectBoundingBox(); |
+ return referenceBox; |
if (m_localClipBounds.isEmpty()) |
calculateLocalClipBounds(); |
AffineTransform transform = toSVGClipPathElement(element())->calculateAnimatedLocalTransform(); |
if (clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox) { |
- FloatRect objectBoundingBox = object->objectBoundingBox(); |
- transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
- transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height()); |
+ transform.translate(referenceBox.x(), referenceBox.y()); |
+ transform.scaleNonUniform(referenceBox.width(), referenceBox.height()); |
} |
- |
return transform.mapRect(m_localClipBounds); |
} |