Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
index b5c1dda24e90c95843c812982ca998fafeec7b74..ef9f70f900b3bfe002f3c28b1393310ccb62d128 100644 |
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
@@ -1070,16 +1070,18 @@ WebInputEventResult WebFrameWidgetImpl::handleKeyEvent(const WebKeyboardEvent& e |
} |
#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)) { |
view()->sendContextMenuEvent(event); |
return WebInputEventResult::HandledSystem; |
} |