diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 17:05:48 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 17:05:48 +0000 |
commit | e8f962fba800ac454b98fcfb5b44f4b34c62fd53 (patch) | |
tree | e8a4e2cf1a987e94b37bc450bda4311c856f75e4 | |
parent | 5c377afd619d6cb41030cf05662c11cabb9b6595 (diff) | |
download | chromium_src-e8f962fba800ac454b98fcfb5b44f4b34c62fd53.zip chromium_src-e8f962fba800ac454b98fcfb5b44f4b34c62fd53.tar.gz chromium_src-e8f962fba800ac454b98fcfb5b44f4b34c62fd53.tar.bz2 |
Add character data to NPCocoaEvent key events
BUG=29746
TEST=None
Review URL: http://codereview.chromium.org/474007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34158 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_mac.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm index b00032e..e20b915 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm +++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm @@ -656,6 +656,12 @@ static bool NPCocoaEventFromWebKeyboardEvent(const WebKeyboardEvent& event, NPCocoaEvent *np_cocoa_event) { np_cocoa_event->data.key.keyCode = event.nativeKeyCode; + np_cocoa_event->data.key.characters = reinterpret_cast<NPNSString*>( + [NSString stringWithFormat:@"%S", event.text]); + np_cocoa_event->data.key.charactersIgnoringModifiers = + reinterpret_cast<NPNSString*>( + [NSString stringWithFormat:@"%S", event.unmodifiedText]); + if (event.modifiers & WebInputEvent::ControlKey) np_cocoa_event->data.key.modifierFlags |= controlKey; if (event.modifiers & WebInputEvent::ShiftKey) |