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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 155207: A quick fix for Issue 15971.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_view_gtk.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_gtk.cc (revision 20223)
+++ chrome/browser/renderer_host/render_widget_host_view_gtk.cc (working copy)
@@ -145,15 +145,16 @@
// 2. The given key event is not a control-key event but printable
// characters aren't assigned to the event, (e.g. alt+d, etc.)
// Create a Char event manually from this key event and send it to the
- // renderer only when this event is a control-key event because
- // control-key events should be processed by WebKit.
+ // renderer when this Char event contains a printable character which
+ // should be processed by WebKit.
// TODO(hbono): Windows Chrome sends a Char event with its isSystemKey
// value true for the above case 2. We should emulate this behavior?
if (event->type == GDK_KEY_PRESS &&
!gdk_keyval_to_unicode(event->keyval)) {
NativeWebKeyboardEvent wke(event);
wke.type = WebKit::WebInputEvent::Char;
- host_view->GetRenderWidgetHost()->ForwardKeyboardEvent(wke);
+ if (wke.text[0])
+ host_view->GetRenderWidgetHost()->ForwardKeyboardEvent(wke);
}
}
« 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