-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Context menu items for Action and Tab are not filtered by tab URL.
https://webkit.org/b/270420 rdar://123977080 Reviewed by Brian Weinstein. Allow documentUrlPatterns to apply to action and tab context for menus. This prevents menu items from appearing that don’t apply to the current document in the tab. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm: (WebKit::WebExtensionAction::platformMenuItems const): Set frameURL. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::WebExtensionContext::platformMenuItems const): Set frameURL. * Source/WebKit/UIProcess/Extensions/WebExtensionMenuItem.cpp: (WebKit::WebExtensionMenuItem::matches const): Match frameURL before the early return for action and tab contexts. Only match if frameURL is non-null. * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIMenus.mm: (TEST(WKWebExtensionAPIMenus, ActionMenus)): Added documentUrlPatterns to one item. (TEST(WKWebExtensionAPIMenus, TabMenus)): Ditto. Canonical link: https://commits.webkit.org/275638@main
- Loading branch information
Showing
4 changed files
with
32 additions
and
10 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
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