[webkit-changes] [WebKit/WebKit] afcd0d: Prefer `scripts` and `page` over `service_worker` ...

Timothy Hatcher noreply at github.com
Mon Mar 11 11:40:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: afcd0d3bf64b4e8942e9b01db34400a161a2619e
      https://github.com/WebKit/WebKit/commit/afcd0d3bf64b4e8942e9b01db34400a161a2619e
  Author: Timothy Hatcher <timothy at apple.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtension.mm

  Log Message:
  -----------
  Prefer `scripts` and `page` over `service_worker` in Web Extension manifest.
https://webkit.org/b/270750
rdar://problem/124334426

Reviewed by Brian Weinstein.

This has been discussed in https://github.com/w3c/webextensions/issues/282.
When an extension specifies multiple `background` keys, the browser can prefer
which one to use based on what is supported. We support all three, but service
worker support is not the best environment for WebKit Web Extensions.

In the scenario where all three are supplied, we prefer `scripts`, `page`,
then `service_worker`.

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm:
(WebKit::WebExtension::populateBackgroundPropertiesIfNeeded):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtension.mm:
(TEST(WKWebExtension, BackgroundParsing)): Added tests.

Canonical link: https://commits.webkit.org/275916@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list