Chromium Code Reviews| Index: chrome/renderer/autofill/password_autofill_manager.cc |
| =================================================================== |
| --- chrome/renderer/autofill/password_autofill_manager.cc (revision 125467) |
| +++ chrome/renderer/autofill/password_autofill_manager.cc (working copy) |
| @@ -55,6 +55,13 @@ |
| WebKit::WebVector<WebKit::WebNode> temp_elements; |
| fe->getNamedElements(data.fields[j].name, temp_elements); |
| + // It's true if the form hasn't the user_name elemtnt for the password. |
| + // In this case, we just skip and continue to autofill, |
| + // because we'd like to autofill the password if user_name doesn't exist. |
| + if (temp_elements.size() == 0) { |
| + continue; |
| + } |
|
Ilya Sherman
2012/03/08 23:48:49
This doesn't seem like the right change. We shoul
Yumikiyo Osanai
2012/03/20 15:53:37
Done.
|
| + |
| // Match the first input element, if any. |
| // |getNamedElements| may return non-input elements where the names match, |
| // so the results are filtered for input elements. |
| @@ -442,7 +449,7 @@ |
| PasswordInfo password_info; |
| password_info.fill_data = form_data; |
| password_info.password_field = password_element; |
| - login_to_password_info_[username_element] = password_info; |
| + login_to_password_info_[password_element] = password_info; |
| } |
| } |