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

Unified Diff: chrome/renderer/password_autocomplete_manager.cc

Issue 5726007: Autofill suggested dropdown list should be closed with unmatched names (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/password_autocomplete_manager.cc
diff --git a/chrome/renderer/password_autocomplete_manager.cc b/chrome/renderer/password_autocomplete_manager.cc
index 78512fa5a6f40c7b16a8325d6c2bd05e690a8073..613a0b4ab844969eec3ab89a6800afd1222b6fa4 100644
--- a/chrome/renderer/password_autocomplete_manager.cc
+++ b/chrome/renderer/password_autocomplete_manager.cc
@@ -413,15 +413,17 @@ void PasswordAutocompleteManager::GetSuggestions(
bool PasswordAutocompleteManager::ShowSuggestionPopup(
const webkit_glue::PasswordFormFillData& fill_data,
const WebKit::WebInputElement& user_input) {
- std::vector<string16> suggestions;
- GetSuggestions(fill_data, user_input.value(), &suggestions);
- if (suggestions.empty())
- return false;
-
WebKit::WebView* webview = user_input.document().frame()->view();
if (!webview)
return false;
+ std::vector<string16> suggestions;
+ GetSuggestions(fill_data, user_input.value(), &suggestions);
+ if (suggestions.empty()) {
+ webview->hidePopups();
+ return false;
+ }
+
std::vector<string16> labels(suggestions.size());
std::vector<string16> icons(suggestions.size());
std::vector<int> ids(suggestions.size(), 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698