| Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| index 8c653ecaa707c59f8611cfb8455116e5da659abf..7b06b1fe2fb22f69ca27b678edd89704d9450424 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| @@ -2452,6 +2452,18 @@ bool PaintLayer::shouldBeSelfPaintingLayer() const
|
| || needsCompositedScrolling();
|
| }
|
|
|
| +bool PaintLayer::shouldPaintBackgroundOntoForeground() const
|
| +{
|
| + // TODO(flackr): Add support for painting locally attached background images. https://crbug.com/625882
|
| + const FillLayer& backgroundLayer = layoutObject()->style()->backgroundLayers();
|
| + return scrollsOverflow()
|
| + && !backgroundLayer.image()
|
| + && !backgroundLayer.next()
|
| + && (backgroundLayer.attachment() == LocalBackgroundAttachment
|
| + || backgroundLayer.clip() == PaddingFillBox)
|
| + && !stackingNode()->hasNegativeZOrderList();
|
| +}
|
| +
|
| void PaintLayer::updateSelfPaintingLayer()
|
| {
|
| bool isSelfPaintingLayer = shouldBeSelfPaintingLayer();
|
|
|