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

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

Issue 2082153002: Paint solid color and local attachment backgrounds into scrolling layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert some changes 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..1381adeaca4a440db59eec7fb43b70a3bd353e28 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -35,6 +35,8 @@
namespace blink {
+namespace {
+
static inline bool shouldSuppressPaintingLayer(const PaintLayer& layer)
{
// Avoid painting descendants of the root layer when stylesheets haven't loaded. This avoids some FOUC.
@@ -47,6 +49,8 @@ static inline bool shouldSuppressPaintingLayer(const PaintLayer& layer)
return false;
}
+} // namespace
+
void PaintLayerPainter::paint(GraphicsContext& context, const LayoutRect& damageRect, const GlobalPaintFlags globalPaintFlags, PaintLayerFlags paintFlags)
{
PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRect(damageRect)), globalPaintFlags, LayoutSize());
@@ -381,7 +385,10 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
scopedPaintChunkProperties.emplace(context.getPaintController(), m_paintLayer, properties);
}
- bool shouldPaintBackground = isPaintingCompositedBackground && shouldPaintContent && !selectionOnly;
+ bool paintBackgroundOnForeground = isPaintingScrollingContent && m_paintLayer.shouldPaintBackgroundOntoForeground();
+ bool shouldPaintBackground = shouldPaintContent && !selectionOnly
+ && ((paintBackgroundOnForeground && isPaintingCompositedForeground)
+ || isPaintingCompositedBackground);
bool shouldPaintNegZOrderList = (isPaintingScrollingContent && isPaintingOverflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackground);
bool shouldPaintOwnContents = isPaintingCompositedForeground && shouldPaintContent;
bool shouldPaintNormalFlowAndPosZOrderLists = isPaintingCompositedForeground;
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698