Description[Mac] Remove extraneous Bookmarks menu from menu bar when running apps from launcher.
When Chrome is closed, opening a bookmark app from the app launcher on
Mac leads to an additional Bookmarks menu appearing on the left of the
Mac menu bar. The issue only manifests itself under these exact
circumstances.
The problem appears to be caused by a bug in AppKit. Calling setSubmenu
on a *hidden* NSMenuItem with a *different* NSMenu to the current
submenu leads to the NSMenuItem becoming non-hidden. This precise
situation occurs when caching the bookmark menu on Mac, which is done to
improve profile switching performance.
This CL removes the extra Bookmarks menu by saving the hidden state of
the menu prior to caching, setting the menu to be visible, allowing the
existing caching to run, and then resetting the hidden state once
caching is complete. It is insufficient to skip setting the menu to be
visible in this process.
BUG=497813
Committed: https://crrev.com/b80838fdc92209c443c43a742284ada39dd2d89e
Cr-Commit-Position: refs/heads/master@{#347819}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Addressing nits #
Total comments: 6
Patch Set 3 : Addressing reviewer feedback #Messages
Total messages: 13 (4 generated)
|