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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 1813383002: Move all fast-path paint invalidation mapping into PaintInvalidationState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable fast-path/slow-path comparison because of saturated operations of LayoutUnit 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/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index af2bed6fa3b128e709ace02be291992f5c2867c9..e5294b73ddbcbf4e736ab70286b6ded5453db3f1 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -360,12 +360,12 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
{
ASSERT(!needsLayout());
- if (!shouldCheckForPaintInvalidation(paintInvalidationState))
+ PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *this);
+ if (!shouldCheckForPaintInvalidation(newPaintInvalidationState))
return;
LayoutRect previousPaintInvalidationRect = this->previousPaintInvalidationRect();
- PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *this);
// TODO(wangxianzhu): Enable this assert after we fix all paintInvalidationContainer mismatch issues. crbug.com/360286
// ASSERT(&newPaintInvalidationState.paintInvalidationContainer() == &containerForPaintInvalidation());
@@ -378,6 +378,8 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
if (reason == PaintInvalidationLocationChange)
newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
+ // TODO(wangxianzhu): Combine this function into LayoutObject::invalidateTreeIfNeeded() when removing the following workarounds.
+
// TODO(wangxianzhu): This is a workaround for crbug.com/533277. Will remove when we enable paint offset caching.
if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef()))
newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
@@ -390,7 +392,7 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
&& hasOverflowClip())
newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinContainer();
- newPaintInvalidationState.updatePaintOffsetAndClipForChildren();
+ newPaintInvalidationState.updateForChildren();
invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698