[webkit-changes] [WebKit/WebKit] 2b5fd9: [Cocoa] Expose Objective-C wrappers for LinearMedi...

aestes noreply at github.com
Mon Jan 29 21:52:35 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b5fd9cfa4d56becadf0ed628af6e62ddbf25362
      https://github.com/WebKit/WebKit/commit/2b5fd9cfa4d56becadf0ed628af6e62ddbf25362
  Author: Andy Estes <aestes at apple.com>
  Date:   2024-01-29 (Mon, 29 Jan 2024)

  Changed paths:
    M Source/WebKit/Configurations/WebKitSwift.xcconfig
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    A Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaTypes.swift
    A Source/WebKit/WebKitSwift/LinearMediaKit/WKSLinearMediaTypes.h
    A Source/WebKit/WebKitSwift/WebKitSwift.h
    A Source/WebKit/WebKitSwift/module.modulemap

  Log Message:
  -----------
  [Cocoa] Expose Objective-C wrappers for LinearMediaKit types
https://bugs.webkit.org/show_bug.cgi?id=268341
rdar://121886828

Reviewed by Richard Robinson and Jer Noble.

LinearMediaKit exposes a Swift SPI that needs to be called by Objective-C++ code in WebKit. To
support this, added Objective-C wrapper types to WebKitSwift that are backed by a Swift
implementation that calls into LinearMediaKit.

Added WKSLinearMediaTypes.h that declares NS_ENUMs, NS_OPTIONs, and @interfaces prefixed with WKS.
For the @interfaces, they are backed by an @_objcImplementation extension in Swift. The enums and
options are also extended with convenience initializers and properties for accessing their
LinearMediaKit equivalents (to be used in follow-on PRs).

* Source/WebKit/Configurations/WebKitSwift.xcconfig:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaTypes.swift: Added.
(WKSLinearMediaTimeRange.lowerBound):
(WKSLinearMediaContentMode.contentMode):
(WKSLinearMediaContentType.contentType):
(WKSLinearMediaPresentationMode.presentationMode):
(WKSLinearMediaViewingMode.viewingMode):
(WKSLinearMediaFullscreenBehaviors.fullscreenBehaviors):
(WKSLinearMediaTimeRange.closedRange):
(WKSLinearMediaTimeRange.range):
* Source/WebKit/WebKitSwift/LinearMediaKit/WKSLinearMediaTypes.h: Added.
* Source/WebKit/WebKitSwift/WebKitSwift.h: Added.
* Source/WebKit/WebKitSwift/module.modulemap: Added.

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




More information about the webkit-changes mailing list