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

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

Issue 776483002: Use the setting to determine whether showing context menu on mouse up. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add layout test and exclude modifiers part. Created 6 years 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 | « LayoutTests/fast/events/show-context-menu-on-mouse-up-expected.txt ('k') | Source/web/WebViewImpl.cpp » ('j') | 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 04050e9e0b6a530eb5039055f8d8913bb4a18cec..09e700fd4b2c4fed7e46d7bc8025a2c8a5e9ba07 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -2827,11 +2827,10 @@ bool EventHandler::sendContextMenuEventForKey()
bool EventHandler::sendContextMenuEventForGesture(const GestureEventWithHitTestResults& targetedEvent)
{
-#if OS(WIN)
- PlatformEvent::Type eventType = PlatformEvent::MouseReleased;
-#else
PlatformEvent::Type eventType = PlatformEvent::MousePressed;
-#endif
+
+ if (m_frame->settings()->showContextMenuOnMouseUp())
+ eventType = PlatformEvent::MouseReleased;
Rick Byers 2014/12/03 13:50:19 Note to other reviewers: I didn't bother asking f
PlatformMouseEvent mouseEvent(targetedEvent.event().position(), targetedEvent.event().globalPosition(), RightButton, eventType, 1, false, false, false, false, PlatformMouseEvent::FromTouch, WTF::currentTime());
// To simulate right-click behavior, we send a right mouse down and then
« no previous file with comments | « LayoutTests/fast/events/show-context-menu-on-mouse-up-expected.txt ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698