Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed const changes and some gratuitous checks Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 dbc20349449fedba842cf2c85959f0cd7ceda670..0aa7ebcf9babbe3fcd8f9422e7bee6cf1f2b8303 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -84,6 +84,7 @@
#include "core/page/SpatialNavigation.h"
#include "core/page/TouchAdjustment.h"
#include "core/page/scrolling/OverscrollController.h"
+#include "core/page/scrolling/RootScroller.h"
#include "core/page/scrolling/ScrollState.h"
#include "core/paint/PaintLayer.h"
#include "core/style/ComputedStyle.h"
@@ -2429,11 +2430,10 @@ 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 (!node.isElementNode() || node.document().ownerElement())
+ if (!frameHost() || !frameHost()->rootScroller())
return false;
- return node.document().rootScroller() == toElement(&node);
+ return frameHost()->rootScroller()->get() == &node;
}
WebInputEventResult EventHandler::handleGestureScrollUpdate(const PlatformGestureEvent& gestureEvent)
@@ -3706,7 +3706,7 @@ PlatformEvent::Modifiers EventHandler::accessKeyModifiers()
#endif
}
-FrameHost* EventHandler::frameHost()
+FrameHost* EventHandler::frameHost() const
{
if (!m_frame->page())
return nullptr;
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.h ('k') | third_party/WebKit/Source/core/input/TouchActionUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698