RenderWidgetHostImpl::ImeFinishComposingText is called twice in response to mouse event |
|||||
Issue descriptionChrome Version: 60.0.3101.0 OS: Win/Linux What steps will reproduce the problem? (1) Enable Japanese IME. (2) Enter some characters (do not commit). (3) Click somewhere. What is the expected result? One call to RenderWidgetHostImpl::ImeFinishComposingText is made. What happens instead? The method is called twice. For graphics-related bugs, please copy/paste the contents of the about:gpu page at the end of this report.
,
May 25 2017
,
May 25 2017
,
May 25 2017
,
May 25 2017
I think actually the right fix is to call: https://cs.chromium.org/chromium/src/content/browser/renderer_host/render_widget_host_view_aura.cc?rcl=4e9fc10cf30e41afad38069847381cd725c2acbe&l=1198 My understanding is that it is never a good idea to call IME methods directly on the RWH. We should always go through the page's RWHV since they are responsible for IME (coordination across widgets on page, internal IME state, etc.).
,
Jun 2 2017
Incorrect bug number in the CL. Posting manually: Fix an IME bug where RWHImpl::ImeFinishCompositingText is called twice in a row When a mouse click is received during an on going IME composition, the RenderWidgetHostViewEventHandler finishes the composition and also cancels the composition at the InputMethod side. This is done through calling ImeFinishComposingText on the focused widget and then notifying the input method. This however undermines the fact that RenderWidgetHostViewAura/TextInputClient keeps track of different IME states internally, such as |has_composition_text_|. Therefore, the correct practice should be to route all IME events through TextInputClient instead (as opposed to sending the IPC directly). In the case of this bug, calling RenderWidgetHostImpl::ImeFinishComposingText will not reset the |has_composition_text_| flag inside RWHVAura and hecne, later calling ImeCancelComposition (to cancel the composition on the InputMethod side) will lead to yet another IPC for ImeFinishComposingText. BUG= 723024 Review-Url: https://codereview.chromium.org/2912473002 Cr-Commit-Position: refs/heads/master@{#475908} Committed: https://chromium.googlesource.com/chromium/src/+/428a2f9eb3e0e72bac3ef401fe7e1a13e2009e75
,
Jun 2 2017
Marking as fixed based on comment #6. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by ekaramad@chromium.org
, May 16 2017