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

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

Issue 1995333002: Handle newCursorPosition correctly for Android's commitText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: content/browser/renderer_host/ime_adapter_android.cc
diff --git a/content/browser/renderer_host/ime_adapter_android.cc b/content/browser/renderer_host/ime_adapter_android.cc
index f41ebefe1cea3797505f2f0a3b3c1ac8d0031872..97403d1bcd4bba66fa61b02bc406d969a2e6a175 100644
--- a/content/browser/renderer_host/ime_adapter_android.cc
+++ b/content/browser/renderer_host/ime_adapter_android.cc
@@ -213,13 +213,15 @@ void ImeAdapterAndroid::SetComposingText(JNIEnv* env,
void ImeAdapterAndroid::CommitText(JNIEnv* env,
const JavaParamRef<jobject>&,
- const JavaParamRef<jstring>& text_str) {
+ const JavaParamRef<jstring>& text_str,
+ int new_cursor_pos) {
RenderWidgetHostImpl* rwhi = GetRenderWidgetHostImpl();
if (!rwhi)
return;
base::string16 text16 = ConvertJavaStringToUTF16(env, text_str);
- rwhi->ImeConfirmComposition(text16, gfx::Range::InvalidRange(), false);
+ rwhi->ImeConfirmComposition(text16, gfx::Range::InvalidRange(), false,
+ new_cursor_pos);
}
void ImeAdapterAndroid::FinishComposingText(JNIEnv* env,

Powered by Google App Engine
This is Rietveld 408576698