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

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

Issue 1899243002: Get rid of SVGLayoutSupport::filtersForceContainerLayout (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 4b7e9e3d17b40123e710ae12cc81dbb665fed80f..429201380a5260dfde59a07b0da240f416304e4e 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp
@@ -59,7 +59,12 @@ void LayoutSVGContainer::layout()
// LayoutSVGViewportContainer needs to set the 'layout size changed' flag.
determineIfLayoutSizeChanged();
- SVGLayoutSupport::layoutChildren(this, selfNeedsLayout() || SVGLayoutSupport::filtersForceContainerLayout(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);
// Invalidate all resources of this client if our layout changed.
if (everHadLayout() && needsLayout())
@@ -98,8 +103,7 @@ void LayoutSVGContainer::removeChild(LayoutObject* child)
bool LayoutSVGContainer::selfWillPaint() const
{
- SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject(this);
- return resources && resources->filter();
+ return SVGLayoutSupport::hasFilterResource(*this);
}
void LayoutSVGContainer::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)

Powered by Google App Engine
This is Rietveld 408576698