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

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

Issue 2651793012: [RootLayerScrolls] Annotate non-fast-scroll regions to correct layer (Closed)
Patch Set: Created 3 years, 10 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 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 29 matching lines...) Expand all
40 * other provisions required by the MPL or the GPL, as the case may be. 40 * other provisions required by the MPL or the GPL, as the case may be.
41 * If you do not delete the provisions above, a recipient may use your 41 * If you do not delete the provisions above, a recipient may use your
42 * version of this file under any of the LGPL, the MPL or the GPL. 42 * version of this file under any of the LGPL, the MPL or the GPL.
43 */ 43 */
44 44
45 #include "core/paint/PaintLayer.h" 45 #include "core/paint/PaintLayer.h"
46 46
47 #include "core/CSSPropertyNames.h" 47 #include "core/CSSPropertyNames.h"
48 #include "core/HTMLNames.h" 48 #include "core/HTMLNames.h"
49 #include "core/css/PseudoStyleRequest.h" 49 #include "core/css/PseudoStyleRequest.h"
50 #include "core/dom/ClientRectList.h"
50 #include "core/dom/Document.h" 51 #include "core/dom/Document.h"
51 #include "core/dom/shadow/ShadowRoot.h" 52 #include "core/dom/shadow/ShadowRoot.h"
52 #include "core/frame/FrameView.h" 53 #include "core/frame/FrameView.h"
53 #include "core/frame/LocalFrame.h" 54 #include "core/frame/LocalFrame.h"
54 #include "core/frame/Settings.h" 55 #include "core/frame/Settings.h"
55 #include "core/layout/FragmentainerIterator.h" 56 #include "core/layout/FragmentainerIterator.h"
56 #include "core/layout/HitTestRequest.h" 57 #include "core/layout/HitTestRequest.h"
57 #include "core/layout/HitTestResult.h" 58 #include "core/layout/HitTestResult.h"
58 #include "core/layout/HitTestingTransformState.h" 59 #include "core/layout/HitTestingTransformState.h"
59 #include "core/layout/LayoutFlowThread.h" 60 #include "core/layout/LayoutFlowThread.h"
(...skipping 3131 matching lines...) Expand 10 before | Expand all | Expand 10 after
3191 layer = container; 3192 layer = container;
3192 } 3193 }
3193 } 3194 }
3194 3195
3195 void PaintLayer::clearNeedsRepaintRecursively() { 3196 void PaintLayer::clearNeedsRepaintRecursively() {
3196 for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) 3197 for (PaintLayer* child = firstChild(); child; child = child->nextSibling())
3197 child->clearNeedsRepaintRecursively(); 3198 child->clearNeedsRepaintRecursively();
3198 m_needsRepaint = false; 3199 m_needsRepaint = false;
3199 } 3200 }
3200 3201
3202 ClientRectList* PaintLayer::nonFastScrollableRects() const {
3203 // This bypasses the isAllowedToQueryCompositingState() check to enabled the
3204 // optimization from https://codereview.chromium.org/1256043007
3205 CompositedLayerMapping* clm =
3206 m_rareData ? m_rareData->compositedLayerMapping.get() : nullptr;
3207 if (!clm || !clm->scrollingContentsLayer())
3208 return ClientRectList::create();
3209 return ClientRectList::create(clm->scrollingContentsLayer()
3210 ->platformLayer()
3211 ->nonFastScrollableRegion());
3212 }
3213
3201 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 3214 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
3202 void PaintLayer::endShouldKeepAliveAllClientsRecursive() { 3215 void PaintLayer::endShouldKeepAliveAllClientsRecursive() {
3203 for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) 3216 for (PaintLayer* child = firstChild(); child; child = child->nextSibling())
3204 child->endShouldKeepAliveAllClientsRecursive(); 3217 child->endShouldKeepAliveAllClientsRecursive();
3205 DisplayItemClient::endShouldKeepAliveAllClients(this); 3218 DisplayItemClient::endShouldKeepAliveAllClients(this);
3206 } 3219 }
3207 #endif 3220 #endif
3208 3221
3209 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts() 3222 DisableCompositingQueryAsserts::DisableCompositingQueryAsserts()
3210 : m_disabler(&gCompositingQueryMode, CompositingQueriesAreAllowed) {} 3223 : m_disabler(&gCompositingQueryMode, CompositingQueriesAreAllowed) {}
(...skipping 24 matching lines...) Expand all
3235 } 3248 }
3236 3249
3237 void showLayerTree(const blink::LayoutObject* layoutObject) { 3250 void showLayerTree(const blink::LayoutObject* layoutObject) {
3238 if (!layoutObject) { 3251 if (!layoutObject) {
3239 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; 3252 LOG(INFO) << "Cannot showLayerTree. Root is (nil)";
3240 return; 3253 return;
3241 } 3254 }
3242 showLayerTree(layoutObject->enclosingLayer()); 3255 showLayerTree(layoutObject->enclosingLayer());
3243 } 3256 }
3244 #endif 3257 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698