summaryrefslogtreecommitdiffstats
path: root/webkit/glue/dom_operations.cc
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-09 01:41:27 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-09 01:41:27 +0000
commit1081e0c20e74dd08836274d409f92e7ff52e0299 (patch)
treebd94fa0dd2d9550b6e917990e800e7ca3c5613c7 /webkit/glue/dom_operations.cc
parentf10d9e175f026c82990a7c9ce4a11cb079bae770 (diff)
downloadchromium_src-1081e0c20e74dd08836274d409f92e7ff52e0299.zip
chromium_src-1081e0c20e74dd08836274d409f92e7ff52e0299.tar.gz
chromium_src-1081e0c20e74dd08836274d409f92e7ff52e0299.tar.bz2
Password Autocomplete needs to check maximum field length when filling.
Changes input element |setValue()| call sites to respect the input element's maxlength attribute. BUG=56378, 45831 TEST=Manual test as per bug 45831, and PasswordManagerAutocompleteTests.TestValidValueConditions Review URL: http://codereview.chromium.org/3615008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/dom_operations.cc')
-rw-r--r--webkit/glue/dom_operations.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc
index 22e0e75..b459473 100644
--- a/webkit/glue/dom_operations.cc
+++ b/webkit/glue/dom_operations.cc
@@ -190,6 +190,9 @@ static bool FillFormImpl(FormElements* fe, const FormData& data) {
(!element.isEnabledFormControl() || element.hasAttribute("readonly"))) {
continue; // Don't fill uneditable password fields.
}
+ if (!element.isValidValue(data_map[it->first]))
+ continue;
+
element.setValue(data_map[it->first]);
element.setAutofilled(true);
element.dispatchFormControlChangeEvent();