| Index: content/public/android/java/src/org/chromium/content/browser/input/TextInputState.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/TextInputState.java b/content/public/android/java/src/org/chromium/content/browser/input/TextInputState.java
|
| index 38684dfc9d9cfac2a51d79f0e630417255073812..58d19484c715ece8db5896cf3a29af8c0a69d08d 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/input/TextInputState.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/TextInputState.java
|
| @@ -18,9 +18,10 @@ public class TextInputState {
|
| private final Range mComposition;
|
| private final boolean mSingleLine;
|
| private final boolean mFromIme;
|
| + private final boolean mInBatchEditMode;
|
|
|
| public TextInputState(CharSequence text, Range selection, Range composition, boolean singleLine,
|
| - boolean fromIme) {
|
| + boolean fromIme, boolean inBatchEditMode) {
|
| selection.clamp(0, text.length());
|
| if (composition.start() != -1 || composition.end() != -1) {
|
| composition.clamp(0, text.length());
|
| @@ -30,6 +31,7 @@ public class TextInputState {
|
| mComposition = composition;
|
| mSingleLine = singleLine;
|
| mFromIme = fromIme;
|
| + mInBatchEditMode = inBatchEditMode;
|
| }
|
|
|
| public CharSequence text() {
|
| @@ -52,6 +54,10 @@ public class TextInputState {
|
| return mFromIme;
|
| }
|
|
|
| + public boolean inBatchEditMode() {
|
| + return mInBatchEditMode;
|
| + }
|
| +
|
| public CharSequence getSelectedText() {
|
| if (mSelection.start() == mSelection.end()) return null;
|
| return TextUtils.substring(mText, mSelection.start(), mSelection.end());
|
| @@ -90,8 +96,8 @@ public class TextInputState {
|
|
|
| @Override
|
| public String toString() {
|
| - return String.format(Locale.US, "TextInputState {[%s] SEL%s COM%s %s %s}", mText,
|
| + return String.format(Locale.US, "TextInputState {[%s] SEL%s COM%s %s %s%s}", mText,
|
| mSelection, mComposition, mSingleLine ? "SIN" : "MUL",
|
| - mFromIme ? "fromIME" : "NOTfromIME");
|
| + mFromIme ? "fromIME" : "NOTfromIME", mInBatchEditMode ? " BatchEdit" : "");
|
| }
|
| }
|
|
|