Index: content/public/android/java/src/org/chromium/content/browser/input/ImeUtils.java
|
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeUtils.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeUtils.java
|
index b62b29399748ca059158201165b3101af878a41c..5bc63b842b613fc211907efbd5a495c46d71bc4e 100644
|
--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeUtils.java
|
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeUtils.java
|
@@ -45,7 +45,6 @@ public class ImeUtils {
|
|
if (inputType == TextInputType.TEXT) {
|
// Normal text field
|
- outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
|
if ((inputFlags & WebTextInputFlags.AutocorrectOff) == 0) {
|
outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT;
|
}
|
@@ -55,32 +54,25 @@ public class ImeUtils {
|
if ((inputFlags & WebTextInputFlags.AutocorrectOff) == 0) {
|
outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT;
|
}
|
- outAttrs.imeOptions |= EditorInfo.IME_ACTION_NONE;
|
} else if (inputType == TextInputType.PASSWORD) {
|
outAttrs.inputType =
|
InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD;
|
- outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
|
} else if (inputType == TextInputType.SEARCH) {
|
- outAttrs.imeOptions |= EditorInfo.IME_ACTION_SEARCH;
|
} else if (inputType == TextInputType.URL) {
|
outAttrs.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI;
|
- outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
|
} else if (inputType == TextInputType.EMAIL) {
|
// Email
|
outAttrs.inputType =
|
InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS;
|
- outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
|
} else if (inputType == TextInputType.TELEPHONE) {
|
// Telephone
|
// Number and telephone do not have both a Tab key and an
|
// action in default OSK, so set the action to NEXT
|
outAttrs.inputType = InputType.TYPE_CLASS_PHONE;
|
- outAttrs.imeOptions |= EditorInfo.IME_ACTION_NEXT;
|
} else if (inputType == TextInputType.NUMBER) {
|
// Number
|
outAttrs.inputType = InputType.TYPE_CLASS_NUMBER
|
| InputType.TYPE_NUMBER_VARIATION_NORMAL | InputType.TYPE_NUMBER_FLAG_DECIMAL;
|
- outAttrs.imeOptions |= EditorInfo.IME_ACTION_NEXT;
|
}
|
|
// Handling of autocapitalize. Blink will send the flag taking into account the element's
|
@@ -99,6 +91,16 @@ public class ImeUtils {
|
outAttrs.inputType |= InputType.TYPE_TEXT_FLAG_CAP_SENTENCES;
|
}
|
|
+ if (inputType == TextInputType.SEARCH) {
|
+ outAttrs.imeOptions |= EditorInfo.IME_ACTION_SEARCH;
|
+ } else if ((inputFlags & WebTextInputFlags.ActionNone) != 0) {
|
+ outAttrs.imeOptions |= EditorInfo.IME_ACTION_NONE;
|
+ } else if ((inputFlags & WebTextInputFlags.ActionNext) != 0) {
|
+ outAttrs.imeOptions |= EditorInfo.IME_ACTION_NEXT;
|
+ } else if ((inputFlags & WebTextInputFlags.ActionGo) != 0) {
|
+ outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
|
+ }
|
+
|
outAttrs.initialSelStart = initialSelStart;
|
outAttrs.initialSelEnd = initialSelEnd;
|
}
|
|