Skip to content
Snippets Groups Projects
Commit 9fbfcbc6 authored by dhollowa@chromium.org's avatar dhollowa@chromium.org
Browse files

Autofill suggested dropdown list should be closed with unmatched names

This change adds an explicit call to |hidePopups| when no username/password completion matches the contents of the username text field.

BUG=65985
TEST=Manual, according to bug steps.

Review URL: http://codereview.chromium.org/5726007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69087 0039d316-1c4b-4281-b951-d872f2087c98
parent 8a371d97
No related branches found
No related tags found
No related merge requests found
...@@ -413,15 +413,17 @@ void PasswordAutocompleteManager::GetSuggestions( ...@@ -413,15 +413,17 @@ void PasswordAutocompleteManager::GetSuggestions(
bool PasswordAutocompleteManager::ShowSuggestionPopup( bool PasswordAutocompleteManager::ShowSuggestionPopup(
const webkit_glue::PasswordFormFillData& fill_data, const webkit_glue::PasswordFormFillData& fill_data,
const WebKit::WebInputElement& user_input) { 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(); WebKit::WebView* webview = user_input.document().frame()->view();
if (!webview) if (!webview)
return false; 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> labels(suggestions.size());
std::vector<string16> icons(suggestions.size()); std::vector<string16> icons(suggestions.size());
std::vector<int> ids(suggestions.size(), 0); std::vector<int> ids(suggestions.size(), 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment