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 85d5adb50a3451f9d4546e735c167ea5e198f74d..b53b91aba26d2a76dad73ceb8d491fd865e5b25a 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp |
@@ -36,6 +36,7 @@ LayoutSVGContainer::LayoutSVGContainer(SVGElement* node) |
: LayoutSVGModelObject(node) |
, m_objectBoundingBoxValid(false) |
, m_needsBoundariesUpdate(true) |
+ , m_didTransformToRootUpdate(false) |
, m_hasNonIsolatedBlendingDescendants(false) |
, m_hasNonIsolatedBlendingDescendantsDirty(false) |
{ |
@@ -55,12 +56,11 @@ void LayoutSVGContainer::layout() |
// Allow LayoutSVGTransformableContainer to update its transform. |
bool updatedTransform = calculateLocalTransform(); |
+ m_didTransformToRootUpdate = updatedTransform || SVGLayoutSupport::transformToRootChanged(parent()); |
// LayoutSVGViewportContainer needs to set the 'layout size changed' flag. |
determineIfLayoutSizeChanged(); |
- 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() |
@@ -71,7 +71,7 @@ void LayoutSVGContainer::layout() |
// the descendants. |
bool forceLayoutOfChildren = selfNeedsLayout() |
|| (normalChildNeedsLayout() && SVGLayoutSupport::hasFilterResource(*this)); |
- SVGLayoutSupport::layoutChildren(firstChild(), forceLayoutOfChildren, transformChanged, layoutSizeChanged); |
+ SVGLayoutSupport::layoutChildren(firstChild(), forceLayoutOfChildren, m_didTransformToRootUpdate, layoutSizeChanged); |
// Invalidate all resources of this client if our layout changed. |
if (everHadLayout() && needsLayout()) |