| 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/input/ScrollManager.h" | 5 #include "core/input/ScrollManager.h" |
| 6 | 6 |
| 7 #include "core/dom/DOMNodeIds.h" | 7 #include "core/dom/DOMNodeIds.h" |
| 8 #include "core/events/GestureEvent.h" | 8 #include "core/events/GestureEvent.h" |
| 9 #include "core/frame/BrowserControls.h" |
| 9 #include "core/frame/FrameHost.h" | 10 #include "core/frame/FrameHost.h" |
| 10 #include "core/frame/FrameView.h" | 11 #include "core/frame/FrameView.h" |
| 11 #include "core/frame/TopControls.h" | |
| 12 #include "core/html/HTMLFrameOwnerElement.h" | 12 #include "core/html/HTMLFrameOwnerElement.h" |
| 13 #include "core/input/EventHandler.h" | 13 #include "core/input/EventHandler.h" |
| 14 #include "core/input/EventHandlingUtil.h" | 14 #include "core/input/EventHandlingUtil.h" |
| 15 #include "core/layout/LayoutBlock.h" | 15 #include "core/layout/LayoutBlock.h" |
| 16 #include "core/layout/LayoutPart.h" | 16 #include "core/layout/LayoutPart.h" |
| 17 #include "core/layout/api/LayoutViewItem.h" | 17 #include "core/layout/api/LayoutViewItem.h" |
| 18 #include "core/loader/DocumentLoader.h" | 18 #include "core/loader/DocumentLoader.h" |
| 19 #include "core/page/AutoscrollController.h" | 19 #include "core/page/AutoscrollController.h" |
| 20 #include "core/page/Page.h" | 20 #include "core/page/Page.h" |
| 21 #include "core/page/scrolling/OverscrollController.h" | 21 #include "core/page/scrolling/OverscrollController.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 363 |
| 364 if (!widget || !widget->isFrameView()) | 364 if (!widget || !widget->isFrameView()) |
| 365 return WebInputEventResult::NotHandled; | 365 return WebInputEventResult::NotHandled; |
| 366 | 366 |
| 367 return toFrameView(widget)->frame().eventHandler().handleGestureScrollEvent( | 367 return toFrameView(widget)->frame().eventHandler().handleGestureScrollEvent( |
| 368 gestureEvent); | 368 gestureEvent); |
| 369 } | 369 } |
| 370 | 370 |
| 371 bool ScrollManager::isEffectiveRootScroller(const Node& node) const { | 371 bool ScrollManager::isEffectiveRootScroller(const Node& node) const { |
| 372 // The root scroller is the one Element on the page designated to perform | 372 // The root scroller is the one Element on the page designated to perform |
| 373 // "viewport actions" like top controls movement and overscroll glow. | 373 // "viewport actions" like browser controls movement and overscroll glow. |
| 374 if (!m_frame->document()) | 374 if (!m_frame->document()) |
| 375 return false; | 375 return false; |
| 376 | 376 |
| 377 if (!node.isElementNode()) | 377 if (!node.isElementNode()) |
| 378 return false; | 378 return false; |
| 379 | 379 |
| 380 return node.isSameNode( | 380 return node.isSameNode( |
| 381 m_frame->document()->rootScrollerController()->effectiveRootScroller()); | 381 m_frame->document()->rootScrollerController()->effectiveRootScroller()); |
| 382 } | 382 } |
| 383 | 383 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 if (scrollbar->gestureEvent(targetedEvent.event(), &shouldUpdateCapture)) { | 533 if (scrollbar->gestureEvent(targetedEvent.event(), &shouldUpdateCapture)) { |
| 534 if (shouldUpdateCapture) | 534 if (shouldUpdateCapture) |
| 535 m_scrollbarHandlingScrollGesture = scrollbar; | 535 m_scrollbarHandlingScrollGesture = scrollbar; |
| 536 return true; | 536 return true; |
| 537 } | 537 } |
| 538 } | 538 } |
| 539 return false; | 539 return false; |
| 540 } | 540 } |
| 541 | 541 |
| 542 } // namespace blink | 542 } // namespace blink |
| OLD | NEW |