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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGText.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/LayoutSVGText.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp
index e38213371248aeb190ceca6a1f18ace6a0ba39c5..d11e198b3f96d032205c829a741e0b5f02a1c96c 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp
@@ -502,24 +502,26 @@ void LayoutSVGText::removeChild(LayoutObject* child)
subtreeChildWasRemoved(affectedAttributes);
}
-void LayoutSVGText::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidationState)
+void LayoutSVGText::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);
- ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState);
- PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, paintInvalidationState.paintInvalidationContainer());
+ ForceHorriblySlowRectMapping slowRectMapping(&newPaintInvalidationState);
if (reason == PaintInvalidationSVGResourceChange)
- childTreeWalkState.setForceSubtreeInvalidationWithinContainer();
- invalidatePaintOfSubtreesIfNeeded(childTreeWalkState);
+ newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
+
+ newPaintInvalidationState.updatePaintOffsetAndClipForChildren();
+ invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698