Issue metadata
Sign in to add a comment
|
MacViews: Comboboxes stopped using native menus |
||||||||||||||||||||||
Issue descriptionChrome Version : 55.0.2873.4 OS Version: OS X 10.11.6 What steps will reproduce the problem? 1. chrome://flags//mac-views-native-dialogs 2. Show bookmarks bubble, click combobox What is the expected result? A native menu, centred over the combobox (popover) What happens instead of that? It's a Mac-themed views menu that pops-down. Ran $ ./tools/bisect-builds.py -amac --bad=421052 --good=403382 --use-local-cache -- --no-first-run --enable-features=MacViewsNativeDialogs You are probably looking for a change made after 414882 (known good), but no later than 414930 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/f05e88ae004f438fcd8fb2023b51ba19a7903e48..3767fa543bcbdef5c254599a9d4d6833de4e44df Likely r414900 / r30d4b86 Update ui/views menus to use async by jonross ยท 6 weeks ago Review-Url: https://codereview.chromium.org/2264403006
,
Oct 6 2016
We didn't originally edit the views::MenuRunner API to have callback mechanisms so that we could preserve one style of RunMenuAt during the transition. Though if for Mac there is no callback path if could be a good target to modify. I'd be interested in knowing what synchronous paths are required for launching the NSMenu on Mac. As we were planning to delete the synchronous code path.
,
Oct 6 2016
,
Oct 12 2016
https://codereview.chromium.org/2394123002/ is out for review. The callback is essentially just plumbed through to the MenuModelAdapter (for views menus) or the MenuRunnerImplCocoa (for native menus). So there's no change to the RunMenuAt calls. But I guess the weird part that getting a native NSMenu on Mac makes the call to RunMenuAt blocking, even if you pass MenuRunner::ASYNC. Maybe there's a way to simulate ASYNC if it's needed. There's no way to make +[NSMenu popUpContextMenu:..] or -[NSMenu popUpMenuPositioningItem:] return until the menu is closed. But posting that task and another to spin a nested run loop in NSEventTrackingRunLoopMode might allow "things" to happen while the menu is still showing.
,
Oct 13 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7a7c6831b11536332403881c6619986b55f62e05 commit 7a7c6831b11536332403881c6619986b55f62e05 Author: tapted <tapted@chromium.org> Date: Thu Oct 13 22:18:35 2016 Views: Expose an on_closed callback via the MenuRunner constructor. Clients often store a MenuRunner instance as a member to ensure menus are dismissed when the client is destroyed. If a client doesn't also observe the menu closing, it effectively leaks the MenuRunner. So, it's a common pattern to need an on_closed callback. Previously, this callback was only provided via MenuModelAdapter APIs. MenuModelAdapter isn't used for Native NSMenus on MacViews, so clients wanting on_closed were not able to show native menus. To fix, allow the MenuRunner constructor to pass an on_closed callback through; either to the MenuModelAdapter, or the MenuRunnerImplCocoa which gains support for invoking the callback. Tests in menu_runner_cocoa_unittest.mm are paramaterized to test both native (NSMenu, synchronous) and views (MenuItemView, asyncrhonous) to ensure the behaviour is consistent and any sync/async divergence is intentional. 4 clients no longer need a MenuModelAdapter - remove it from them. BUG= 653334 Review-Url: https://codereview.chromium.org/2394123002 Cr-Commit-Position: refs/heads/master@{#425186} [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/chrome/browser/ui/views/download/download_shelf_context_menu_view.cc [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/chrome/browser/ui/views/download/download_shelf_context_menu_view.h [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/chrome/browser/ui/views/extensions/media_galleries_dialog_views.cc [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/chrome/browser/ui/views/extensions/media_galleries_dialog_views.h [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/chrome/browser/ui/views/frame/browser_frame.cc [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/chrome/browser/ui/views/frame/browser_frame.h [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/combobox/combobox.cc [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/combobox/combobox.h [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/menu/menu_runner.cc [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/menu/menu_runner.h [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/menu/menu_runner_cocoa_unittest.mm [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/menu/menu_runner_impl.cc [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/menu/menu_runner_impl_adapter.cc [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/menu/menu_runner_impl_adapter.h [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/menu/menu_runner_impl_cocoa.h [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/menu/menu_runner_impl_cocoa.mm [modify] https://crrev.com/7a7c6831b11536332403881c6619986b55f62e05/ui/views/controls/menu/menu_runner_impl_interface.h
,
Oct 17 2016
Native menus are back in bookmark bubble and OIB |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by tapted@chromium.org
, Oct 6 2016Components: Internals>Views
Labels: -Type-Bug -Pri-3 Pri-1 Type-Bug-Regression
Owner: tapted@chromium.org
Status: Started (was: Untriaged)