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

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

Issue 2082153002: Paint solid color and local attachment backgrounds into scrolling layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert some changes Created 4 years, 4 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 2448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 2459
2460 bool PaintLayer::shouldBeSelfPaintingLayer() const 2460 bool PaintLayer::shouldBeSelfPaintingLayer() const
2461 { 2461 {
2462 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing()) 2462 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing())
2463 return true; 2463 return true;
2464 return layoutObject()->layerTypeRequired() == NormalPaintLayer 2464 return layoutObject()->layerTypeRequired() == NormalPaintLayer
2465 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars()) 2465 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars())
2466 || needsCompositedScrolling(); 2466 || needsCompositedScrolling();
2467 } 2467 }
2468 2468
2469 bool PaintLayer::shouldPaintBackgroundOntoForeground() const
2470 {
2471 return scrollsOverflow()
2472 && layoutObject()->style()->hasEntirelyLocalBackground()
2473 && !stackingNode()->hasNegativeZOrderList();
2474 }
2475
2469 void PaintLayer::updateSelfPaintingLayer() 2476 void PaintLayer::updateSelfPaintingLayer()
2470 { 2477 {
2471 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer(); 2478 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer();
2472 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) 2479 if (this->isSelfPaintingLayer() == isSelfPaintingLayer)
2473 return; 2480 return;
2474 2481
2475 m_isSelfPaintingLayer = isSelfPaintingLayer; 2482 m_isSelfPaintingLayer = isSelfPaintingLayer;
2476 2483
2477 if (PaintLayer* parent = this->parent()) { 2484 if (PaintLayer* parent = this->parent()) {
2478 parent->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 2485 parent->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
2938 2945
2939 void showLayerTree(const blink::LayoutObject* layoutObject) 2946 void showLayerTree(const blink::LayoutObject* layoutObject)
2940 { 2947 {
2941 if (!layoutObject) { 2948 if (!layoutObject) {
2942 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2949 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2943 return; 2950 return;
2944 } 2951 }
2945 showLayerTree(layoutObject->enclosingLayer()); 2952 showLayerTree(layoutObject->enclosingLayer());
2946 } 2953 }
2947 #endif 2954 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698