mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Mac: Add work-around for windowless flash plugins do not get keyboard input in text fields (issue #477).
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/963@465 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
31
patch/patches/spi_npapi_477.patch
Normal file
31
patch/patches/spi_npapi_477.patch
Normal file
@ -0,0 +1,31 @@
|
||||
Index: webplugin_delegate_impl_mac.mm
|
||||
===================================================================
|
||||
--- webplugin_delegate_impl_mac.mm (revision 114933)
|
||||
+++ webplugin_delegate_impl_mac.mm (working copy)
|
||||
@@ -548,10 +548,14 @@
|
||||
// Composition ends on a keydown, so ime_enabled_ will be false at keyup;
|
||||
// because the keydown wasn't sent to the plugin, the keyup shouldn't be
|
||||
// either (per the spec).
|
||||
- if (event.type == WebInputEvent::KeyDown)
|
||||
+ if (event.type == WebInputEvent::KeyDown) {
|
||||
++keyup_ignore_count_;
|
||||
- else
|
||||
+ const WebKeyboardEvent* key_event =
|
||||
+ static_cast<const WebKeyboardEvent*>(&event);
|
||||
+ ImeCompositionCompleted(key_event->text);
|
||||
+ } else {
|
||||
--keyup_ignore_count_;
|
||||
+ }
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -640,6 +644,9 @@
|
||||
event.type == WebInputEvent::KeyDown) {
|
||||
StartIme();
|
||||
++keyup_ignore_count_;
|
||||
+ const WebKeyboardEvent* key_event =
|
||||
+ static_cast<const WebKeyboardEvent*>(&event);
|
||||
+ ImeCompositionCompleted(key_event->text);
|
||||
}
|
||||
|
||||
// Plugins don't give accurate information about whether or not they handled
|
Reference in New Issue
Block a user