[webkit-changes] [WebKit/WebKit] 67d7e1: Refine the construction of WKWebExtension in Swift.

Timothy Hatcher noreply at github.com
Fri Feb 21 13:37:33 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 67d7e1c8fe788397d94bd9ece229ca4ee8ba58e0
      https://github.com/WebKit/WebKit/commit/67d7e1c8fe788397d94bd9ece229ca4ee8ba58e0
  Author: Timothy Hatcher <timothy at apple.com>
  Date:   2025-02-21 (Fri, 21 Feb 2025)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebExtension.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebExtension.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebExtensionPrivate.h
    M Source/WebKit/UIProcess/API/Cocoa/WebKitSwiftOverlay.swift

  Log Message:
  -----------
  Refine the construction of WKWebExtension in Swift.
https://webkit.org/b/288129
rdar://problem/145235810

Reviewed by Brian Weinstein.

Introduce a Swift overlay for WKWebExtension to define two async init() methods
that are more idiomatic in Swift.

Swift really does not like _init methods, so unprefix the existing private init
methods to keep the compiler happy when building the overlay. Retain prefixed
versions for ObjC compatability with existing clients.

* Source/WebKit/UIProcess/API/Cocoa/WKWebExtension.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebExtension.mm:
(-[WKWebExtension _initWithAppExtensionBundle:error:]):
(-[WKWebExtension _initWithResourceBaseURL:error:]):
(-[WKWebExtension _initWithAppExtensionBundle:resourceBaseURL:error:]):
(-[WKWebExtension _initWithManifestDictionary:]):
(-[WKWebExtension _initWithManifestDictionary:resources:]):
(-[WKWebExtension _initWithResources:]):
(-[WKWebExtension initWithAppExtensionBundle:error:]):
(-[WKWebExtension initWithResourceBaseURL:error:]):
(-[WKWebExtension initWithAppExtensionBundle:resourceBaseURL:error:]):
(-[WKWebExtension initWithManifestDictionary:]):
(-[WKWebExtension initWithManifestDictionary:resources:]):
(-[WKWebExtension initWithResources:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebExtensionPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WebKitSwiftOverlay.swift:

Canonical link: https://commits.webkit.org/290825@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