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

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

Issue 2511893002: Paint solid color background into both scrolling contents layer and graphics layer. (Closed)
Patch Set: Created 4 years, 1 month 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 ec0536aca76519402847e4444979a0d646a4c544..5f7ed91939253908e0f17b940a8f7bb77abfd3ae 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2627,13 +2627,15 @@ GraphicsLayer* PaintLayer::graphicsLayerBackingForScrolling() const {
}
}
-bool PaintLayer::canPaintBackgroundOntoScrollingContentsLayer() const {
- if (isRootLayer() || !scrollsOverflow() ||
- !layoutObject()->hasLocalEquivalentBackground())
- return false;
-
+BackgroundPaintLocation PaintLayer::backgroundPaintLocation() const {
+ BackgroundPaintLocation location =
+ isRootLayer() || !scrollsOverflow()
+ ? BackgroundPaintInGraphicsLayer
+ : layoutObject()->backgroundPaintLocation();
m_stackingNode->updateLayerListsIfNeeded();
- return !m_stackingNode->hasNegativeZOrderList();
+ if (m_stackingNode->hasNegativeZOrderList())
+ location = BackgroundPaintInGraphicsLayer;
+ return location;
}
void PaintLayer::ensureCompositedLayerMapping() {

Powered by Google App Engine
This is Rietveld 408576698