OLD | NEW |
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/RootScrollerController.h" | 5 #include "core/page/scrolling/RootScrollerController.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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 return false; | 66 return false; |
67 | 67 |
68 if (!fillsViewport(element)) | 68 if (!fillsViewport(element)) |
69 return false; | 69 return false; |
70 | 70 |
71 return true; | 71 return true; |
72 } | 72 } |
73 | 73 |
74 } // namespace | 74 } // namespace |
75 | 75 |
76 ViewportScrollCallback* RootScrollerController::createViewportApplyScroll( | |
77 TopControls* topControls, OverscrollController* overscrollController) | |
78 { | |
79 return new ViewportScrollCallback(topControls, overscrollController); | |
80 } | |
81 | |
82 RootScrollerController::RootScrollerController(Document& document, ViewportScrol
lCallback* applyScrollCallback) | 76 RootScrollerController::RootScrollerController(Document& document, ViewportScrol
lCallback* applyScrollCallback) |
83 : m_document(&document) | 77 : m_document(&document) |
84 , m_viewportApplyScroll(applyScrollCallback) | 78 , m_viewportApplyScroll(applyScrollCallback) |
85 { | 79 { |
86 } | 80 } |
87 | 81 |
88 DEFINE_TRACE(RootScrollerController) | 82 DEFINE_TRACE(RootScrollerController) |
89 { | 83 { |
90 visitor->trace(m_document); | 84 visitor->trace(m_document); |
91 visitor->trace(m_viewportApplyScroll); | 85 visitor->trace(m_viewportApplyScroll); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 m_viewportApplyScroll->setScroller(targetScroller); | 150 m_viewportApplyScroll->setScroller(targetScroller); |
157 } | 151 } |
158 | 152 |
159 Element* RootScrollerController::defaultEffectiveRootScroller() | 153 Element* RootScrollerController::defaultEffectiveRootScroller() |
160 { | 154 { |
161 DCHECK(m_document); | 155 DCHECK(m_document); |
162 return m_document->documentElement(); | 156 return m_document->documentElement(); |
163 } | 157 } |
164 | 158 |
165 } // namespace blink | 159 } // namespace blink |
OLD | NEW |