summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-22 00:33:46 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-22 00:33:46 +0000
commitdeb87e1f3259dbb4ee9c85df45fb2c5ed3673c6c (patch)
tree34d87bdabb26bdc5b393e5fb0709fb4327832568 /components
parent215ebc40d2e7ebf461ecbe9521eee433cfb09a69 (diff)
downloadchromium_src-deb87e1f3259dbb4ee9c85df45fb2c5ed3673c6c.zip
chromium_src-deb87e1f3259dbb4ee9c85df45fb2c5ed3673c6c.tar.gz
chromium_src-deb87e1f3259dbb4ee9c85df45fb2c5ed3673c6c.tar.bz2
[Password Autofill] Don't fill fields with autocomplete="off".
BUG=252609 TEST=out/Debug/browser_tests --gtest_filter=PasswordAutofillAgentTest.NoInitialAutocompleteForAutocompleteOff R=gcasto@chromium.org Review URL: https://chromiumcodereview.appspot.com/17341006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r--components/autofill/content/renderer/password_autofill_agent.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index ab36e6e..a7ee567 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -180,8 +180,10 @@ void FillForm(FormElements* fe, const FormData& data) {
for (FormInputElementMap::iterator it = fe->input_elements.begin();
it != fe->input_elements.end(); ++it) {
WebKit::WebInputElement element = it->second;
- if (!IsElementEditable(element))
- continue; // Don't fill uneditable fields.
+
+ // Don't fill uneditable fields or fields with autocomplete disabled.
+ if (!IsElementEditable(element) || !element.autoComplete())
+ continue;
// TODO(tkent): Check maxlength and pattern.
element.setValue(data_map[it->first]);