summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-26 23:47:25 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-26 23:47:25 +0000
commit3e8394bf8b2870f2aec63d55a1541e11f705919d (patch)
tree67daf8984c29531aa7be5a6fc694cc4ba645866c
parenta3c91d40a7e0b474d63279526edb86c8e4617a62 (diff)
downloadchromium_src-3e8394bf8b2870f2aec63d55a1541e11f705919d.zip
chromium_src-3e8394bf8b2870f2aec63d55a1541e11f705919d.tar.gz
chromium_src-3e8394bf8b2870f2aec63d55a1541e11f705919d.tar.bz2
fix NativeTextField context menu on second showing
(affects omnibox, find in page, etc.) NativeTextField context menus (omnibox, find in page) broke here: https://src.chromium.org/viewvc/chrome?view=rev&revision=182553 In particular the ScrollRectToVisible here https://src.chromium.org/viewvc/chrome/trunk/src/ui/views/controls/menu/submenu_view.cc?r1=182553&r2=182552&pathrev=182553 NativeTextField is (I think) the only place that keeps the MenuRunner and its contained MenuItemView around between showings (normally its recreated on each menu show), which I think is why it's only happening here. R=sky@chromium.org BUG=177619 Review URL: https://chromiumcodereview.appspot.com/12314122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184777 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ui/views/controls/menu/submenu_view.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/views/controls/menu/submenu_view.cc b/ui/views/controls/menu/submenu_view.cc
index 82d6b2a..2c7bdc8 100644
--- a/ui/views/controls/menu/submenu_view.cc
+++ b/ui/views/controls/menu/submenu_view.cc
@@ -307,6 +307,9 @@ void SubmenuView::ShowAt(Widget* parent,
host_ = new MenuHost(this);
// Force construction of the scroll view container.
GetScrollViewContainer();
+ // Force a layout since our preferred size may not have changed but our
+ // content may have.
+ InvalidateLayout();
host_->InitMenuHost(parent, bounds, scroll_view_container_, do_capture);
}