Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5c19c2e2cbcd3a6dfafb1d0ce0ef48fa940df166
      
https://github.com/WebKit/WebKit/commit/5c19c2e2cbcd3a6dfafb1d0ce0ef48fa940df166
  Author: Richard Robinson <[email protected]>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    A Tools/TestWebKitAPI/Helpers/cocoa/CocoaTypes.swift
    M Tools/TestWebKitAPI/Helpers/cocoa/TestCocoa.h
    M Tools/TestWebKitAPI/Helpers/cocoa/TestCocoaImageAndCocoaColor.h
    M Tools/TestWebKitAPI/Helpers/cocoa/TestCocoaImageAndCocoaColor.mm
    A Tools/TestWebKitAPI/Helpers/cocoa/TestCocoaImageUtilities.h
    A Tools/TestWebKitAPI/Helpers/cocoa/TestCocoaImageUtilities.swift
    M Tools/TestWebKitAPI/Helpers/cocoa/TestPDFDocument.h
    M Tools/TestWebKitAPI/Helpers/cocoa/TestPDFDocument.swift
    M Tools/TestWebKitAPI/Helpers/cocoa/WebExtensionUtilities.mm
    M Tools/TestWebKitAPI/Helpers/ios/UserInterfaceSwizzler.h
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

  Log Message:
  -----------
  [Swift Testing] Add some image/color utility functions
https://bugs.webkit.org/show_bug.cgi?id=323835
rdar://187070154

Reviewed by Abrar Rahman Protyasha.

Expose some existing C++ helpers in Swift.

* Tools/TestWebKitAPI/Helpers/cocoa/CocoaTypes.swift: Added.
* Tools/TestWebKitAPI/Helpers/cocoa/TestPDFDocument.swift:

Expose CocoaColor and CocoaImage type aliases.

* Tools/TestWebKitAPI/Helpers/cocoa/TestCocoa.h:

Ignore this file in Swift because it causes conflicts and is useless too.

* Tools/TestWebKitAPI/Helpers/cocoa/TestCocoaImageAndCocoaColor.mm:
(TestWebKitAPI::Util::pixelColor):
(TestWebKitAPI::Util::compareColors):
* Tools/TestWebKitAPI/Helpers/cocoa/TestCocoaImageUtilities.h: Added.
* Tools/TestWebKitAPI/Helpers/cocoa/TestCocoaImageUtilities.swift: Added.
(Appearance.withAppearance(_:_:)):
(Appearance.makePNGData(_:color:)):
(Appearance.pixelColor(of:at:)):
(Appearance.compareColors(_:_:tolerance:)):
(CocoaImage.isSymbol):
(TestCocoaImageUtilities.pngData(_:color:)):
(TestCocoaImageUtilities.pixelColor(of:at:)):
(TestCocoaImageUtilities.compareColors(_:_:tolerance:)):

Re-implement and expose these functions in Swift.

* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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



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

Reply via email to