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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp

Issue 2400723002: Early out when setting global root scroller (Closed)
Patch Set: undo errenous patchset Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/RootFrameViewport.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/page/scrolling/TopDocumentRootScrollerController.h" 5 #include "core/page/scrolling/TopDocumentRootScrollerController.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 return element; 64 return element;
65 } 65 }
66 66
67 void TopDocumentRootScrollerController::recomputeGlobalRootScroller() { 67 void TopDocumentRootScrollerController::recomputeGlobalRootScroller() {
68 if (!m_viewportApplyScroll) 68 if (!m_viewportApplyScroll)
69 return; 69 return;
70 70
71 Element* target = findGlobalRootScrollerElement(); 71 Element* target = findGlobalRootScrollerElement();
72 if (!target) 72 if (!target || target == m_globalRootScroller)
73 return; 73 return;
74 74
75 ScrollableArea* targetScroller = RootScrollerUtil::scrollableAreaFor(*target); 75 ScrollableArea* targetScroller = RootScrollerUtil::scrollableAreaFor(*target);
76 76
77 if (!targetScroller) 77 if (!targetScroller)
78 return; 78 return;
79 79
80 if (m_globalRootScroller) 80 if (m_globalRootScroller)
81 m_globalRootScroller->removeApplyScroll(); 81 m_globalRootScroller->removeApplyScroll();
82 82
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // the root scroller gets composited. 177 // the root scroller gets composited.
178 178
179 return graphicsLayer; 179 return graphicsLayer;
180 } 180 }
181 181
182 Element* TopDocumentRootScrollerController::globalRootScroller() const { 182 Element* TopDocumentRootScrollerController::globalRootScroller() const {
183 return m_globalRootScroller.get(); 183 return m_globalRootScroller.get();
184 } 184 }
185 185
186 } // namespace blink 186 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/RootFrameViewport.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698