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/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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 if (&area == &rfv->layoutViewport()) { | 220 if (&area == &rfv->layoutViewport()) { |
221 DCHECK(frameView->layoutViewportScrollableArea()); | 221 DCHECK(frameView->layoutViewportScrollableArea()); |
222 rfv->setLayoutViewport(*frameView->layoutViewportScrollableArea()); | 222 rfv->setLayoutViewport(*frameView->layoutViewportScrollableArea()); |
223 } | 223 } |
224 } | 224 } |
225 | 225 |
226 void TopDocumentRootScrollerController::initializeViewportScrollCallback( | 226 void TopDocumentRootScrollerController::initializeViewportScrollCallback( |
227 RootFrameViewport& rootFrameViewport) { | 227 RootFrameViewport& rootFrameViewport) { |
228 DCHECK(m_frameHost); | 228 DCHECK(m_frameHost); |
229 m_viewportApplyScroll = ViewportScrollCallback::create( | 229 m_viewportApplyScroll = ViewportScrollCallback::create( |
230 &m_frameHost->browserControls(), &m_frameHost->overscrollController(), | 230 &m_frameHost->page().browserControls(), |
231 rootFrameViewport); | 231 &m_frameHost->overscrollController(), rootFrameViewport); |
232 | 232 |
233 recomputeGlobalRootScroller(); | 233 recomputeGlobalRootScroller(); |
234 } | 234 } |
235 | 235 |
236 bool TopDocumentRootScrollerController::isViewportScrollCallback( | 236 bool TopDocumentRootScrollerController::isViewportScrollCallback( |
237 const ScrollStateCallback* callback) const { | 237 const ScrollStateCallback* callback) const { |
238 if (!callback) | 238 if (!callback) |
239 return false; | 239 return false; |
240 | 240 |
241 return callback == m_viewportApplyScroll.get(); | 241 return callback == m_viewportApplyScroll.get(); |
(...skipping 17 matching lines...) Expand all Loading... |
259 | 259 |
260 PaintLayer* TopDocumentRootScrollerController::rootScrollerPaintLayer() const { | 260 PaintLayer* TopDocumentRootScrollerController::rootScrollerPaintLayer() const { |
261 return RootScrollerUtil::paintLayerForRootScroller(m_globalRootScroller); | 261 return RootScrollerUtil::paintLayerForRootScroller(m_globalRootScroller); |
262 } | 262 } |
263 | 263 |
264 Element* TopDocumentRootScrollerController::globalRootScroller() const { | 264 Element* TopDocumentRootScrollerController::globalRootScroller() const { |
265 return m_globalRootScroller.get(); | 265 return m_globalRootScroller.get(); |
266 } | 266 } |
267 | 267 |
268 } // namespace blink | 268 } // namespace blink |
OLD | NEW |