diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-26 21:19:00 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-26 21:19:00 +0000 |
commit | fcbea54202d5e853c36161549229959585f78c3a (patch) | |
tree | b28240c82a0c155cce5938e9bc2a2c0247fc364c /views | |
parent | 1adcff8ef879cb0c74de7937862ab6eb0077113f (diff) | |
download | chromium_src-fcbea54202d5e853c36161549229959585f78c3a.zip chromium_src-fcbea54202d5e853c36161549229959585f78c3a.tar.gz chromium_src-fcbea54202d5e853c36161549229959585f78c3a.tar.bz2 |
Fixes bug in showing a sibling menu that could lead to an
assertion/closing menu. The problem is the code was checking the
current MenuItemView against the sibling's MenuItemView. This meant if
a submenu was selected and you moused over the menu button we would
get confused and attempt to show a menu we're already showing,
resulting in assertions/closing the menu.
BUG=none
TEST=none
R=rhashimoto@chromium.org
Review URL: http://codereview.chromium.org/7495040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/menu/menu_controller.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc index 64b2193..429d537 100644 --- a/views/controls/menu/menu_controller.cc +++ b/views/controls/menu/menu_controller.cc @@ -1080,7 +1080,7 @@ bool MenuController::ShowSiblingMenu(SubmenuView* source, MenuItemView* alt_menu = source->GetMenuItem()->GetDelegate()-> GetSiblingMenu(source->GetMenuItem()->GetRootMenuItem(), screen_point, &anchor, &has_mnemonics, &button); - if (!alt_menu || alt_menu == state_.item) + if (!alt_menu || (state_.item && state_.item->GetRootMenuItem() == alt_menu)) return false; if (!button) { |