Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 10f17092d03f8a428e17db665bada7c87010ee2d https://github.com/WebKit/WebKit/commit/10f17092d03f8a428e17db665bada7c87010ee2d Author: Timothy Hatcher <timo...@apple.com> Date: 2024-07-19 (Fri, 19 Jul 2024)
Changed paths: M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionController.mm Log Message: ----------- Manifest v2 web_accessible_resources are not working. https://webkit.org/b/276835 rdar://131750151 Reviewed by Brian Weinstein. Manifest v2 web accessible resources don’t restrict the page URLs they can load from. Therefore, any page should be able to load them. However, the previous code was using a `*://*/*` pattern, which was too restrictive to allow URLs like `about:srcdoc`. Even the `<all_urls>` pattern was too restrictive, as it only allowed supported schemes. To fix this, allow an empty match patterns set to allow any URL. This is only supported on Manifest v2, as an empty patterns array is an error in Manifest v3. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm: (WebKit::WebExtension::isWebAccessibleResource): Default to allowed if the patterns are empty. (WebKit::WebExtension::populateWebAccessibleResourcesIfNeeded): Use an empty patterns set. * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionController.mm: (TestWebKitAPI::TEST(WKWebExtensionController, WebAccessibleResourcesV2)): Added. Canonical link: https://commits.webkit.org/281157@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes