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

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

Issue 2565223002: Add more specific metrics for main thread scrolling reasons (Closed)
Patch Set: Add unit test && refactoring Created 4 years 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@gmail.com> 10 * Christian Biesinger <cbiesinger@gmail.com>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 m_needsCompositedScrolling(false), 100 m_needsCompositedScrolling(false),
101 m_rebuildHorizontalScrollbarLayer(false), 101 m_rebuildHorizontalScrollbarLayer(false),
102 m_rebuildVerticalScrollbarLayer(false), 102 m_rebuildVerticalScrollbarLayer(false),
103 m_needsScrollOffsetClamp(false), 103 m_needsScrollOffsetClamp(false),
104 m_needsRelayout(false), 104 m_needsRelayout(false),
105 m_hadHorizontalScrollbarBeforeRelayout(false), 105 m_hadHorizontalScrollbarBeforeRelayout(false),
106 m_hadVerticalScrollbarBeforeRelayout(false), 106 m_hadVerticalScrollbarBeforeRelayout(false),
107 m_scrollbarManager(*this), 107 m_scrollbarManager(*this),
108 m_scrollCorner(nullptr), 108 m_scrollCorner(nullptr),
109 m_resizer(nullptr), 109 m_resizer(nullptr),
110 m_scrollAnchor(this) 110 m_scrollAnchor(this),
111 m_reasons(0)
111 #if DCHECK_IS_ON() 112 #if DCHECK_IS_ON()
112 , 113 ,
113 m_hasBeenDisposed(false) 114 m_hasBeenDisposed(false)
114 #endif 115 #endif
115 { 116 {
116 Node* node = box().node(); 117 Node* node = box().node();
117 if (node && node->isElementNode()) { 118 if (node && node->isElementNode()) {
118 // We save and restore only the scrollOffset as the other scroll values are 119 // We save and restore only the scrollOffset as the other scroll values are
119 // recalculated. 120 // recalculated.
120 Element* element = toElement(node); 121 Element* element = toElement(node);
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 2034
2034 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2035 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2035 clampScrollableAreas() { 2036 clampScrollableAreas() {
2036 for (auto& scrollableArea : *s_needsClamp) 2037 for (auto& scrollableArea : *s_needsClamp)
2037 scrollableArea->clampScrollOffsetAfterOverflowChange(); 2038 scrollableArea->clampScrollOffsetAfterOverflowChange();
2038 delete s_needsClamp; 2039 delete s_needsClamp;
2039 s_needsClamp = nullptr; 2040 s_needsClamp = nullptr;
2040 } 2041 }
2041 2042
2042 } // namespace blink 2043 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698