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

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

Issue 11198048: [Autofill] Update the autocomplete types implementation to match the current HTML spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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: chrome/renderer/autofill/form_autofill_util.cc
diff --git a/chrome/renderer/autofill/form_autofill_util.cc b/chrome/renderer/autofill/form_autofill_util.cc
index 42d6ffa5b521a393d0f92fd8303cb1236552ea29..486e30d3663bd08e39f299da07be9c4084de906e 100644
--- a/chrome/renderer/autofill/form_autofill_util.cc
+++ b/chrome/renderer/autofill/form_autofill_util.cc
@@ -594,13 +594,12 @@ void WebFormControlElementToFormField(const WebFormControlElement& element,
// WebFormElementToFormData.
field->name = element.nameForAutofill();
field->form_control_type = element.formControlType();
- field->autocomplete_type = element.getAttribute("x-autocompletetype");
- TrimWhitespace(field->autocomplete_type, TRIM_ALL, &field->autocomplete_type);
- if (field->autocomplete_type.size() > kMaxDataLength) {
+ field->autocomplete_attribute = element.getAttribute("autocomplete");
+ if (field->autocomplete_attribute.size() > kMaxDataLength) {
// Discard overly long attribute values to avoid DOS-ing the browser
// process. However, send over a default string to indicate that the
// attribute was present.
- field->autocomplete_type = ASCIIToUTF16("x-max-data-length-exceeded");
+ field->autocomplete_attribute = ASCIIToUTF16("x-max-data-length-exceeded");
}
if (!IsAutofillableElement(element))

Powered by Google App Engine
This is Rietveld 408576698