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

Unified Diff: Source/core/layout/svg/LayoutSVGResourceFilter.cpp

Issue 1148763002: Invalidate SVG filter display items on subtree modification (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Upload correct patch this time Created 5 years, 7 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: Source/core/layout/svg/LayoutSVGResourceFilter.cpp
diff --git a/Source/core/layout/svg/LayoutSVGResourceFilter.cpp b/Source/core/layout/svg/LayoutSVGResourceFilter.cpp
index db677188d670e44d066b1a2f60492b42b1820ce7..29accc7b7d518a301dcbcf60527456eec28ef612 100644
--- a/Source/core/layout/svg/LayoutSVGResourceFilter.cpp
+++ b/Source/core/layout/svg/LayoutSVGResourceFilter.cpp
@@ -79,6 +79,9 @@ bool LayoutSVGResourceFilter::isChildAllowed(LayoutObject* child, const Computed
void LayoutSVGResourceFilter::removeAllClientsFromCache(bool markForInvalidation)
{
+ // LayoutSVGResourceFilter::removeClientFromCache will be called for
+ // all clients through markAllClientsForInvalidation so no explicit
+ // display item invalidation is needed here.
disposeFilterMap();
markAllClientsForInvalidation(markForInvalidation ? LayoutAndBoundariesInvalidation : ParentOnlyInvalidation);
}
@@ -87,7 +90,13 @@ void LayoutSVGResourceFilter::removeClientFromCache(LayoutObject* client, bool m
{
ASSERT(client);
- m_filter.remove(client);
+ bool filterCached = m_filter.contains(client);
+ if (filterCached)
+ m_filter.remove(client);
+
+ // If the filter has a cached subtree, invalidate the associated display item.
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled() && markForInvalidation && filterCached)
+ markClientForInvalidation(client, PaintInvalidation);
markClientForInvalidation(client, markForInvalidation ? BoundariesInvalidation : ParentOnlyInvalidation);
}

Powered by Google App Engine
This is Rietveld 408576698