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 2e747a3f7c4bfe46bd66f7da3b5b5863253b8820..9da9ae24cbbba8a60187977d6ac05b7f09130026 100644 |
--- a/components/autofill/content/renderer/password_autofill_agent.cc |
+++ b/components/autofill/content/renderer/password_autofill_agent.cc |
@@ -26,6 +26,7 @@ |
#include "third_party/WebKit/public/web/WebInputEvent.h" |
#include "third_party/WebKit/public/web/WebNode.h" |
#include "third_party/WebKit/public/web/WebNodeList.h" |
+#include "third_party/WebKit/public/web/WebPasswordFormData.h" |
#include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
#include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
#include "third_party/WebKit/public/web/WebView.h" |
@@ -320,6 +321,13 @@ bool PasswordAutofillAgent::DidClearAutofillSelection( |
bool PasswordAutofillAgent::ShowSuggestions( |
const blink::WebInputElement& element) { |
+ blink::WebPasswordFormData form_data(element.form()); |
Garrett Casto
2013/12/27 22:09:48
You also need to verify that element.form() is val
jww
2013/12/27 23:04:39
I believe this is irrelevant given my changes per
|
+ scoped_ptr<PasswordForm> password_form = CreatePasswordForm(element.form()); |
+ if (!ShouldIgnoreAutocompleteOffForPasswordFields() && password_form.get() && |
+ (!element.autoComplete() || !password_form->password_autocomplete_set || |
+ !form_data.passwordShouldAutocomplete)) |
Ilya Sherman
2013/12/27 21:43:22
Why do you need both "!password_form->password_aut
Garrett Casto
2013/12/27 22:09:48
passwordShouldAutocomplete implies password_autoco
jww
2013/12/27 23:04:39
Done.
|
+ return true; |
+ |
LoginToPasswordInfoMap::const_iterator iter = |
login_to_password_info_.find(element); |
if (iter == login_to_password_info_.end()) |