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

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

Issue 787693003: Use the showContextMenuOnMouseUp setting instead of #ifdef. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 | « no previous file | 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 7624a0e919aee46f771d5949e1c03a6043fa0701..2b1198990eb28690643830deddd25a10a0a29bee 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -2813,12 +2813,9 @@ bool EventHandler::sendContextMenuEventForKey()
// The contextmenu event is a mouse event even when invoked using the keyboard.
// This is required for web compatibility.
-
-#if OS(WIN)
- PlatformEvent::Type eventType = PlatformEvent::MouseReleased;
-#else
PlatformEvent::Type eventType = PlatformEvent::MousePressed;
-#endif
+ if (m_frame->settings()->showContextMenuOnMouseUp())
+ eventType = PlatformEvent::MouseReleased;
PlatformMouseEvent mouseEvent(position, globalPosition, RightButton, eventType, 1, false, false, false, false, PlatformMouseEvent::RealOrIndistinguishable, WTF::currentTime());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698