Hi reviewers,
This is the chromium part of enabling Input Methods for
browser_plugin (e.g. <webview>).
nona@chromium.org: Please review if the coverage of
IME-related IPCs are good enough.
fsamuel@chromium.org: Please review changes in browser_plugin code.
sadrul@chromium.org: Please review changes in RWHV* code as OWNERS,
once this gets LGTM from nona & fsamuel.
cevans@chromium.org: Please review changes in
browser_plugin_messages.h.
Will lg tm when you add a browser test. Thanks! https://codereview.chromium.org/103403006/diff/70001/content/browser/renderer_host/render_widget_host_view_guest.cc File content/browser/renderer_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/103403006/diff/70001/content/browser/renderer_host/render_widget_host_view_guest.cc#newcode339 ...
I'll work on adding a browser test today, and ask you another review. Thanks! https://codereview.chromium.org/103403006/diff/70001/content/browser/renderer_host/render_widget_host_view_guest.cc ...
https://codereview.chromium.org/103403006/diff/80001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (right): https://codereview.chromium.org/103403006/diff/80001/content/browser/browser_plugin/browser_plugin_guest.cc#newcode1788 content/browser/browser_plugin/browser_plugin_guest.cc:1788: render_widget_host->ChangeTextInputType(type, input_mode, can_compose_inline); If I am following the code ...
https://codereview.chromium.org/103403006/diff/80001/content/browser/browser_...
File content/browser/browser_plugin/browser_plugin_guest.cc (right):
https://codereview.chromium.org/103403006/diff/80001/content/browser/browser_...
content/browser/browser_plugin/browser_plugin_guest.cc:1788:
render_widget_host->ChangeTextInputType(type, input_mode, can_compose_inline);
If I am following the code correctly: this calls
RenderWidgetHostImpl::ChangeTextInputType ->
RenderWidgetHostViewGuest::TextInputTypeChanged -> RenderWidgetHostView* (of the
embedder)::TextInputTypeChanged. Is that right? If so, why do you need the
changes in RenderWidgetHostImpl? Why not directly call into
RWHVGuest::TextInputTypeChanged() from here?
kochi
Thanks for the review! https://codereview.chromium.org/103403006/diff/80001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (right): https://codereview.chromium.org/103403006/diff/80001/content/browser/browser_plugin/browser_plugin_guest.cc#newcode1788 content/browser/browser_plugin/browser_plugin_guest.cc:1788: render_widget_host->ChangeTextInputType(type, input_mode, can_compose_inline); On 2013/12/11 ...
Thanks for the review!
https://codereview.chromium.org/103403006/diff/80001/content/browser/browser_...
File content/browser/browser_plugin/browser_plugin_guest.cc (right):
https://codereview.chromium.org/103403006/diff/80001/content/browser/browser_...
content/browser/browser_plugin/browser_plugin_guest.cc:1788:
render_widget_host->ChangeTextInputType(type, input_mode, can_compose_inline);
On 2013/12/11 07:01:00, sadrul wrote:
> If I am following the code correctly: this calls
> RenderWidgetHostImpl::ChangeTextInputType ->
> RenderWidgetHostViewGuest::TextInputTypeChanged -> RenderWidgetHostView* (of
the
> embedder)::TextInputTypeChanged. Is that right? If so, why do you need the
> changes in RenderWidgetHostImpl? Why not directly call into
> RWHVGuest::TextInputTypeChanged() from here?
Yes your understanding is correct, and as your suggestion looks better, adopted
the idea.
sadrul
cool. The change in RenderWidgetHostViewGuest looks reasonable to me. I will stamp after reviews from ...
cool. The change in RenderWidgetHostViewGuest looks reasonable to me. I will
stamp after reviews from fsamuel@/nona@. In the meantime, is there a good way to
test this?
kochi
On 2013/12/11 08:35:09, sadrul wrote: > cool. The change in RenderWidgetHostViewGuest looks reasonable to me. ...
On 2013/12/11 08:35:09, sadrul wrote:
> cool. The change in RenderWidgetHostViewGuest looks reasonable to me. I will
> stamp after reviews from fsamuel@/nona@. In the meantime, is there a good way
to
> test this?
I'm working on adding a test in browser_plugin_host_browsertest.cc.
Basically I'm considering sending ViewMsg_ImeSetComposition etc. and check if
the messages are handled
in guest.
kochi
Hi Fady, I added a browsertest, which fails yet. I must be misunderstanding the layering ...
Hi Fady,
I added a browsertest, which fails yet.
I must be misunderstanding the layering of browser_plugin...
I expected that when I sent ImeSetCompositoin message to
embedder's RWH, it gets sent to the default renderer, then
redirected back to browser_plugin_guest, but it is not.
Seigo Nonaka
Following IPCs are used in Desktop IME implementation. ViewHostMsg_ImeCancelComposition ViewHostMsg_SelectionChanged, ViewHostMsg_SelectionBoundsChanged, ViewHostMsg_TextInputTypeChanged ViewMsg_ImeSetComposition, ViewMsg_ImeConfirmComposition, ViewMsg_SetInputMethodActive, ...
Following IPCs are used in Desktop IME implementation.
ViewHostMsg_ImeCancelComposition
ViewHostMsg_SelectionChanged,
ViewHostMsg_SelectionBoundsChanged,
ViewHostMsg_TextInputTypeChanged
ViewMsg_ImeSetComposition,
ViewMsg_ImeConfirmComposition,
ViewMsg_SetInputMethodActive, // not sure this is alive or not. probably
yukawa@ know this.
I can not see SelectionBoundsChanged/SelectionChanged/SetInputMethodActive IPC
handling.
Are these already supported? or just not necessary for browser plugin?
Thank you.
kochi
Thanks for the information. On 2013/12/12 04:19:55, Seigo Nonaka wrote: > Following IPCs are used ...
Thanks for the information.
On 2013/12/12 04:19:55, Seigo Nonaka wrote:
> Following IPCs are used in Desktop IME implementation.
>
> ViewHostMsg_ImeCancelComposition
> ViewHostMsg_SelectionChanged,
> ViewHostMsg_SelectionBoundsChanged,
> ViewHostMsg_TextInputTypeChanged
>
> ViewMsg_ImeSetComposition,
> ViewMsg_ImeConfirmComposition,
> ViewMsg_SetInputMethodActive, // not sure this is alive or not. probably
> yukawa@ know this.
>
> I can not see SelectionBoundsChanged/SelectionChanged/SetInputMethodActive IPC
> handling.
> Are these already supported? or just not necessary for browser plugin?
The browser plugin sets SetInputMethodActive to true at initialization, and
it is always true. So this is not a problem.
SelectionBoundsChanged is already handled in RenderWidgetHostViewGuest (just
forwards
the IPC to embedder).
For SelectionChanged, changed in patchset9 so that it is handled in the same
manner
as other IME related IPCs.
> Thank you.
kochi
On 2013/12/11 11:19:09, Takayoshi Kochi wrote: > Hi Fady, > > I added a browsertest, ...
On 2013/12/11 11:19:09, Takayoshi Kochi wrote:
> Hi Fady,
>
> I added a browsertest, which fails yet.
>
> I must be misunderstanding the layering of browser_plugin...
> I expected that when I sent ImeSetCompositoin message to
> embedder's RWH, it gets sent to the default renderer, then
> redirected back to browser_plugin_guest, but it is not.
This was because the <object id=plugin> element in browser_plugin_embedder.html
was not getting focus. To make it work properly, I had to add
$('plugin').focus()
to the test, then it worked as expected.
I was assuming that if the browser_plugin content gets focus by mouse, the
embedding
HTML's <object> element is also focused, and WebViewImpl.cpp was written
assuming
this behavior.
I don't think scripted focus() on guest content must propagate its focus
to embedding element, but what is expected behavior of this case?
Seigo Nonaka
Sorry I forgot one thing. ViewMsg_ExtendSelectionAndDelete should be also supported which is probably used by ...
Adding more reviewers for browser_plugin_messages.h.
Can anyone take a look?
Added 3 messages are basically identical to their corresponding ViewMsg_*, just
for redirecting the message
back to browser_plugin_guest.
kochi
https://codereview.chromium.org/103403006/diff/290001/content/browser/renderer_host/render_widget_host_view_guest.cc File content/browser/renderer_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/103403006/diff/290001/content/browser/renderer_host/render_widget_host_view_guest.cc#newcode333 content/browser/renderer_host/render_widget_host_view_guest.cc:333: } Self-review: This part was missing. As in SelectionBoundsChanged() ...
Issue 103403006: Implement Input Method related WebPlugin interface for browser plugin
(Closed)
Created 7 years ago by kochi
Modified 7 years ago
Reviewers: Fady Samuel, sadrul, Chris Evans, Seigo Nonaka, Cris Neckar, inferno, DO NOT USE (jschuh), Tom Sepez, kenrb
Base URL: svn://svn.chromium.org/chrome/trunk/src
Comments: 15