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

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

Issue 2346883003: Only paint the background onto the scrolling contents layer if we have a scrolling contents layer. (Closed)
Patch Set: Merge with master Created 4 years, 3 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 288c35e5d3954370a2b0fc82fae901f04e0ec6ff..5f691dc12248739528a62f2c18be57b8503aa7f9 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -299,7 +299,12 @@ void CompositedLayerMapping::updateIsRootForIsolatedGroup()
void CompositedLayerMapping::updateBackgroundPaintsOntoScrollingContentsLayer()
{
- bool shouldPaintOntoScrollingContentsLayer = m_owningLayer.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 =
+ m_owningLayer.canPaintBackgroundOntoScrollingContentsLayer()
+ && m_owningLayer.getScrollableArea()->usesCompositedScrolling();
if (shouldPaintOntoScrollingContentsLayer != backgroundPaintsOntoScrollingContentsLayer()) {
m_backgroundPaintsOntoScrollingContentsLayer = shouldPaintOntoScrollingContentsLayer;
// If the background is no longer painted onto the scrolling contents

Powered by Google App Engine
This is Rietveld 408576698