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 6248097b19031e13208183b785a026fa7d0538de..636f39bbe0c0edb1de49deeb8de31c330f81e271 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
@@ -311,7 +311,7 @@ void CompositedLayerMapping::updateContentsOpaque() |
} else { |
// For non-root layers, background is painted by the scrolling contents layer if all backgrounds |
// are background attachment local, otherwise background is painted by the primary graphics layer. |
- if (hasScrollingLayer() && shouldPaintBackgroundOntoScrollingContentsLayer()) { |
+ if (hasScrollingLayer() && m_owningLayer.shouldPaintBackgroundOntoScrollingContentsLayer()) { |
// Backgrounds painted onto the foreground are clipped by the padding box rect. |
// TODO(flackr): This should actually check the entire overflow rect within the |
// scrolling contents layer but since we currently only trigger this for solid |
@@ -2458,7 +2458,7 @@ void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G |
|| graphicsLayer == m_childClippingMaskLayer.get() |
|| graphicsLayer == m_scrollingContentsLayer.get()) { |
- bool paintRootBackgroundOntoScrollingContentsLayer = shouldPaintBackgroundOntoScrollingContentsLayer(); |
+ bool paintRootBackgroundOntoScrollingContentsLayer = m_owningLayer.shouldPaintBackgroundOntoScrollingContentsLayer(); |
DCHECK(!paintRootBackgroundOntoScrollingContentsLayer || (!m_backgroundLayer && !m_foregroundLayer)); |
if (paintRootBackgroundOntoScrollingContentsLayer) { |
if (graphicsLayer == m_scrollingContentsLayer.get()) |
@@ -2565,19 +2565,6 @@ bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle |
return false; |
} |
-bool CompositedLayerMapping::shouldPaintBackgroundOntoScrollingContentsLayer() const |
-{ |
- // TODO(flackr): Add support for painting locally attached background images. https://crbug.com/625882 |
- const FillLayer& backgroundLayer = m_owningLayer.layoutObject()->style()->backgroundLayers(); |
- return !m_owningLayer.isRootLayer() |
- && m_owningLayer.scrollsOverflow() |
- && !backgroundLayer.image() |
- && !backgroundLayer.next() |
- && (backgroundLayer.attachment() == LocalBackgroundAttachment |
- || backgroundLayer.clip() == PaddingFillBox) |
- && !m_owningLayer.stackingNode()->hasNegativeZOrderList(); |
-} |
- |
bool CompositedLayerMapping::updateSquashingLayerAssignment(PaintLayer* squashedLayer, size_t nextSquashedLayerIndex) |
{ |
GraphicsLayerPaintInfo paintInfo; |