Index: third_party/WebKit/Source/core/input/EventHandler.cpp |
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp |
index 0aa7ebcf9babbe3fcd8f9422e7bee6cf1f2b8303..435c8e7908f2aa5737c5d5c0a00431e0e8aeef07 100644 |
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
@@ -602,10 +602,6 @@ ScrollResult EventHandler::scrollBox(LayoutBox* box, |
return box->scroll(granularity, delta); |
} |
- // Viewport actions should only happen when scrolling an element in the |
- // main frame. |
- ASSERT(m_frame->isMainFrame()); |
- |
// If there is an ApplyScroll callback, its because we placed one on the |
// root scroller to control top controls and overscroll. Invoke a scroll |
// using parts of the scroll customization framework on just this element. |
@@ -2428,12 +2424,13 @@ WebInputEventResult EventHandler::handleGestureScrollBegin(const PlatformGesture |
bool EventHandler::isRootScroller(const Node& node) const |
{ |
- // The root scroller is the one Element on the page designated to perform |
- // "viewport actions" like top controls movement and overscroll glow. |
- if (!frameHost() || !frameHost()->rootScroller()) |
+ if (!m_frame->document()) |
+ return false; |
+ |
+ if (!node.isElementNode()) |
return false; |
- return frameHost()->rootScroller()->get() == &node; |
+ return m_frame->document()->topDocument().isEffectiveRootScroller(toElement(&node)); |
esprehn
2016/05/11 17:37:05
your method should take a const Element&, then do
bokan
2016/06/02 15:49:55
Done.
|
} |
WebInputEventResult EventHandler::handleGestureScrollUpdate(const PlatformGestureEvent& gestureEvent) |