Mac: Fix OnKeyEvent() notification (issue #366).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@303 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-10-06 14:45:36 +00:00
parent 6b134b4def
commit 96f73aadc3
1 changed files with 2 additions and 0 deletions

View File

@ -244,6 +244,7 @@ void WebWidgetHost::WheelEvent(NSEvent *event) {
void WebWidgetHost::KeyEvent(NSEvent *event) {
WebKeyboardEvent keyboard_event(WebInputEventFactory::keyboardEvent(event));
last_key_event_ = keyboard_event;
webwidget_->handleInputEvent(keyboard_event);
if ([event type] == NSKeyDown &&
!([event modifierFlags] & NSNumericPadKeyMask)) {
@ -252,6 +253,7 @@ void WebWidgetHost::KeyEvent(NSEvent *event) {
// TODO(hbono): Bug 20852 <http://crbug.com/20852> implement the
// NSTextInput protocol and remove this code.
keyboard_event.type = WebInputEvent::Char;
last_key_event_ = keyboard_event;
webwidget_->handleInputEvent(keyboard_event);
}
}