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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 248083003: Mouse event handlers use user gesture tokens on top-level LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review comments addressed Created 6 years, 8 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
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 8d33eba40c5b70d75204e2d4f385d2877b167ecb..f6bcb12500e65639fa2e98ab21abb898379ef61f 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -1199,7 +1199,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
RefPtr<FrameView> protector(m_frame->view());
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
- m_frame->tree().top()->eventHandler().m_lastMouseDownUserGestureToken = gestureIndicator.currentToken();
+ m_frame->localFrameRoot()->eventHandler().m_lastMouseDownUserGestureToken = gestureIndicator.currentToken();
cancelFakeMouseMoveEvent();
if (m_eventHandlerWillResetCapturingMouseEventsNode)
@@ -1515,7 +1515,7 @@ bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)
OwnPtr<UserGestureIndicator> gestureIndicator;
- if (m_frame->tree().top()->eventHandler().m_lastMouseDownUserGestureToken)
+ if (m_frame->localFrameRoot()->eventHandler().m_lastMouseDownUserGestureToken)
gestureIndicator = adoptPtr(new UserGestureIndicator(m_frame->tree().top()->eventHandler().m_lastMouseDownUserGestureToken.release()));
else
gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessingUserGesture));
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698