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

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

Issue 1995333002: Handle newCursorPosition correctly for Android's commitText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split confirmComposition into 2 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
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 c681785cb705010ce713840ddd9c68ad69bc198e..b430e31c1fbaf6c4cf2ab8f868213ee58be4242e 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1365,8 +1365,7 @@ void RenderWidgetHostViewAura::SetCompositionText(
void RenderWidgetHostViewAura::ConfirmCompositionText() {
if (text_input_manager_ && text_input_manager_->GetActiveWidget() &&
has_composition_text_) {
- text_input_manager_->GetActiveWidget()->ImeConfirmComposition(
- base::string16(), gfx::Range::InvalidRange(), false);
+ text_input_manager_->GetActiveWidget()->ImeFinishComposingText(false);
}
has_composition_text_ = false;
}
@@ -1382,8 +1381,8 @@ void RenderWidgetHostViewAura::InsertText(const base::string16& text) {
DCHECK_NE(GetTextInputType(), ui::TEXT_INPUT_TYPE_NONE);
if (text_input_manager_ && text_input_manager_->GetActiveWidget()) {
- text_input_manager_->GetActiveWidget()->ImeConfirmComposition(
- text, gfx::Range::InvalidRange(), false);
+ text_input_manager_->GetActiveWidget()->ImeCommitText(
aelias_OOO_until_Jul13 2016/09/07 05:02:40 Please do "if (text.empty()) ImeFinishComposingTex
yabinh 2016/09/07 10:27:14 Done. Also added a new test for that.
+ text, gfx::Range::InvalidRange(), 0);
}
has_composition_text_ = false;
}
@@ -2490,8 +2489,7 @@ void RenderWidgetHostViewAura::FinishImeCompositionSession() {
return;
if (!!text_input_manager_ && !!text_input_manager_->GetActiveWidget()) {
- text_input_manager_->GetActiveWidget()->ImeConfirmComposition(
- base::string16(), gfx::Range::InvalidRange(), false);
+ text_input_manager_->GetActiveWidget()->ImeFinishComposingText(false);
}
ImeCancelComposition();
}

Powered by Google App Engine
This is Rietveld 408576698