[webkit-dev] Sending Composition events to Flash

Hironori Bono (坊野 博典) hbono at chromium.org
Fri Jul 22 00:29:40 PDT 2011

Greetings WebKit developers,

These days, I have been working for allowing users to use IMEs on
windowless Flash on Win Safari and Win Chromium:
<http://webkit.org/b/64345> and <http://webkit.org/b/61272>. To
describe this change briefly, these changes just send Composition
events of DOM 3 (*1) to a plug-in element so the PluginView class can
WM_IME_ENDCOMPOSITION) messages of Windows to Flash. (Flash calls
Win32 functions to get IME text when it receives these messages.)
Unfortunately, the current changes needed to copy some code (which
sends Composition events to a plug-in element) from
Editor::setComposition() to each platform-specific WebView code even
though the code itself is not platform-specific. (It calls
CompositionEvent::create() with text required by Flash and send it.)
This is just because their WebView code returns when Editor::canEdit()
returns false. (From the point of WebKit, a plug-in element is not
editable.) To share their WebView code, I would like to change
Editor::setComposition() so it sends Composition events and returns
when the focused node is not editable. Also would I like to add a
PlatformCompositionEvent class so CompositionEvent::create() can use
it. Would it be possible to give me your thoughts?

(*1) <http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents>


Hironori Bono
E-mail: hbono at chromium.org

More information about the webkit-dev mailing list