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 df8056242e3eed16495550ae170eeafec6200860..1737391b16662abb547c777b8008c5d255b961f4 100644 |
--- a/components/autofill/content/renderer/password_autofill_agent.cc |
+++ b/components/autofill/content/renderer/password_autofill_agent.cc |
@@ -353,19 +353,20 @@ bool PasswordAutofillAgent::TextFieldHandlingKeyDown( |
bool PasswordAutofillAgent::DidAcceptAutofillSuggestion( |
const blink::WebNode& node, |
- const blink::WebString& username) { |
- blink::WebInputElement input; |
- PasswordInfo password; |
- if (!FindLoginInfo(node, &input, &password)) |
+ const blink::WebString& username, |
+ const blink::WebString& password) { |
+ blink::WebInputElement username_element; |
+ PasswordInfo info; |
+ if (!FindLoginInfo(node, &username_element, &info)) |
return false; |
- // Set the incoming |username| in the text field and |FillUserNameAndPassword| |
- // will do the rest. |
- input.setValue(username, true); |
- return FillUserNameAndPassword(&input, &password.password_field, |
- password.fill_data, |
- true /* exact_username_match */, |
- true /* set_selection */); |
+ username_element.setValue(username, true); |
+ SetElementAutofilled(&username_element, false); |
Garrett Casto
2014/03/05 07:36:09
The boolean should be "true" here shouldn't it?
Patrick Dubroy
2014/03/05 16:31:50
Done. Somehow I was confused and thought this para
|
+ |
+ info.password_field.setValue(password, true); |
+ SetElementAutofilled(&info.password_field, false); |
+ |
+ return true; |
} |
bool PasswordAutofillAgent::DidClearAutofillSelection( |