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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 23654015: Avoid using !OS() constructs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix merge Created 7 years, 3 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/web/WebFrameImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index a547faa892b2efc528a7301c19e1c5f558cca7cb..ecf5f17f624f6ebd6aebd69ba936445da73bfed2 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -552,13 +552,14 @@ void WebViewImpl::handleMouseDown(Frame& mainFrame, const WebMouseEvent& event)
}
// Dispatch the contextmenu event regardless of if the click was swallowed.
+#if OS(WIN)
// On Windows, we handle it on mouse up, not down.
-#if OS(MACOSX)
+#elif OS(MACOSX)
if (event.button == WebMouseEvent::ButtonRight
|| (event.button == WebMouseEvent::ButtonLeft
&& event.modifiers & WebMouseEvent::ControlKey))
mouseContextMenu(event);
-#elif OS(POSIX)
+#else
if (event.button == WebMouseEvent::ButtonRight)
mouseContextMenu(event);
#endif
@@ -937,7 +938,7 @@ bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
const WebInputEvent::Type contextMenuTriggeringEventType =
#if OS(WIN)
WebInputEvent::KeyUp;
-#elif OS(POSIX)
+#else
WebInputEvent::RawKeyDown;
#endif
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698