Index: chrome/browser/password_manager/password_form_manager.cc |
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc |
index fd361b6e2679e72e3b2a7508336945a80f8c07b2..b999e9543d47c540a21bbc8acb07896d279c7f46 100644 |
--- a/chrome/browser/password_manager/password_form_manager.cc |
+++ b/chrome/browser/password_manager/password_form_manager.cc |
@@ -238,6 +238,13 @@ void PasswordFormManager::ProvisionallySave( |
// bless it with the action URL from the observed form. See bug 1107719. |
if (pending_credentials_.action.is_empty()) |
pending_credentials_.action = observed_form_.action; |
+ // Similarly, bless incomplete credentials with *_element info. |
+ if (pending_credentials_.password_element.empty()) |
+ pending_credentials_.password_element = observed_form_.password_element; |
+ if (pending_credentials_.username_element.empty()) |
+ pending_credentials_.username_element = observed_form_.username_element; |
+ if (pending_credentials_.submit_element.empty()) |
+ pending_credentials_.submit_element = observed_form_.submit_element; |
pending_credentials_.password_value = credentials.password_value; |
pending_credentials_.preferred = credentials.preferred; |