summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webview_impl.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 2c591ed..c09a174 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -1777,6 +1777,13 @@ void WebViewImpl::HideAutofillPopup() {
void WebViewImpl::RefreshAutofillPopup() {
DCHECK(autocomplete_popup_showing_);
+
+ // Hide the popup if it has become empty.
+ if (autocomplete_popup_client_->listSize() == 0) {
+ HideAutoCompletePopup();
+ return;
+ }
+
IntRect old_bounds = autocomplete_popup_->boundsRect();
autocomplete_popup_->refresh();
IntRect new_bounds = autocomplete_popup_->boundsRect();