| 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;
|
|
|