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

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

Issue 1804963005: Avoid paintInvalidationContainer parameter of invalidatePaintIfNeeded() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/LayoutSVGInline.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.cpp
index a7cf195093506e3114f46788b8f84b0abf3557d2..a566f87ed01c5b578777d9da5f6f364b6e65f0c4 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.cpp
@@ -148,23 +148,25 @@ void LayoutSVGInline::removeChild(LayoutObject* child)
textLayoutObject->subtreeChildWasRemoved(affectedAttributes);
}
-void LayoutSVGInline::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidationState)
+void LayoutSVGInline::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
{
ASSERT(!needsLayout());
if (!shouldCheckForPaintInvalidation(paintInvalidationState))
return;
- PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationState.paintInvalidationContainer());
- clearPaintInvalidationState(paintInvalidationState);
+ PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *this);
+ PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidationState);
+ clearPaintInvalidationFlags(newPaintInvalidationState);
if (reason == PaintInvalidationDelayedFull)
paintInvalidationState.pushDelayedPaintInvalidationTarget(*this);
- PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, paintInvalidationState.paintInvalidationContainer());
if (reason == PaintInvalidationSVGResourceChange)
- childTreeWalkState.setForceSubtreeInvalidationWithinContainer();
- invalidatePaintOfSubtreesIfNeeded(childTreeWalkState);
+ newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
+
+ newPaintInvalidationState.updatePaintOffsetAndClipForChildren();
+ invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698