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

Unified Diff: webkit/tools/test_shell/mac/webwidget_host.mm

Issue 183027: A quick fix for Issue 20161... (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/tools/test_shell/mac/webwidget_host.mm
===================================================================
--- webkit/tools/test_shell/mac/webwidget_host.mm (revision 25293)
+++ webkit/tools/test_shell/mac/webwidget_host.mm (working copy)
@@ -255,7 +255,15 @@
}
void WebWidgetHost::KeyEvent(NSEvent *event) {
- webwidget_->handleInputEvent(WebInputEventFactory::keyboardEvent(event));
+ WebKeyboardEvent keyboard_event(WebInputEventFactory::keyboardEvent(event));
+ webwidget_->handleInputEvent(keyboard_event);
+ if ([event type] == NSKeyDown) {
+ // Send a Char event here to emulate the keyboard events.
+ // TODO(hbono): Bug 20852 <http://crbug.com/20852> implement the
+ // NSTextInput protocol and remove this code.
+ keyboard_event.type = WebInputEvent::Char;
+ webwidget_->handleInputEvent(keyboard_event);
+ }
}
void WebWidgetHost::SetFocus(bool enable) {
« 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