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

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

Issue 442433002: Not allowing user to type more chars than max length value for text field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: few nits resolved Created 6 years, 4 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
Index: content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
index 5f50cd3807c16df73dc4400ebd47d118c67ba3cf..399aa99bc3b909620a6bdd3b095a0e2e81b90a92 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
@@ -127,6 +127,7 @@ public class ImeAdapter {
private DelayedDismissInput mDismissInput = null;
private int mTextInputType;
private String mLastComposeText;
+ private int mInputElementMaxLength;
@VisibleForTesting
int mLastSyntheticKeyCode;
@@ -562,6 +563,9 @@ public class ImeAdapter {
return true;
}
+ public int getInputElementMaxLength() {
+ return mInputElementMaxLength;
+ }
// Calls from C++ to Java
@CalledByNative
@@ -596,7 +600,8 @@ public class ImeAdapter {
}
@CalledByNative
- private void focusedNodeChanged(boolean isEditable) {
+ private void focusedNodeChanged(boolean isEditable, int editableNodeMaxLength) {
+ mInputElementMaxLength = editableNodeMaxLength;
if (mInputConnection != null && isEditable) mInputConnection.restartInput();
}

Powered by Google App Engine
This is Rietveld 408576698