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

Unified Diff: webkit/glue/webview_impl.cc

Issue 17455: Autofill popup dismissed when page loses focus (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months 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 | « webkit/glue/webview_delegate.h ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webview_impl.cc
===================================================================
--- webkit/glue/webview_impl.cc (revision 7623)
+++ webkit/glue/webview_impl.cc (working copy)
@@ -943,14 +943,6 @@
void WebViewImpl::SetFocus(bool enable) {
if (enable) {
- // Hide the popup menu if any.
- // TODO(jcampan): bug #3844: we should do that when we lose focus. The
- // reason we are not doing it is because when clicking on the autofill
- // popup, the page first loses focus before the mouse click is sent to the
- // popup. So if we close when the focus is lost, the mouse click does not
- // do anything.
- HideAutoCompletePopup();
-
// Getting the focused frame will have the side-effect of setting the main
// frame as the focused frame if it is not already focused. Otherwise, if
// there is already a focused frame, then this does nothing.
@@ -967,6 +959,8 @@
}
ime_accept_events_ = true;
} else {
+ HideAutoCompletePopup();
+
// Clear out who last had focus. If someone has focus, the refs will be
// updated below.
ReleaseFocusReferences();
@@ -1509,7 +1503,7 @@
adoptRef(new AutocompletePopupMenuClient(this, input_elem,
suggestions,
default_suggestion_index));
- // Autocomplete popup does not get focused. We need the page to still
+ // The autocomplete popup is not activated. We need the page to still
// have focus so the user can keep typing when the popup is showing.
autocomplete_popup_ =
WebCore::PopupContainer::create(autocomplete_popup_client_.get(),
« no previous file with comments | « webkit/glue/webview_delegate.h ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698