Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2068723002: Paint local attachment backgrounds into composited scrolling contents layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge and fix test expectations. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 4f03f2696807dd4c33992714388dc38fc4f2cd14..2fd9cb021018b5f11a9a1a095c30b351770596f3 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -99,7 +99,7 @@ static IntRect backgroundRect(const LayoutObject* layoutObject)
LayoutRect rect;
const LayoutBox* box = toLayoutBox(layoutObject);
- return pixelSnappedIntRect(box->backgroundClipRect());
+ return pixelSnappedIntRect(box->backgroundRect(BackgroundClipRect));
}
static inline bool isAcceleratedCanvas(const LayoutObject* layoutObject)
@@ -2587,14 +2587,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();
}

Powered by Google App Engine
This is Rietveld 408576698