| 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 dfa7bf7b1472aa2ec418ddde85ba474ede6f6a1d..50473bedbf340803dd8ef5bd0af504bc31883a61 100644
|
| --- a/components/autofill/content/renderer/password_autofill_agent.cc
|
| +++ b/components/autofill/content/renderer/password_autofill_agent.cc
|
| @@ -995,6 +995,12 @@ void PasswordAutofillAgent::OnFillPasswordForm(
|
| if (form_data.password_field.name.empty())
|
| break;
|
|
|
| + // We might have already filled this form if there are two <form> elements
|
| + // with identical markup.
|
| + if (login_to_password_info_.find(username_element) !=
|
| + login_to_password_info_.end())
|
| + continue;
|
| +
|
| // Get pointer to password element. (We currently only support single
|
| // password forms).
|
| password_element =
|
| @@ -1011,11 +1017,6 @@ void PasswordAutofillAgent::OnFillPasswordForm(
|
| base::Unretained(&gatekeeper_)))) {
|
| usernames_usage_ = OTHER_POSSIBLE_USERNAME_SELECTED;
|
| }
|
| - // We might have already filled this form if there are two <form> elements
|
| - // with identical markup.
|
| - if (login_to_password_info_.find(username_element) !=
|
| - login_to_password_info_.end())
|
| - continue;
|
|
|
| PasswordInfo password_info;
|
| password_info.fill_data = form_data;
|
|
|