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

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

Issue 2000763003: Check subtree paint invalidation when overflow clip status changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index b8823828a5cfdcaad8b691188080c8771f07d703..4ce682b8f536910b800f8f3020ec3c35ed57639b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1314,9 +1314,9 @@ void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *this);
PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidationState);
- clearPaintInvalidationFlags(newPaintInvalidationState);
newPaintInvalidationState.updateForChildren(reason);
+ clearPaintInvalidationFlags(newPaintInvalidationState);
invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
}
@@ -3454,6 +3454,14 @@ void LayoutObject::setMayNeedPaintInvalidation()
frameView()->scheduleVisualUpdateForPaintInvalidationIfNeeded();
}
+void LayoutObject::setMayNeedPaintInvalidationSubtree()
+{
+ if (mayNeedPaintInvalidationSubtree())
+ return;
+ m_bitfields.setMayNeedPaintInvalidationSubtree(true);
+ setMayNeedPaintInvalidation();
+}
+
void LayoutObject::clearPaintInvalidationFlags(const PaintInvalidationState& paintInvalidationState)
{
// paintInvalidationStateIsDirty should be kept in sync with the
@@ -3464,6 +3472,7 @@ void LayoutObject::clearPaintInvalidationFlags(const PaintInvalidationState& pai
m_bitfields.setNeededLayoutBecauseOfChildren(false);
m_bitfields.setShouldInvalidateOverflowForPaint(false);
m_bitfields.setMayNeedPaintInvalidation(false);
+ m_bitfields.setMayNeedPaintInvalidationSubtree(false);
m_bitfields.setShouldInvalidateSelection(false);
}

Powered by Google App Engine
This is Rietveld 408576698