diff options
author | yusufo@chromium.org <yusufo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-20 03:46:21 +0000 |
---|---|---|
committer | yusufo@chromium.org <yusufo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-20 03:46:21 +0000 |
commit | 105dffb48c7035e19144347625e796cc7f9d8fe1 (patch) | |
tree | b836ab13a56eb50e79786208961a78ecd6dd477e /content/browser/renderer_host/ime_adapter_android.cc | |
parent | 52d21b5f018328b67b737febb9566bfc516883f3 (diff) | |
download | chromium_src-105dffb48c7035e19144347625e796cc7f9d8fe1.zip chromium_src-105dffb48c7035e19144347625e796cc7f9d8fe1.tar.gz chromium_src-105dffb48c7035e19144347625e796cc7f9d8fe1.tar.bz2 |
Ignore textInputState updates during a batch edit
According to the Android spec, when the Ime is in a batchEdit we should not
be calling updateSelection which we currently do through the setEditableText call.
This calls gets triggered by updateTextInputState calls coming from the
render_widget. This patch adds one browser->renderer and one renderer-> browser
IPC so that the Java IME adapter can distinguish between updates coming during a
batch edit and ignore them properly.
BUG=172845
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12262026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/ime_adapter_android.cc')
-rw-r--r-- | content/browser/renderer_host/ime_adapter_android.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/browser/renderer_host/ime_adapter_android.cc b/content/browser/renderer_host/ime_adapter_android.cc index ee622bd..c5c4ad8 100644 --- a/content/browser/renderer_host/ime_adapter_android.cc +++ b/content/browser/renderer_host/ime_adapter_android.cc @@ -153,6 +153,16 @@ void ImeAdapterAndroid::SetComposingText(JNIEnv* env, jobject, jstring text, rwhi->ImeSetComposition(text16, underlines, new_cursor_pos, new_cursor_pos); } +void ImeAdapterAndroid::ImeBatchStateChanged(JNIEnv* env, + jobject, + jboolean is_begin) { + RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From( + rwhva_->GetRenderWidgetHost()); + if (!rwhi) + return; + + rwhi->Send(new ViewMsg_ImeBatchStateChanged(rwhi->GetRoutingID(), is_begin)); +} void ImeAdapterAndroid::CommitText(JNIEnv* env, jobject, jstring text) { RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From( |