| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| index 08b9b26253ca139f99e28bfae2334ab49d01b0c2..8c1d53300fb8cff086f9dc9ace6f960d16d68171 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -297,7 +297,12 @@ void CompositedLayerMapping::updateIsRootForIsolatedGroup()
|
|
|
| void CompositedLayerMapping::updateBackgroundPaintsOntoScrollingContentsLayer()
|
| {
|
| - bool shouldPaintOntoScrollingContentsLayer = shouldPaintBackgroundOntoScrollingContentsLayer();
|
| + // We can only paint the background onto the scrolling contents layer if
|
| + // it would be visually correct and we are using composited scrolling meaning we
|
| + // have a scrolling contents layer to paint it into.
|
| + bool shouldPaintOntoScrollingContentsLayer =
|
| + canPaintBackgroundOntoScrollingContentsLayer()
|
| + && m_owningLayer.getScrollableArea()->usesCompositedScrolling();
|
| if (shouldPaintOntoScrollingContentsLayer != backgroundPaintsOntoScrollingContentsLayer()) {
|
| m_backgroundPaintsOntoScrollingContentsLayer = shouldPaintOntoScrollingContentsLayer;
|
| // If the background is no longer painted onto the scrolling contents
|
| @@ -2587,7 +2592,7 @@ bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle
|
| return false;
|
| }
|
|
|
| -bool CompositedLayerMapping::shouldPaintBackgroundOntoScrollingContentsLayer() const
|
| +bool CompositedLayerMapping::canPaintBackgroundOntoScrollingContentsLayer() const
|
| {
|
| // TODO(flackr): Add support for painting locally attached background images. https://crbug.com/625882
|
| const FillLayer& backgroundLayer = m_owningLayer.layoutObject()->style()->backgroundLayers();
|
|
|