Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp |
index b219126ea4ef1f94f462b21560c6641f1eea4572..54c36f347df51d2c48b70be67b99f1ea546547d3 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp |
@@ -61,12 +61,17 @@ void LayoutSVGContainer::layout() |
bool transformChanged = SVGLayoutSupport::transformToRootChanged(this); |
+ // When hasRelativeLengths() is false, no descendants have relative lengths |
+ // (hence no one is interested in viewport size changes). |
+ bool layoutSizeChanged = element()->hasRelativeLengths() |
+ && SVGLayoutSupport::layoutSizeOfNearestViewportChanged(this); |
+ |
// If any of this container's children need to be laid out, and a filter is |
// applied to the container, we need to issue paint invalidations for all |
// the descendants. |
bool forceLayoutOfChildren = selfNeedsLayout() |
|| (normalChildNeedsLayout() && SVGLayoutSupport::hasFilterResource(*this)); |
- SVGLayoutSupport::layoutChildren(this, forceLayoutOfChildren, transformChanged); |
+ SVGLayoutSupport::layoutChildren(this, forceLayoutOfChildren, transformChanged, layoutSizeChanged); |
// Invalidate all resources of this client if our layout changed. |
if (everHadLayout() && needsLayout()) |