diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 05:42:41 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 05:42:41 +0000 |
commit | 38531587b801093b08a5d76664413bdf2b660467 (patch) | |
tree | 2deae9351f0e88536c0b935732196bd88cff2562 /chrome/browser/autocomplete | |
parent | 891f4c8e2c3d2d8d5ca2d3f325bd4d65addc2a26 (diff) | |
download | chromium_src-38531587b801093b08a5d76664413bdf2b660467.zip chromium_src-38531587b801093b08a5d76664413bdf2b660467.tar.gz chromium_src-38531587b801093b08a5d76664413bdf2b660467.tar.bz2 |
Avoid inconsistent state (leading to checkfailures) due to Windows minimize/restore functionality hiding and showing the autocomplete dropdown outside of the awareness of the controller.
Instead, this switches to the simpler model of just creating a new HWND when we want to show the dropdown, and destroying it when we want to close it. Happily, this also seems to save quite a bit of code.
BUG=20511
TEST=Type a character in the omnibox, minimize the window, and restore it. The dropdown should have disappeared.
Review URL: http://codereview.chromium.org/391011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31649 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_popup_model.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_model.cc b/chrome/browser/autocomplete/autocomplete_popup_model.cc index c3147c1..8b0c9d1 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_model.cc +++ b/chrome/browser/autocomplete/autocomplete_popup_model.cc @@ -175,12 +175,7 @@ GURL AutocompletePopupModel::URLsForCurrentSelection( // If there are no results, the popup should be closed (so we should have // failed the CHECK above), and URLsForDefaultMatch() should have been // called instead. - if (result->empty()) { - // We're going to checkfail, but first see whether - // controller_->latest_result() is actually in sync with |result|. - CHECK(controller_->latest_result().empty()); - CHECK(false); - } + CHECK(!result->empty()); CHECK(selected_line_ < result->size()); match = result->begin() + selected_line_; } |