Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 773573004: Fill on account select in the password manager behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix browser_test crashes Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/content/renderer/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index 8a9350e9304bc369045479377850335096a0421e..02bfd51ab328169b849314e565b89fe6a74c14b6 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -610,7 +610,7 @@ void AutofillAgent::ShowSuggestions(const WebFormControlElement& element,
const WebInputElement* input_element = toWebInputElement(&element);
if (input_element) {
- if (!input_element->isTextField() || input_element->isPasswordField())
+ if (!input_element->isTextField())
return;
if (!options.datalist_only && !input_element->suggestedValue().isEmpty())
return;
@@ -643,6 +643,11 @@ void AutofillAgent::ShowSuggestions(const WebFormControlElement& element,
return;
}
+ // Password field elements should only have suggestions shown by the password
+ // autofill agent.
+ if (input_element && input_element->isPasswordField())
+ return;
+
// If autocomplete is disabled at the field level, ensure that the native
// UI won't try to show a warning, since that may conflict with a custom
// popup. Note that we cannot use the WebKit method element.autoComplete()

Powered by Google App Engine
This is Rietveld 408576698