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..a612b11e0cd3a258cd2f357a555688889ab9f816 100644 |
--- a/chrome/renderer/autofill/form_autofill_util.cc |
+++ b/chrome/renderer/autofill/form_autofill_util.cc |
@@ -593,14 +593,14 @@ void WebFormControlElementToFormField(const WebFormControlElement& element, |
// labels for all form control elements are scraped from the DOM and set in |
// 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->form_control_type = UTF16ToUTF8(element.formControlType()); |
+ field->autocomplete_attribute = |
+ UTF16ToUTF8(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 = "x-max-data-length-exceeded"; |
} |
if (!IsAutofillableElement(element)) |