Chromium Code Reviews| Index: components/autofill/renderer/form_autofill_util.cc |
| diff --git a/components/autofill/renderer/form_autofill_util.cc b/components/autofill/renderer/form_autofill_util.cc |
| index 8b0e6fbe0cec32f89f1af074b335468b5e52217e..ea66ed708469a0c509ce00ebe02a6e40f85c3944 100644 |
| --- a/components/autofill/renderer/form_autofill_util.cc |
| +++ b/components/autofill/renderer/form_autofill_util.cc |
| @@ -590,13 +590,14 @@ namespace autofill { |
| const size_t kMaxParseableFields = 100; |
| -// In HTML5, all text fields except password are text input fields to |
| -// autocomplete. |
| +// Include password fields as TextInput fields. Password fields will be filtered |
| +// out in browser process before sending them accross to Autofill server in |
| +// regular Autofill. |
|
Ilya Sherman
2013/03/15 23:42:35
This comment doesn't seem very useful except to so
Raman Kakilate
2013/03/18 17:54:00
Done.
|
| bool IsTextInput(const WebInputElement* element) { |
| if (!element) |
| return false; |
| - return element->isTextField() && !element->isPasswordField(); |
| + return element->isTextField(); |
|
Ilya Sherman
2013/03/15 23:42:35
nit: "return element && element->isTextField();"
Raman Kakilate
2013/03/18 17:54:00
Done.
|
| } |
| bool IsSelectElement(const WebFormControlElement& element) { |
| @@ -719,6 +720,10 @@ void WebFormControlElementToFormField(const WebFormControlElement& element, |
| field->is_focusable = input_element->isFocusable(); |
| field->should_autocomplete = input_element->autoComplete(); |
| field->is_checkable = IsCheckableElement(input_element); |
| + |
| + // Explicitly mark password fields as non autofillable. |
| + if (input_element->isPasswordField()) |
| + field->is_password_field = true; |
| } else if (extract_mask & EXTRACT_OPTIONS) { |
| // Set option strings on the field if available. |
| DCHECK(IsSelectElement(element)); |