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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2346883003: Only paint the background onto the scrolling contents layer if we have a scrolling contents layer. (Closed)
Patch Set: Remove obsolete border-radius test. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2349 switch (compositingState()) { 2349 switch (compositingState()) {
2350 case NotComposited: 2350 case NotComposited:
2351 return 0; 2351 return 0;
2352 case PaintsIntoGroupedBacking: 2352 case PaintsIntoGroupedBacking:
2353 return groupedMapping()->squashingLayer(); 2353 return groupedMapping()->squashingLayer();
2354 default: 2354 default:
2355 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL ayer(); 2355 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL ayer();
2356 } 2356 }
2357 } 2357 }
2358 2358
2359 bool PaintLayer::shouldPaintBackgroundOntoScrollingContentsLayer() const 2359 bool PaintLayer::canPaintBackgroundOntoScrollingContentsLayer() const
2360 { 2360 {
2361 return !isRootLayer() 2361 return !isRootLayer()
2362 && scrollsOverflow() 2362 && scrollsOverflow()
2363 && layoutObject()->hasLocalEquivalentBackground() 2363 && layoutObject()->hasLocalEquivalentBackground()
2364 && !stackingNode()->hasNegativeZOrderList(); 2364 && !stackingNode()->hasNegativeZOrderList();
2365 } 2365 }
2366 2366
2367 void PaintLayer::ensureCompositedLayerMapping() 2367 void PaintLayer::ensureCompositedLayerMapping()
2368 { 2368 {
2369 if (m_rareData && m_rareData->compositedLayerMapping) 2369 if (m_rareData && m_rareData->compositedLayerMapping)
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2980 2980
2981 void showLayerTree(const blink::LayoutObject* layoutObject) 2981 void showLayerTree(const blink::LayoutObject* layoutObject)
2982 { 2982 {
2983 if (!layoutObject) { 2983 if (!layoutObject) {
2984 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2984 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2985 return; 2985 return;
2986 } 2986 }
2987 showLayerTree(layoutObject->enclosingLayer()); 2987 showLayerTree(layoutObject->enclosingLayer());
2988 } 2988 }
2989 #endif 2989 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698