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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp

Issue 2483953002: Separate forced subtree invalidation reasons for location change and SVG resource change (Closed)
Patch Set: rebaseline-cl Created 4 years, 1 month 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/paint/ObjectPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
index 75e22d6ab0d0ec9634b0505ee9ba8897198027a1..f9630d3fc0d8b758ddf05e3f662804a7238f168b 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
@@ -534,12 +534,20 @@ ObjectPaintInvalidatorWithContext::invalidatePaintIfNeededWithComputedReason(
// invalidated for paint offset mutation, but incurs no pixel difference
// (i.e. bounds stay the same) so no rect-based invalidation is issued.
// See crbug.com/508383 and crbug.com/515977. This is a workaround to
- // force display items to update paint offset.
- if (m_context.forcedSubtreeInvalidationFlags &
- PaintInvalidatorContext::ForcedSubtreeInvalidationChecking) {
+ // force display items to update paint offset. Exclude non-root SVG whose
+ // paint offset is always zero.
+ if ((!m_object.isSVG() || m_object.isSVGRoot()) &&
+ (m_context.forcedSubtreeInvalidationFlags &
+ PaintInvalidatorContext::ForcedSubtreeInvalidationChecking)) {
reason = PaintInvalidationLocationChange;
break;
}
+ if (m_object.isSVG() &&
+ (m_context.forcedSubtreeInvalidationFlags &
+ PaintInvalidatorContext::ForcedSubtreeSVGResourceChange)) {
+ reason = PaintInvalidationSVGResourceChange;
+ break;
+ }
return PaintInvalidationNone;
case PaintInvalidationDelayedFull:
return PaintInvalidationDelayedFull;

Powered by Google App Engine
This is Rietveld 408576698