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

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

Issue 1626623002: Skip PaintPhaseDescendantBlockBackgroundsOnly phase if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FloatPhase
Patch Set: Rebase Created 4 years, 11 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 95edc67271e83edcf387dda3d8a9a67b69e15f0a..a34de3db8bff36d8b84bfdcc08408b0c72a12add 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1471,6 +1471,12 @@ PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(PaintInvalidationStat
if (isFloating())
paintInvalidationState.enclosingSelfPaintingLayer(*this).setNeedsPaintPhaseFloat();
+ if (hasBoxDecorationBackground() || (hasOverflowClip() && scrollableArea()->hasOverflowControls())) {
+ PaintLayer& layer = paintInvalidationState.enclosingSelfPaintingLayer(*this);
+ if (layer.layoutObject() != this)
+ layer.setNeedsPaintPhaseDescendantBlockBackgrounds();
+ }
+
PaintInvalidationReason fullInvalidationReason = fullPaintInvalidationReason();
// If the current paint invalidation reason is PaintInvalidationDelayedFull, then this paint invalidation can delayed if the
// LayoutBox in question is not on-screen. The logic to decide whether this is appropriate exists at the site of the original

Powered by Google App Engine
This is Rietveld 408576698