Chromium Code Reviews| Index: components/autofill/content/renderer/form_autofill_util.cc |
| diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc |
| index cb250901cebf9981ecdf844b0dbaade93acb50b4..070e727d6f573d9e8291e4ace93721a6cd8c9af7 100644 |
| --- a/components/autofill/content/renderer/form_autofill_util.cc |
| +++ b/components/autofill/content/renderer/form_autofill_util.cc |
| @@ -1527,7 +1527,23 @@ bool UnownedCheckoutFormElementsAndFieldSetsToFormData( |
| } |
| } |
| - return false; |
| + // Since it's not a checkout flow, only add fields that have an autocomplete |
|
Mathieu
2016/02/05 18:39:06
*a non-"off" autocomplete attribute
sebsg
2016/02/05 20:08:00
Done.
|
| + // attribute to the formless autofill. |
| + std::vector<WebFormControlElement> elements_with_autocomplete; |
| + for (const WebFormControlElement& element : control_elements) { |
| + blink::WebString autocomplete = element.getAttribute("autocomplete"); |
| + if (autocomplete.utf8() != "" && autocomplete.utf8() != "off") |
|
Mathieu
2016/02/05 18:39:06
Other methods seem to define statics like so:
CR_
Mathieu
2016/02/05 18:39:06
if (autocomplete.length() && ...
sebsg
2016/02/05 20:08:00
Done.
sebsg
2016/02/05 20:08:00
Done.
|
| + elements_with_autocomplete.push_back(element); |
| + } |
| + |
| + if (elements_with_autocomplete.empty()) |
| + return false; |
| + |
| + form->is_syntehtic_non_checkout_form = true; |
|
Mathieu
2016/02/05 18:39:06
Could we do only with a |non_checkout| attribute i
sebsg
2016/02/05 20:08:00
Done.
|
| + |
| + return UnownedFormElementsAndFieldSetsToFormData( |
| + fieldsets, elements_with_autocomplete, element, document, extract_mask, |
| + form, field); |
| } |
| bool UnownedPasswordFormElementsAndFieldSetsToFormData( |