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

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

Issue 2462583004: Fix endBatchEdit() state update order issue (Closed)
Patch Set: Created 4 years, 2 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/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java b/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
index 9926e670452081013d3aafb4e2d9d36c12f73957..a295eb041941a12d6e0750d7ddd69367a5936d13 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
@@ -115,7 +115,6 @@ public class ThreadedInputConnection extends BaseInputConnection
private final BlockingQueue<TextInputState> mQueue = new LinkedBlockingQueue<>();
private int mPendingAccent;
private TextInputState mCachedTextInputState;
- private boolean mLastInBatchEditMode;
ThreadedInputConnection(View view, ImeAdapter imeAdapter, Handler handler) {
super(view, true);
@@ -146,12 +145,8 @@ public class ThreadedInputConnection extends BaseInputConnection
if (DEBUG_LOGS) Log.w(TAG, "updateState: %s", mCachedTextInputState);
addToQueueOnUiThread(mCachedTextInputState);
- // If state update is caused by explicitly requesting the state update,
- // or batch edit just finished, then we may need to update state to IMM.
- if (isNonImeChange || (mLastInBatchEditMode && !inBatchEditMode)) {
- mHandler.post(mProcessPendingInputStatesRunnable);
- mLastInBatchEditMode = inBatchEditMode;
- }
+
+ if (isNonImeChange) mHandler.post(mProcessPendingInputStatesRunnable);
}
/**
« no previous file with comments | « no previous file | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698