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

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

Issue 1907273002: Remove unnecessary full-subtree layouts for filtered SVG containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
index 46120ba9c233fcbb7d362f28ed58fa4203a66649..8fd06fc0db188a8df60eb16fcf57986fcdc03415 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
@@ -139,8 +139,6 @@ void LayoutSVGRoot::layout()
ASSERT(needsLayout());
LayoutAnalyzer::Scope analyzer(*this);
- bool needsLayout = selfNeedsLayout();
-
LayoutSize oldSize = size();
updateLogicalWidth();
updateLogicalHeight();
@@ -150,15 +148,12 @@ void LayoutSVGRoot::layout()
SVGSVGElement* svg = toSVGSVGElement(node());
ASSERT(svg);
- m_isLayoutSizeChanged = needsLayout || (svg->hasRelativeLengths() && oldSize != size());
+ m_isLayoutSizeChanged = selfNeedsLayout() || (svg->hasRelativeLengths() && oldSize != size());
// When hasRelativeLengths() is false, no descendants have relative lengths
// (hence no one is interested in viewport size changes).
bool layoutSizeChanged = m_isLayoutSizeChanged && svg->hasRelativeLengths();
- // If any of this root's children need to be laid out, and a filter is
- // applied to it, we need to issue paint invalidations for all descendants.
- bool forceLayoutOfChildren = needsLayout
- || (normalChildNeedsLayout() && SVGLayoutSupport::hasFilterResource(*this));
+ bool forceLayoutOfChildren = selfNeedsLayout();
const bool scalingFactorChanged = false;
SVGLayoutSupport::layoutChildren(firstChild(), forceLayoutOfChildren, scalingFactorChanged, layoutSizeChanged);
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698