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 f10007a9157adcbfd4525b9c31d43fdaf037d500..f4f1a98c9b43a3bcd2a973b3d0b0279b2a1a92aa 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
@@ -98,7 +98,7 @@ static IntRect backgroundRect(const LayoutObject* layoutObject) |
LayoutRect rect; |
const LayoutBox* box = toLayoutBox(layoutObject); |
- return pixelSnappedIntRect(box->backgroundClipRect()); |
+ return pixelSnappedIntRect(box->backgroundRect(TranslucentBackgroundRect)); |
} |
static inline bool isAcceleratedCanvas(const LayoutObject* layoutObject) |
@@ -2585,14 +2585,9 @@ bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle |
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.layoutObject()->style()->hasEntirelyLocalBackground() |
&& !m_owningLayer.stackingNode()->hasNegativeZOrderList(); |
} |