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

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

Issue 2370663002: Remove logic to reset input method more than needed (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java » ('j') | 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_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index edb16bd7d4038cae87acdbd8598bc84efbfa3da3..4a67b6025fdb8b0109c361a15756df89f395c5a3 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2981,6 +2981,12 @@ void RenderWidgetHostViewAura::OnUpdateTextInputStateCalled(
last_active_widget->Send(new InputMsg_RequestCompositionUpdate(
last_active_widget->GetRoutingID(), false /* immediate request */,
true /* monitor request */));
+ if (has_composition_text_ && state->composition_start == -1) {
aelias_OOO_until_Jul13 2016/09/26 21:25:59 Code in RenderWidgetHostViewAura only executes on
Changwan Ryu 2016/09/27 03:00:12 http://crbug.com/164427#c16 was the reason why it
aelias_OOO_until_Jul13 2016/09/27 04:39:47 OK, understood, but the history (including the lin
+ // JS-triggered change caused composition to be lost.
+ // TODO(changwan): add a unit test.
+ GetInputMethod()->CancelComposition(this);
+ has_composition_text_ = false;
+ }
} else {
// Stop monitoring the composition information if the focused node is not
// editable.
« no previous file with comments | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698