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

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

Issue 1368163002: Workaround rect-based paint invalidation on ancestor clip change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 80565df0ef762904c649c481e51d244adfde82f2..6837719b49239e9c671e9745dbda93040da38011 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1356,6 +1356,11 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
if (!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled())
setPreviousPositionFromPaintInvalidationBacking(newLocation);
+ if (!shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() && !paintInvalidationState.forcedSubtreeInvalidationWithinContainer()) {
+ ASSERT(paintInvalidationState.forcedSubtreeInvalidationRectUpdateWithinContainer());
+ return PaintInvalidationNone;
+ }
+
PaintInvalidationReason invalidationReason = paintInvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds, newLocation);
// We need to invalidate the selection before checking for whether we are doing a full invalidation.
@@ -3192,7 +3197,7 @@ void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& pai
{
// paintInvalidationStateIsDirty should be kept in sync with the
// booleans that are cleared below.
- ASSERT(paintInvalidationState.forcedSubtreeInvalidationWithinContainer() || paintInvalidationStateIsDirty());
+ ASSERT(paintInvalidationState.forcedSubtreeInvalidationWithinContainer() || paintInvalidationState.forcedSubtreeInvalidationRectUpdateWithinContainer() || paintInvalidationStateIsDirty());
clearShouldDoFullPaintInvalidation();
m_bitfields.setChildShouldCheckForPaintInvalidation(false);
m_bitfields.setNeededLayoutBecauseOfChildren(false);

Powered by Google App Engine
This is Rietveld 408576698