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

Unified Diff: components/autofill/renderer/form_autofill_util.cc

Issue 12721004: Autofill:Autocomplete: Enable autocheckout of input elements of type password. This will support fi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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));

Powered by Google App Engine
This is Rietveld 408576698