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

Unified Diff: webkit/glue/form_field_values.cc

Issue 668208: Don't send form data that is marked autocomplete off to the browser.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « chrome/renderer/form_autocomplete_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/form_field_values.cc
===================================================================
--- webkit/glue/form_field_values.cc (revision 41058)
+++ webkit/glue/form_field_values.cc (working copy)
@@ -43,9 +43,13 @@
for (size_t i = 0; i < input_elements.size(); i++) {
const WebInputElement& input_element = input_elements[i];
if (input_element.isEnabledFormControl()) {
- // TODO(jhawkins): Remove this check when we have labels.
- if (!input_element.nameForAutofill().isEmpty())
+ // TODO(jhawkins): Remove the check nameForAutofill().isEmpty() when we
+ // have labels.
+ if (input_element.autoComplete() &&
+ input_element.inputType() != WebInputElement::Password &&
+ !input_element.nameForAutofill().isEmpty()) {
elements.push_back(FormField(input_element));
+ }
}
}
}
« no previous file with comments | « chrome/renderer/form_autocomplete_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698