Chromium Code Reviews| Index: components/autofill/content/renderer/password_autofill_agent.cc |
| diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc |
| index 1120b1e7543dca9938cbb06b27a56d944777685e..8c1f1556b02eceb89ce6f5d72e37bee2952a2a39 100644 |
| --- a/components/autofill/content/renderer/password_autofill_agent.cc |
| +++ b/components/autofill/content/renderer/password_autofill_agent.cc |
| @@ -1432,6 +1432,17 @@ void PasswordAutofillAgent::GetFillableElementFromFormData( |
| if (elements) |
| elements->push_back(main_element); |
| } |
| + |
| + // This is a fallback, if for some reasons elements for filling were not found |
| + // (for example because they were renamed by JavaScript) then add fill data |
| + // for |web_input_to_password_info_| in order to be able propose filling of |
| + // password fields on click. |
| + if (web_input_to_password_info_.empty()) { |
| + PasswordInfo password_info; |
| + password_info.fill_data = form_data; |
| + password_info.key = key; |
| + web_input_to_password_info_[blink::WebInputElement()] = password_info; |
|
vabr (Chromium)
2017/02/24 20:10:36
Could you explain in a code comment, how the |pass
dvadym
2017/02/27 10:14:29
Yeah, your explanation is correct, I've updated th
|
| + } |
| } |
| void PasswordAutofillAgent::FocusedNodeHasChanged(const blink::WebNode& node) { |