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

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: Revert unnecessary change. 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 2316 matching lines...) Expand 10 before | Expand all | Expand 10 after
2327 switch (compositingState()) { 2327 switch (compositingState()) {
2328 case NotComposited: 2328 case NotComposited:
2329 return 0; 2329 return 0;
2330 case PaintsIntoGroupedBacking: 2330 case PaintsIntoGroupedBacking:
2331 return groupedMapping()->squashingLayer(); 2331 return groupedMapping()->squashingLayer();
2332 default: 2332 default:
2333 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL ayer(); 2333 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL ayer();
2334 } 2334 }
2335 } 2335 }
2336 2336
2337 bool PaintLayer::shouldPaintBackgroundOntoScrollingContentsLayer() const
2338 {
2339 // TODO(flackr): Add support for painting locally attached background images . https://crbug.com/625882
2340 const FillLayer& backgroundLayer = layoutObject()->style()->backgroundLayers ();
2341 return !isRootLayer()
2342 && scrollsOverflow()
2343 && !backgroundLayer.image()
2344 && !backgroundLayer.next()
2345 && (backgroundLayer.attachment() == LocalBackgroundAttachment
2346 || backgroundLayer.clip() == PaddingFillBox)
2347 && !stackingNode()->hasNegativeZOrderList();
2348 }
2349
2337 void PaintLayer::ensureCompositedLayerMapping() 2350 void PaintLayer::ensureCompositedLayerMapping()
2338 { 2351 {
2339 if (m_rareData && m_rareData->compositedLayerMapping) 2352 if (m_rareData && m_rareData->compositedLayerMapping)
2340 return; 2353 return;
2341 2354
2342 ensureRareData().compositedLayerMapping = wrapUnique(new CompositedLayerMapp ing(*this)); 2355 ensureRareData().compositedLayerMapping = wrapUnique(new CompositedLayerMapp ing(*this));
2343 m_rareData->compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLaye rUpdateSubtree); 2356 m_rareData->compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLaye rUpdateSubtree);
2344 2357
2345 updateOrRemoveFilterEffectBuilder(); 2358 updateOrRemoveFilterEffectBuilder();
2346 } 2359 }
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 2961
2949 void showLayerTree(const blink::LayoutObject* layoutObject) 2962 void showLayerTree(const blink::LayoutObject* layoutObject)
2950 { 2963 {
2951 if (!layoutObject) { 2964 if (!layoutObject) {
2952 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2965 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2953 return; 2966 return;
2954 } 2967 }
2955 showLayerTree(layoutObject->enclosingLayer()); 2968 showLayerTree(layoutObject->enclosingLayer());
2956 } 2969 }
2957 #endif 2970 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698