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

Unified Diff: webkit/glue/webview_impl.cc

Issue 164131: A Chrome-side fix for Issue 18232.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webview_impl.cc
===================================================================
--- webkit/glue/webview_impl.cc (revision 22890)
+++ webkit/glue/webview_impl.cc (working copy)
@@ -595,11 +595,10 @@
if (!handler)
return KeyEventDefault(event);
-#if defined(OS_WIN)
- // TODO(pinkerton): figure out these keycodes on non-windows
- if (((event.modifiers == 0) && (event.windowsKeyCode == VK_APPS)) ||
+#if defined(OS_WIN) || defined(OS_LINUX)
+ if (((event.modifiers == 0) && (event.windowsKeyCode == VKEY_APPS)) ||
((event.modifiers == WebInputEvent::ShiftKey) &&
- (event.windowsKeyCode == VK_F10))) {
+ (event.windowsKeyCode == VKEY_F10))) {
SendContextMenuEvent(event);
return true;
}
@@ -730,7 +729,7 @@
* This function is an ugly copy/paste and should be cleaned up when the
* WebKitWin version is cleaned: https://bugs.webkit.org/show_bug.cgi?id=20438
*/
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
// TODO(pinkerton): implement on non-windows
bool WebViewImpl::SendContextMenuEvent(const WebKeyboardEvent& event) {
static const int kContextMenuMargin = 1;
@@ -740,7 +739,11 @@
return false;
IntPoint coords(-1, -1);
+#if defined(OS_WIN)
int right_aligned = ::GetSystemMetrics(SM_MENUDROPALIGNMENT);
+#else
+ int right_aligned = 0;
+#endif
IntPoint location;
// The context menu event was generated from the keyboard, so show the
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698