| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 if (&area == &rfv->layoutViewport()) { | 184 if (&area == &rfv->layoutViewport()) { |
| 185 DCHECK(frameView->layoutViewportScrollableArea()); | 185 DCHECK(frameView->layoutViewportScrollableArea()); |
| 186 rfv->setLayoutViewport(*frameView->layoutViewportScrollableArea()); | 186 rfv->setLayoutViewport(*frameView->layoutViewportScrollableArea()); |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 | 189 |
| 190 void TopDocumentRootScrollerController::initializeViewportScrollCallback( | 190 void TopDocumentRootScrollerController::initializeViewportScrollCallback( |
| 191 RootFrameViewport& rootFrameViewport) { | 191 RootFrameViewport& rootFrameViewport) { |
| 192 DCHECK(m_page); | 192 DCHECK(m_page); |
| 193 m_viewportApplyScroll = ViewportScrollCallback::create( | 193 m_viewportApplyScroll = ViewportScrollCallback::create( |
| 194 &m_page->browserControls(), &m_page->frameHost().overscrollController(), | 194 &m_page->browserControls(), &m_page->overscrollController(), |
| 195 rootFrameViewport); | 195 rootFrameViewport); |
| 196 | 196 |
| 197 recomputeGlobalRootScroller(); | 197 recomputeGlobalRootScroller(); |
| 198 } | 198 } |
| 199 | 199 |
| 200 bool TopDocumentRootScrollerController::isViewportScrollCallback( | 200 bool TopDocumentRootScrollerController::isViewportScrollCallback( |
| 201 const ScrollStateCallback* callback) const { | 201 const ScrollStateCallback* callback) const { |
| 202 if (!callback) | 202 if (!callback) |
| 203 return false; | 203 return false; |
| 204 | 204 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 223 | 223 |
| 224 PaintLayer* TopDocumentRootScrollerController::rootScrollerPaintLayer() const { | 224 PaintLayer* TopDocumentRootScrollerController::rootScrollerPaintLayer() const { |
| 225 return RootScrollerUtil::paintLayerForRootScroller(m_globalRootScroller); | 225 return RootScrollerUtil::paintLayerForRootScroller(m_globalRootScroller); |
| 226 } | 226 } |
| 227 | 227 |
| 228 Element* TopDocumentRootScrollerController::globalRootScroller() const { | 228 Element* TopDocumentRootScrollerController::globalRootScroller() const { |
| 229 return m_globalRootScroller.get(); | 229 return m_globalRootScroller.get(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace blink | 232 } // namespace blink |
| OLD | NEW |