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

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: Fix comment 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
« no previous file with comments | « LayoutTests/virtual/slimmingpaint/svg/repaint/paintorder-filtered-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0e06038b557384fc3644c6dd38f1c5969209b991 100644
--- a/Source/core/layout/svg/LayoutSVGResourceFilter.cpp
+++ b/Source/core/layout/svg/LayoutSVGResourceFilter.cpp
@@ -79,6 +79,10 @@ 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,9 +91,14 @@ void LayoutSVGResourceFilter::removeClientFromCache(LayoutObject* client, bool m
{
ASSERT(client);
- m_filter.remove(client);
+ InvalidationMode invalidation = markForInvalidation ? BoundariesInvalidation : ParentOnlyInvalidation;
- markClientForInvalidation(client, markForInvalidation ? BoundariesInvalidation : ParentOnlyInvalidation);
+ // If the filter has a cached subtree, invalidate the associated display item.
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled() && markForInvalidation && m_filter.contains(client))
+ invalidation = PaintInvalidation;
fs 2015/05/20 09:29:38 So this means that boundaries are not marked as di
pdr. 2015/05/20 21:09:27 Good catch (not sure why there weren't test failur
+
+ m_filter.remove(client);
+ markClientForInvalidation(client, invalidation);
}
PassRefPtrWillBeRawPtr<SVGFilterBuilder> LayoutSVGResourceFilter::buildPrimitives(SVGFilter* filter)
« no previous file with comments | « LayoutTests/virtual/slimmingpaint/svg/repaint/paintorder-filtered-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698