Bug 1149189 - Backout e75d824c730d "Force Gecko update on endBatchEdit for range updates"; r=esawin

This commit is contained in:
Jim Chen 2015-03-31 18:20:27 -04:00
Родитель 3e01b49d16
Коммит a12a40c194
3 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -571,7 +571,7 @@ final class GeckoEditable
}
@Override
public void setUpdateGecko(boolean update, boolean force) {
public void setUpdateGecko(boolean update) {
if (!onIcThread()) {
// Android may be holding an old InputConnection; ignore
if (DEBUG) {
@ -580,7 +580,7 @@ final class GeckoEditable
return;
}
if (update) {
icUpdateGecko(force);
icUpdateGecko(false);
}
mUpdateGecko = update;
}

Просмотреть файл

@ -14,7 +14,7 @@ import android.text.Editable;
interface GeckoEditableClient {
void sendEvent(GeckoEvent event);
Editable getEditable();
void setUpdateGecko(boolean update, boolean force);
void setUpdateGecko(boolean update);
void setSuppressKeyUp(boolean suppress);
Handler getInputConnectionHandler();
boolean setInputConnectionHandler(Handler handler);

Просмотреть файл

@ -250,7 +250,7 @@ class GeckoInputConnection
@Override
public synchronized boolean beginBatchEdit() {
mBatchEditCount++;
mEditableClient.setUpdateGecko(false, false);
mEditableClient.setUpdateGecko(false);
return true;
}
@ -259,10 +259,6 @@ class GeckoInputConnection
if (mBatchEditCount > 0) {
mBatchEditCount--;
if (mBatchEditCount == 0) {
// Force Gecko update for cancelled auto-correction of single-
// character words to prevent character duplication. (bug 1133802)
boolean forceUpdate = !mBatchTextChanged && !mBatchSelectionChanged;
if (mBatchTextChanged) {
notifyTextChange();
mBatchTextChanged = false;
@ -273,7 +269,7 @@ class GeckoInputConnection
Selection.getSelectionEnd(editable));
mBatchSelectionChanged = false;
}
mEditableClient.setUpdateGecko(true, forceUpdate);
mEditableClient.setUpdateGecko(true);
}
} else {
Log.w(LOGTAG, "endBatchEdit() called, but mBatchEditCount == 0?!");