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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2160983003: [ContextMenu] Shift+F10 should trigger contextmenu on keydown to match system behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index cc1644a90af5e34b02a20f20af01f80eb3521126..8ddc110dd0380dfcb85eddfcc973c9fa5b59af3d 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -1126,16 +1126,18 @@ WebInputEventResult WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
}
#if !OS(MACOSX)
- const WebInputEvent::Type contextMenuTriggeringEventType =
+ const WebInputEvent::Type contextMenuKeyTriggeringEventType =
#if OS(WIN)
WebInputEvent::KeyUp;
#else
WebInputEvent::RawKeyDown;
#endif
+ const WebInputEvent::Type shiftF10TriggeringEventType = WebInputEvent::RawKeyDown;
bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers) && event.windowsKeyCode == VKEY_APPS;
bool isShiftF10 = (event.modifiers & WebInputEvent::InputModifiers) == WebInputEvent::ShiftKey && event.windowsKeyCode == VKEY_F10;
- if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeringEventType) {
+ if ((isUnmodifiedMenuKey && event.type == contextMenuKeyTriggeringEventType)
+ || (isShiftF10 && event.type == shiftF10TriggeringEventType)) {
sendContextMenuEvent(event);
return WebInputEventResult::HandledSystem;
}
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698