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

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: Add Mac rebaselines. Created 4 years 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 535f90699c94aab02253d897aec7dfe7afe65e9b..0eba7e6116d3256c9fbb6d118b34736709c147a5 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2659,13 +2659,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() {
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698