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

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

Issue 2655023003: Background attachment behavior update for rootlayer with root-layer-scrolls enabled (Closed)
Patch Set: Update condition check Created 3 years, 10 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 bf4faf4eff447320bad99429f6ec2a72e5b5e13d..b55aac16105cd276531b04b81df610295d83ebb4 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2603,10 +2603,15 @@ GraphicsLayer* PaintLayer::graphicsLayerBacking(const LayoutObject* obj) const {
}
BackgroundPaintLocation PaintLayer::backgroundPaintLocation() const {
- BackgroundPaintLocation location =
- isRootLayer() || !scrollsOverflow()
- ? BackgroundPaintInGraphicsLayer
- : layoutObject()->backgroundPaintLocation();
+ BackgroundPaintLocation location;
+ if (!scrollsOverflow()) {
+ location = BackgroundPaintInGraphicsLayer;
+ } else if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ location = layoutObject()->backgroundPaintLocation();
+ } else {
+ location = isRootLayer() ? BackgroundPaintInGraphicsLayer
+ : layoutObject()->backgroundPaintLocation();
+ }
m_stackingNode->updateLayerListsIfNeeded();
if (m_stackingNode->hasNegativeZOrderList())
location = BackgroundPaintInGraphicsLayer;
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxPaintInvalidatorTest.cpp ('k') | third_party/WebKit/Source/core/paint/ViewPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698