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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2259493004: Fix Compositing of Opaque Scrolling Layers and Add Tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index e5e5c68cd33972c9ed798ab93c685111967bfc0b..45969269be199e3ee26c9d1b0fdb4d4dbae8f689 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2320,6 +2320,19 @@ GraphicsLayer* PaintLayer::graphicsLayerBackingForScrolling() const
}
}
+bool PaintLayer::shouldPaintBackgroundOntoScrollingContentsLayer() const
+{
+ // TODO(flackr): Add support for painting locally attached background images. https://crbug.com/625882
+ const FillLayer& backgroundLayer = layoutObject()->style()->backgroundLayers();
+ return !isRootLayer()
+ && scrollsOverflow()
+ && !backgroundLayer.image()
+ && !backgroundLayer.next()
+ && (backgroundLayer.attachment() == LocalBackgroundAttachment
+ || backgroundLayer.clip() == PaddingFillBox)
+ && !stackingNode()->hasNegativeZOrderList();
+}
+
void PaintLayer::ensureCompositedLayerMapping()
{
if (m_rareData && m_rareData->compositedLayerMapping)

Powered by Google App Engine
This is Rietveld 408576698