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

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

Issue 2259493004: Fix Compositing of Opaque Scrolling Layers and Add Tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 switch (compositingState()) { 2313 switch (compositingState()) {
2314 case NotComposited: 2314 case NotComposited:
2315 return 0; 2315 return 0;
2316 case PaintsIntoGroupedBacking: 2316 case PaintsIntoGroupedBacking:
2317 return groupedMapping()->squashingLayer(); 2317 return groupedMapping()->squashingLayer();
2318 default: 2318 default:
2319 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL ayer(); 2319 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL ayer();
2320 } 2320 }
2321 } 2321 }
2322 2322
2323 bool PaintLayer::shouldPaintBackgroundOntoScrollingContentsLayer() const
2324 {
2325 // TODO(flackr): Add support for painting locally attached background images . https://crbug.com/625882
2326 const FillLayer& backgroundLayer = layoutObject()->style()->backgroundLayers ();
2327 return !isRootLayer()
2328 && scrollsOverflow()
2329 && !backgroundLayer.image()
2330 && !backgroundLayer.next()
2331 && (backgroundLayer.attachment() == LocalBackgroundAttachment
2332 || backgroundLayer.clip() == PaddingFillBox)
2333 && !stackingNode()->hasNegativeZOrderList();
2334 }
2335
2323 void PaintLayer::ensureCompositedLayerMapping() 2336 void PaintLayer::ensureCompositedLayerMapping()
2324 { 2337 {
2325 if (m_rareData && m_rareData->compositedLayerMapping) 2338 if (m_rareData && m_rareData->compositedLayerMapping)
2326 return; 2339 return;
2327 2340
2328 ensureRareData().compositedLayerMapping = wrapUnique(new CompositedLayerMapp ing(*this)); 2341 ensureRareData().compositedLayerMapping = wrapUnique(new CompositedLayerMapp ing(*this));
2329 m_rareData->compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLaye rUpdateSubtree); 2342 m_rareData->compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLaye rUpdateSubtree);
2330 2343
2331 updateOrRemoveFilterEffectBuilder(); 2344 updateOrRemoveFilterEffectBuilder();
2332 } 2345 }
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
2924 2937
2925 void showLayerTree(const blink::LayoutObject* layoutObject) 2938 void showLayerTree(const blink::LayoutObject* layoutObject)
2926 { 2939 {
2927 if (!layoutObject) { 2940 if (!layoutObject) {
2928 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2941 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2929 return; 2942 return;
2930 } 2943 }
2931 showLayerTree(layoutObject->enclosingLayer()); 2944 showLayerTree(layoutObject->enclosingLayer());
2932 } 2945 }
2933 #endif 2946 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698