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

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: Merge with master 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 2340 matching lines...) Expand 10 before | Expand all | Expand 10 after
2351 switch (compositingState()) { 2351 switch (compositingState()) {
2352 case NotComposited: 2352 case NotComposited:
2353 return 0; 2353 return 0;
2354 case PaintsIntoGroupedBacking: 2354 case PaintsIntoGroupedBacking:
2355 return groupedMapping()->squashingLayer(); 2355 return groupedMapping()->squashingLayer();
2356 default: 2356 default:
2357 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL ayer(); 2357 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL ayer();
2358 } 2358 }
2359 } 2359 }
2360 2360
2361 bool PaintLayer::shouldPaintBackgroundOntoScrollingContentsLayer() const 2361 bool PaintLayer::canPaintBackgroundOntoScrollingContentsLayer() const
2362 { 2362 {
2363 return !isRootLayer() 2363 return !isRootLayer()
2364 && scrollsOverflow() 2364 && scrollsOverflow()
2365 && layoutObject()->hasLocalEquivalentBackground() 2365 && layoutObject()->hasLocalEquivalentBackground()
2366 && !stackingNode()->hasNegativeZOrderList(); 2366 && !stackingNode()->hasNegativeZOrderList();
2367 } 2367 }
2368 2368
2369 void PaintLayer::ensureCompositedLayerMapping() 2369 void PaintLayer::ensureCompositedLayerMapping()
2370 { 2370 {
2371 if (m_rareData && m_rareData->compositedLayerMapping) 2371 if (m_rareData && m_rareData->compositedLayerMapping)
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2982 2982
2983 void showLayerTree(const blink::LayoutObject* layoutObject) 2983 void showLayerTree(const blink::LayoutObject* layoutObject)
2984 { 2984 {
2985 if (!layoutObject) { 2985 if (!layoutObject) {
2986 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2986 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2987 return; 2987 return;
2988 } 2988 }
2989 showLayerTree(layoutObject->enclosingLayer()); 2989 showLayerTree(layoutObject->enclosingLayer());
2990 } 2990 }
2991 #endif 2991 #endif
OLDNEW
« 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