diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 22:01:00 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 22:01:00 +0000 |
commit | 30f75e618e08b5bd943feec72261cc36a8fd9280 (patch) | |
tree | 7f108ae961dc8ff5b11f904bdbc4894247f2c7c0 /webkit/glue | |
parent | e191c147e4704d4e75f548cdaf90f914d196aa63 (diff) | |
download | chromium_src-30f75e618e08b5bd943feec72261cc36a8fd9280.zip chromium_src-30f75e618e08b5bd943feec72261cc36a8fd9280.tar.gz chromium_src-30f75e618e08b5bd943feec72261cc36a8fd9280.tar.bz2 |
This CL causes the autofill popup to hide when the browser window is moved or resized.
TEST=Bring up an autofill popup in a form, move the browser. The autofill popup should be closed.
BUG=7401
R=ben
Review URL: http://codereview.chromium.org/28126
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10384 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/webview.h | 3 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 6 | ||||
-rw-r--r-- | webkit/glue/webview_impl.h | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h index 7acb29e..fbd4f33f 100644 --- a/webkit/glue/webview.h +++ b/webkit/glue/webview.h @@ -192,6 +192,9 @@ class WebView : public WebWidget { const std::vector<std::wstring>& suggestions, int default_suggestion_index) = 0; + // Hides the autofill popup if any are showing. + virtual void HideAutofillPopup() = 0; + private: DISALLOW_EVIL_CONSTRUCTORS(WebView); }; diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index 2705168..c0c18c1 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -1586,7 +1586,7 @@ void WebViewImpl::AutofillSuggestionsForNode( web_widget, webkit_glue::FromIntRect(new_bounds)); } } else { - autocomplete_popup_->show(focused_node->getRect(), + autocomplete_popup_->show(focused_node->getRect(), page_->mainFrame()->view(), 0); autocomplete_popup_showing_ = true; } @@ -1689,6 +1689,10 @@ void WebViewImpl::HideAutoCompletePopup() { } } +void WebViewImpl::HideAutofillPopup() { + HideAutoCompletePopup(); +} + Node* WebViewImpl::GetFocusedNode() { Frame* frame = page_->focusController()->focusedFrame(); if (!frame) diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h index f86e9f1..9023d96 100644 --- a/webkit/glue/webview_impl.h +++ b/webkit/glue/webview_impl.h @@ -104,6 +104,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> { int64 node_id, const std::vector<std::wstring>& suggestions, int default_suggestion_index); + virtual void HideAutofillPopup(); // WebViewImpl |