Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: content/browser/renderer_host/render_widget_host_view_event_handler.cc

Issue 2912473002: Fix an IME bug where RWHImpl::ImeFinishCompositingText is called twice in a row (Closed)
Patch Set: Change EXPECT_EQ => ASSERT_EQ Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_event_handler.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_event_handler.cc b/content/browser/renderer_host/render_widget_host_view_event_handler.cc
index 0401ce699cc82e53ffd698e046c6a9d32fac574a..f0c1e1cbb08940c969609a249cd5d1efebbe7c67 100644
--- a/content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ b/content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -626,12 +626,11 @@ bool RenderWidgetHostViewEventHandler::CanRendererHandleEvent(
}
void RenderWidgetHostViewEventHandler::FinishImeCompositionSession() {
- if (!host_view_->GetTextInputClient()->HasCompositionText())
- return;
-
- TextInputManager* text_input_manager = host_view_->GetTextInputManager();
- if (!!text_input_manager && !!text_input_manager->GetActiveWidget())
- text_input_manager->GetActiveWidget()->ImeFinishComposingText(false);
+ // RenderWidgetHostViewAura keeps track of existing composition texts. The
+ // call to finish composition text should be made through the RWHVA itself
+ // otherwise the following call to cancel composition will lead to an extra
+ // IPC for finishing the ongoing composition (see https://crbug.com/723024).
+ host_view_->GetTextInputClient()->ConfirmCompositionText();
host_view_->ImeCancelComposition();
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698