Commit 66e2b580 authored by Sangseok Jang's avatar Sangseok Jang Committed by Commit Bot

Remove unnecessary function call in AppMenuModel

The function "AddItem" add invisible empty menu for extension overflow menu.
It might be workaround to resolve appkit menus bug. But, it might be resolve.
The empty menu added before extension overflow menu is invisible, but
it has margins. So, the exetension overflow menu view in AppMenu looks
different in Windows and Mac.

Bug: NONE
Change-Id: Iba0b944f688b42a42d2e83716209770acae689e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1669136Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Sangseok Jang <sangseok.jang@navercorp.com>
Cr-Commit-Position: refs/heads/master@{#671884}
parent 2562c26b
......@@ -846,14 +846,6 @@ bool AppMenuModel::CreateActionToolbarOverflowMenu() {
// GetToolbarActionsBar() can be null in testing.
if (browser_->window() && browser_->window()->GetToolbarActionsBar() &&
browser_->window()->GetToolbarActionsBar()->NeedsOverflow()) {
#if defined(OS_MACOSX)
// There's a bug in AppKit menus, where if a menu item with a custom view
// (like the extensions overflow menu) is the first menu item, it is not
// highlightable or keyboard-selectable.
// Adding any menu item before it (even one which is never visible) prevents
// it, so add a bogus item here that will always be hidden.
AddItem(kEmptyMenuItemCommand, base::string16());
#endif
AddItem(IDC_EXTENSIONS_OVERFLOW_MENU, base::string16());
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment