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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 return groupedMapping()->squashingLayer(); 2596 return groupedMapping()->squashingLayer();
2597 default: 2597 default:
2598 return (obj != layoutObject() && 2598 return (obj != layoutObject() &&
2599 compositedLayerMapping()->scrollingContentsLayer()) 2599 compositedLayerMapping()->scrollingContentsLayer())
2600 ? compositedLayerMapping()->scrollingContentsLayer() 2600 ? compositedLayerMapping()->scrollingContentsLayer()
2601 : compositedLayerMapping()->mainGraphicsLayer(); 2601 : compositedLayerMapping()->mainGraphicsLayer();
2602 } 2602 }
2603 } 2603 }
2604 2604
2605 BackgroundPaintLocation PaintLayer::backgroundPaintLocation() const { 2605 BackgroundPaintLocation PaintLayer::backgroundPaintLocation() const {
2606 BackgroundPaintLocation location = 2606 BackgroundPaintLocation location;
2607 isRootLayer() || !scrollsOverflow() 2607 if (!scrollsOverflow()) {
2608 ? BackgroundPaintInGraphicsLayer 2608 location = BackgroundPaintInGraphicsLayer;
2609 : layoutObject()->backgroundPaintLocation(); 2609 } else if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
2610 location = layoutObject()->backgroundPaintLocation();
2611 } else {
2612 location = isRootLayer() ? BackgroundPaintInGraphicsLayer
2613 : layoutObject()->backgroundPaintLocation();
2614 }
2610 m_stackingNode->updateLayerListsIfNeeded(); 2615 m_stackingNode->updateLayerListsIfNeeded();
2611 if (m_stackingNode->hasNegativeZOrderList()) 2616 if (m_stackingNode->hasNegativeZOrderList())
2612 location = BackgroundPaintInGraphicsLayer; 2617 location = BackgroundPaintInGraphicsLayer;
2613 return location; 2618 return location;
2614 } 2619 }
2615 2620
2616 void PaintLayer::ensureCompositedLayerMapping() { 2621 void PaintLayer::ensureCompositedLayerMapping() {
2617 if (m_rareData && m_rareData->compositedLayerMapping) 2622 if (m_rareData && m_rareData->compositedLayerMapping)
2618 return; 2623 return;
2619 2624
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
3218 } 3223 }
3219 3224
3220 void showLayerTree(const blink::LayoutObject* layoutObject) { 3225 void showLayerTree(const blink::LayoutObject* layoutObject) {
3221 if (!layoutObject) { 3226 if (!layoutObject) {
3222 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; 3227 LOG(INFO) << "Cannot showLayerTree. Root is (nil)";
3223 return; 3228 return;
3224 } 3229 }
3225 showLayerTree(layoutObject->enclosingLayer()); 3230 showLayerTree(layoutObject->enclosingLayer());
3226 } 3231 }
3227 #endif 3232 #endif
OLDNEW
« 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