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

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

Issue 1815293002: Revert of Skip PaintLayer empty paint phases if it previously painted nothing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4b6ebecf3a13c1be0c1fe4ffbd6fab323fd2ae96..9fac7fe176afe39f0a85542658b07ef19e97b4c7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1480,15 +1480,15 @@ bool LayoutBox::intersectsVisibleViewport()
PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState)
{
- PaintLayer& enclosingSelfPaintingLayer = paintInvalidationState.enclosingSelfPaintingLayer(*this);
- if (enclosingSelfPaintingLayer.layoutObject() != this) {
- if (isFloating())
- enclosingSelfPaintingLayer.setNeedsPaintPhaseFloat();
-
- if (hasBoxDecorationBackground()
- // We also paint overflow controls in background phase.
- || (hasOverflowClip() && getScrollableArea()->hasOverflowControls()))
- enclosingSelfPaintingLayer.setNeedsPaintPhaseDescendantBlockBackgrounds();
+ if (isFloating())
+ paintInvalidationState.enclosingSelfPaintingLayer(*this).setNeedsPaintPhaseFloat();
+
+ if (hasBoxDecorationBackground()
+ // We also paint overflow controls in background phase.
+ || (hasOverflowClip() && getScrollableArea()->hasOverflowControls())) {
+ PaintLayer& layer = paintInvalidationState.enclosingSelfPaintingLayer(*this);
+ if (layer.layoutObject() != this)
+ layer.setNeedsPaintPhaseDescendantBlockBackgrounds();
}
PaintInvalidationReason fullInvalidationReason = fullPaintInvalidationReason();
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698