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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java

Issue 2210533004: Revert of Do not calculate composition bounds until IME requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
index e066eac062325a014e371c5a1d0a3b8890cce330..c52b32457b7907883dd501925ab411e3f2c5b903 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
@@ -18,7 +18,6 @@
import android.view.View;
import android.view.inputmethod.BaseInputConnection;
import android.view.inputmethod.EditorInfo;
-import android.view.inputmethod.InputConnection;
import org.chromium.base.Log;
import org.chromium.base.VisibleForTesting;
@@ -193,15 +192,8 @@
mViewEmbedder.getAttachedView(), this, mTextInputType, mTextInputFlags,
mLastSelectionStart, mLastSelectionEnd, outAttrs));
if (DEBUG_LOGS) Log.w(TAG, "onCreateInputConnection: " + mInputConnection);
-
if (mCursorAnchorInfoController != null) {
- mCursorAnchorInfoController.onRequestCursorUpdates(
- false /* not an immediate request */, false /* disable monitoring */,
- mViewEmbedder.getAttachedView());
- }
- if (mNativeImeAdapterAndroid != 0) {
- nativeRequestCursorUpdate(mNativeImeAdapterAndroid,
- false /* not an immediate request */, false /* disable monitoring */);
+ mCursorAnchorInfoController.resetMonitoringState();
}
return mInputConnection;
}
@@ -669,16 +661,8 @@
* Notified when IME requested Chrome to change the cursor update mode.
*/
public boolean onRequestCursorUpdates(int cursorUpdateMode) {
- final boolean immediateRequest =
- (cursorUpdateMode & InputConnection.CURSOR_UPDATE_IMMEDIATE) != 0;
- final boolean monitorRequest =
- (cursorUpdateMode & InputConnection.CURSOR_UPDATE_MONITOR) != 0;
-
- if (mNativeImeAdapterAndroid != 0) {
- nativeRequestCursorUpdate(mNativeImeAdapterAndroid, immediateRequest, monitorRequest);
- }
if (mCursorAnchorInfoController == null) return false;
- return mCursorAnchorInfoController.onRequestCursorUpdates(immediateRequest, monitorRequest,
+ return mCursorAnchorInfoController.onRequestCursorUpdates(cursorUpdateMode,
mViewEmbedder.getAttachedView());
}
@@ -734,8 +718,7 @@
@CalledByNative
private void setCharacterBounds(float[] characterBounds) {
if (mCursorAnchorInfoController == null) return;
- mCursorAnchorInfoController.setCompositionCharacterBounds(characterBounds,
- mViewEmbedder.getAttachedView());
+ mCursorAnchorInfoController.setCompositionCharacterBounds(characterBounds);
}
@CalledByNative
@@ -767,7 +750,5 @@
int before, int after);
private native void nativeResetImeAdapter(long nativeImeAdapterAndroid);
private native boolean nativeRequestTextInputStateUpdate(long nativeImeAdapterAndroid);
- private native void nativeRequestCursorUpdate(long nativeImeAdapterAndroid,
- boolean immediateRequest, boolean monitorRequest);
private native boolean nativeIsImeThreadEnabled(long nativeImeAdapterAndroid);
}

Powered by Google App Engine
This is Rietveld 408576698