-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web Extensions: menuId and parentMenuId is wrong in the menus API.
https://webkit.org/b/265843 rdar://problem/119164396 Reviewed by Brian Weinstein. Fix the keys we use for menuItemId and parentMenuItemId. Also make tab menu items collapse into an extension titled submenu since these will often be next to other extensions and should be grouped to prevent overloading menus. This can be shared with the implementation we had for extension context menus. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::WebExtensionContext::platformMenuItems const): (WebKit::WebExtensionContext::singleMenuItemOrExtensionItemWithSubmenu const): (WebKit::WebExtensionContext::addItemsToContextMenu): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIMenusCocoa.mm: (WebKit::WebExtensionContextProxy::dispatchMenusClickedEvent): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIMenus.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/271560@main
- Loading branch information
Showing
4 changed files
with
140 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.