mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1149189 - Backout e75d824c730d "Force Gecko update on endBatchEdit for range updates"; r=esawin
This commit is contained in:
parent
84a2992f8e
commit
59365aafeb
@ -571,7 +571,7 @@ final class GeckoEditable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUpdateGecko(boolean update, boolean force) {
|
public void setUpdateGecko(boolean update) {
|
||||||
if (!onIcThread()) {
|
if (!onIcThread()) {
|
||||||
// Android may be holding an old InputConnection; ignore
|
// Android may be holding an old InputConnection; ignore
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
@ -580,7 +580,7 @@ final class GeckoEditable
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (update) {
|
if (update) {
|
||||||
icUpdateGecko(force);
|
icUpdateGecko(false);
|
||||||
}
|
}
|
||||||
mUpdateGecko = update;
|
mUpdateGecko = update;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ import android.text.Editable;
|
|||||||
interface GeckoEditableClient {
|
interface GeckoEditableClient {
|
||||||
void sendEvent(GeckoEvent event);
|
void sendEvent(GeckoEvent event);
|
||||||
Editable getEditable();
|
Editable getEditable();
|
||||||
void setUpdateGecko(boolean update, boolean force);
|
void setUpdateGecko(boolean update);
|
||||||
void setSuppressKeyUp(boolean suppress);
|
void setSuppressKeyUp(boolean suppress);
|
||||||
Handler getInputConnectionHandler();
|
Handler getInputConnectionHandler();
|
||||||
boolean setInputConnectionHandler(Handler handler);
|
boolean setInputConnectionHandler(Handler handler);
|
||||||
|
@ -250,7 +250,7 @@ class GeckoInputConnection
|
|||||||
@Override
|
@Override
|
||||||
public synchronized boolean beginBatchEdit() {
|
public synchronized boolean beginBatchEdit() {
|
||||||
mBatchEditCount++;
|
mBatchEditCount++;
|
||||||
mEditableClient.setUpdateGecko(false, false);
|
mEditableClient.setUpdateGecko(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,10 +259,6 @@ class GeckoInputConnection
|
|||||||
if (mBatchEditCount > 0) {
|
if (mBatchEditCount > 0) {
|
||||||
mBatchEditCount--;
|
mBatchEditCount--;
|
||||||
if (mBatchEditCount == 0) {
|
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) {
|
if (mBatchTextChanged) {
|
||||||
notifyTextChange();
|
notifyTextChange();
|
||||||
mBatchTextChanged = false;
|
mBatchTextChanged = false;
|
||||||
@ -273,7 +269,7 @@ class GeckoInputConnection
|
|||||||
Selection.getSelectionEnd(editable));
|
Selection.getSelectionEnd(editable));
|
||||||
mBatchSelectionChanged = false;
|
mBatchSelectionChanged = false;
|
||||||
}
|
}
|
||||||
mEditableClient.setUpdateGecko(true, forceUpdate);
|
mEditableClient.setUpdateGecko(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.w(LOGTAG, "endBatchEdit() called, but mBatchEditCount == 0?!");
|
Log.w(LOGTAG, "endBatchEdit() called, but mBatchEditCount == 0?!");
|
||||||
|
Loading…
Reference in New Issue
Block a user