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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.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
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 1127
1128 #if !OS(MACOSX) 1128 #if !OS(MACOSX)
1129 const WebInputEvent::Type contextMenuTriggeringEventType = 1129 const WebInputEvent::Type contextMenuTriggeringEventType =
1130 #if OS(WIN) 1130 #if OS(WIN)
1131 WebInputEvent::KeyUp; 1131 WebInputEvent::KeyUp;
1132 #else 1132 #else
1133 WebInputEvent::RawKeyDown; 1133 WebInputEvent::RawKeyDown;
1134 #endif 1134 #endif
1135 1135
1136 bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers ) && event.windowsKeyCode == VKEY_APPS; 1136 bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers ) && event.windowsKeyCode == VKEY_APPS;
1137 bool isShiftF10 = event.modifiers == WebInputEvent::ShiftKey && event.window sKeyCode == VKEY_F10; 1137 bool isShiftF10 = (event.modifiers & WebInputEvent::InputModifiers) == WebIn putEvent::ShiftKey && event.windowsKeyCode == VKEY_F10;
1138 if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeri ngEventType) { 1138 if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeri ngEventType) {
1139 sendContextMenuEvent(event); 1139 sendContextMenuEvent(event);
1140 return WebInputEventResult::HandledSystem; 1140 return WebInputEventResult::HandledSystem;
1141 } 1141 }
1142 #endif // !OS(MACOSX) 1142 #endif // !OS(MACOSX)
1143 1143
1144 if (keyEventDefault(event)) 1144 if (keyEventDefault(event))
1145 return WebInputEventResult::HandledSystem; 1145 return WebInputEventResult::HandledSystem;
1146 return WebInputEventResult::NotHandled; 1146 return WebInputEventResult::NotHandled;
1147 } 1147 }
(...skipping 3385 matching lines...) Expand 10 before | Expand all | Expand 10 after
4533 { 4533 {
4534 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4534 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4535 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4535 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4536 if (!page()) 4536 if (!page())
4537 return 1; 4537 return 1;
4538 4538
4539 return page()->deviceScaleFactor(); 4539 return page()->deviceScaleFactor();
4540 } 4540 }
4541 4541
4542 } // namespace blink 4542 } // namespace blink
OLDNEW
« 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