diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/chrome_client_impl.cc | 4 | ||||
-rw-r--r-- | webkit/glue/chrome_client_impl.h | 2 | ||||
-rw-r--r-- | webkit/glue/webview_delegate.h | 3 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 12 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.h | 2 |
6 files changed, 9 insertions, 16 deletions
diff --git a/webkit/glue/chrome_client_impl.cc b/webkit/glue/chrome_client_impl.cc index 471eb14..278134b 100644 --- a/webkit/glue/chrome_client_impl.cc +++ b/webkit/glue/chrome_client_impl.cc @@ -462,12 +462,12 @@ void ChromeClientImpl::runOpenPanel(WebCore::Frame* frame, void ChromeClientImpl::popupOpened(WebCore::FramelessScrollView* popup_view, const WebCore::IntRect& bounds, - bool focus_on_show) { + bool activatable) { WebViewDelegate* d = webview_->delegate(); if (d) { WebWidgetImpl* webwidget = static_cast<WebWidgetImpl*>(d->CreatePopupWidget(webview_, - focus_on_show)); + activatable)); webwidget->Init(popup_view, webkit_glue::FromIntRect(bounds)); } } diff --git a/webkit/glue/chrome_client_impl.h b/webkit/glue/chrome_client_impl.h index 6e059eaa..226c93c 100644 --- a/webkit/glue/chrome_client_impl.h +++ b/webkit/glue/chrome_client_impl.h @@ -117,7 +117,7 @@ public: PassRefPtr<WebCore::FileChooser>); virtual void popupOpened(WebCore::FramelessScrollView* popup_view, const WebCore::IntRect& bounds, - bool focus_on_show); + bool activatable); void SetCursor(const WebCursor& cursor); void SetCursorForPlugin(const WebCursor& cursor); diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h index 0ffd764..b2fca89 100644 --- a/webkit/glue/webview_delegate.h +++ b/webkit/glue/webview_delegate.h @@ -114,8 +114,7 @@ class WebViewDelegate : virtual public WebWidgetDelegate { // This method is called to create a new WebWidget to act as a popup // (like a drop-down menu). - virtual WebWidget* CreatePopupWidget(WebView* webview, - bool focus_on_show) { + virtual WebWidget* CreatePopupWidget(WebView* webview, bool activatable) { return NULL; } diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index 59ffd3b..ac5588c 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -943,14 +943,6 @@ void WebViewImpl::SetBackForwardListSize(int size) { 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 @@ void WebViewImpl::SetFocus(bool enable) { } 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 @@ void WebViewImpl::AutofillSuggestionsForNode( 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(), diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 8bad166..fc28aa1 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -94,7 +94,7 @@ WebView* TestWebViewDelegate::CreateWebView(WebView* webview, } WebWidget* TestWebViewDelegate::CreatePopupWidget(WebView* webview, - bool focus_on_show) { + bool activatable) { return shell_->CreatePopupWidget(webview); } diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index 77c7b8e..d934bcc 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -76,7 +76,7 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, // WebViewDelegate virtual WebView* CreateWebView(WebView* webview, bool user_gesture); - virtual WebWidget* CreatePopupWidget(WebView* webview, bool focus_on_show); + virtual WebWidget* CreatePopupWidget(WebView* webview, bool activatable); virtual WebPluginDelegate* CreatePluginDelegate( WebView* webview, const GURL& url, |