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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2122053003: Shift+F10 should open Context Menu regardless the state of NumLock/CapsLock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 831
832 #if !OS(MACOSX) 832 #if !OS(MACOSX)
833 const WebInputEvent::Type contextMenuTriggeringEventType = 833 const WebInputEvent::Type contextMenuTriggeringEventType =
834 #if OS(WIN) 834 #if OS(WIN)
835 WebInputEvent::KeyUp; 835 WebInputEvent::KeyUp;
836 #else 836 #else
837 WebInputEvent::RawKeyDown; 837 WebInputEvent::RawKeyDown;
838 #endif 838 #endif
839 839
840 bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers ) && event.windowsKeyCode == VKEY_APPS; 840 bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers ) && event.windowsKeyCode == VKEY_APPS;
841 bool isShiftF10 = event.modifiers == WebInputEvent::ShiftKey && event.window sKeyCode == VKEY_F10; 841 bool isShiftF10 = (event.modifiers & WebInputEvent::InputModifiers) == WebIn putEvent::ShiftKey && event.windowsKeyCode == VKEY_F10;
842 if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeri ngEventType) { 842 if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeri ngEventType) {
843 view()->sendContextMenuEvent(event); 843 view()->sendContextMenuEvent(event);
844 return WebInputEventResult::HandledSystem; 844 return WebInputEventResult::HandledSystem;
845 } 845 }
846 #endif // !OS(MACOSX) 846 #endif // !OS(MACOSX)
847 847
848 return keyEventDefault(event); 848 return keyEventDefault(event);
849 } 849 }
850 850
851 WebInputEventResult WebFrameWidgetImpl::handleCharEvent(const WebKeyboardEvent& event) 851 WebInputEventResult WebFrameWidgetImpl::handleCharEvent(const WebKeyboardEvent& event)
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 1118
1119 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) 1119 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame)
1120 { 1120 {
1121 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); 1121 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame));
1122 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); 1122 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
1123 result.setToShadowHostIfInUserAgentShadowRoot(); 1123 result.setToShadowHostIfInUserAgentShadowRoot();
1124 return result; 1124 return result;
1125 } 1125 }
1126 1126
1127 } // namespace blink 1127 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698