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

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

Issue 2068723002: Paint local attachment backgrounds into composited scrolling contents layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve opaque layer detection and fix non-composited border painting bug in layout tests. 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 2434 matching lines...) Expand 10 before | Expand all | Expand 10 after
2445 2445
2446 bool PaintLayer::shouldBeSelfPaintingLayer() const 2446 bool PaintLayer::shouldBeSelfPaintingLayer() const
2447 { 2447 {
2448 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing()) 2448 if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requires AcceleratedCompositing())
2449 return true; 2449 return true;
2450 return layoutObject()->layerTypeRequired() == NormalPaintLayer 2450 return layoutObject()->layerTypeRequired() == NormalPaintLayer
2451 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars()) 2451 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars())
2452 || needsCompositedScrolling(); 2452 || needsCompositedScrolling();
2453 } 2453 }
2454 2454
2455 bool PaintLayer::shouldPaintBackgroundOntoForeground() const
2456 {
2457 return scrollsOverflow()
2458 && layoutObject()->style()->hasEntirelyLocalBackground()
2459 && !stackingNode()->hasNegativeZOrderList();
2460 }
2461
2455 void PaintLayer::updateSelfPaintingLayer() 2462 void PaintLayer::updateSelfPaintingLayer()
2456 { 2463 {
2457 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer(); 2464 bool isSelfPaintingLayer = shouldBeSelfPaintingLayer();
2458 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) 2465 if (this->isSelfPaintingLayer() == isSelfPaintingLayer)
2459 return; 2466 return;
2460 2467
2461 m_isSelfPaintingLayer = isSelfPaintingLayer; 2468 m_isSelfPaintingLayer = isSelfPaintingLayer;
2462 2469
2463 if (PaintLayer* parent = this->parent()) { 2470 if (PaintLayer* parent = this->parent()) {
2464 parent->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 2471 parent->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
2924 2931
2925 void showLayerTree(const blink::LayoutObject* layoutObject) 2932 void showLayerTree(const blink::LayoutObject* layoutObject)
2926 { 2933 {
2927 if (!layoutObject) { 2934 if (!layoutObject) {
2928 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2935 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2929 return; 2936 return;
2930 } 2937 }
2931 showLayerTree(layoutObject->enclosingLayer()); 2938 showLayerTree(layoutObject->enclosingLayer());
2932 } 2939 }
2933 #endif 2940 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698