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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp

Issue 2068723002: Paint local attachment backgrounds into composited scrolling contents layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve opaque layer detection and fix non-composited border painting bug in layout tests. Created 4 years, 5 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/paint/PaintLayerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
index 3b685597d828d7be414c0362dd314c82aad40ff1..5e5909494d65375de366f5f0a2a33474422d40f0 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -265,6 +265,7 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
bool isPaintingCompositedForeground = paintFlags & PaintLayerPaintingCompositingForegroundPhase;
bool isPaintingCompositedBackground = paintFlags & PaintLayerPaintingCompositingBackgroundPhase;
bool isPaintingOverflowContents = paintFlags & PaintLayerPaintingOverflowContents;
+ bool isPaintingBackgroundOntoForeground = paintFlags & PaintLayerPaintingBackgroundOntoForeground;
// Outline always needs to be painted even if we have no visible content. Also,
// the outline is painted in the background phase during composited scrolling.
// If it were painted in the foreground phase, it would move with the scrolled
@@ -381,7 +382,9 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
scopedPaintChunkProperties.emplace(context.getPaintController(), m_paintLayer, properties);
}
- bool shouldPaintBackground = isPaintingCompositedBackground && shouldPaintContent && !selectionOnly;
+ bool shouldPaintBackground = shouldPaintContent && !selectionOnly
+ && ((isPaintingBackgroundOntoForeground && isPaintingCompositedForeground)
+ || isPaintingCompositedBackground);
bool shouldPaintNegZOrderList = (isPaintingScrollingContent && isPaintingOverflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackground);
bool shouldPaintOwnContents = isPaintingCompositedForeground && shouldPaintContent;
bool shouldPaintNormalFlowAndPosZOrderLists = isPaintingCompositedForeground;

Powered by Google App Engine
This is Rietveld 408576698