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:
Marshall Greenblatt 2012-01-13 21:55:24 +00:00
parent 589ec0a4e3
commit c028cc796e
3 changed files with 40 additions and 3 deletions

View File

@ -37,4 +37,10 @@ patches = [
'path': '../third_party/WebKit/Source/WebCore/',
'condition': 'CEF_SPI_BUILD',
},
{
# http://code.google.com/p/chromiumembedded/issues/detail?id=477
'name': 'spi_npapi_477',
'path': '../webkit/plugins/npapi/',
'condition': 'CEF_SPI_BUILD',
},
]

View 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

View File

@ -1,8 +1,8 @@
Index: page/FrameView.cpp
===================================================================
--- page/FrameView.cpp (revision 97950)
--- page/FrameView.cpp (revision 102901)
+++ page/FrameView.cpp (working copy)
@@ -152,10 +152,12 @@
@@ -156,10 +156,12 @@
m_page = page;
m_page->addScrollableArea(this);
@ -17,7 +17,7 @@ Index: page/FrameView.cpp
}
Index: platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm
===================================================================
--- platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm (revision 97950)
--- platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm (revision 102901)
+++ platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm (working copy)
@@ -356,9 +356,13 @@