Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1393)

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp

Issue 1904683002: Move the m_didTransformToRootUpdate flag to LayoutSVGContainer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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())

Powered by Google App Engine
This is Rietveld 408576698