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

Unified Diff: webkit/tools/test_shell/webwidget_host_gtk.cc

Issue 28186: Reverting key change (again); this breaks every keyboard layout test there is... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « webkit/tools/test_shell/mac/webwidget_host.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/webwidget_host_gtk.cc
===================================================================
--- webkit/tools/test_shell/webwidget_host_gtk.cc (revision 10468)
+++ webkit/tools/test_shell/webwidget_host_gtk.cc (working copy)
@@ -148,6 +148,16 @@
WebKeyboardEvent wke(event);
host->webwidget()->HandleInputEvent(&wke);
+ // The WebKeyboardEvent model, when holding down a key, is:
+ // KEY_DOWN, CHAR, (repeated CHAR as key repeats,) KEY_UP
+ // The GDK model for the same sequence is just:
+ // KEY_PRESS, (repeated KEY_PRESS as key repeats,) KEY_RELEASE
+ // So we must simulate a CHAR event for every key press.
+ if (event->type == GDK_KEY_PRESS) {
+ wke.type = WebKeyboardEvent::CHAR;
+ host->webwidget()->HandleInputEvent(&wke);
+ }
+
return FALSE;
}
« no previous file with comments | « webkit/tools/test_shell/mac/webwidget_host.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698