Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3eb40bee52b53b6c9b290c1d54fedf6bf22c5a19
      
https://github.com/WebKit/WebKit/commit/3eb40bee52b53b6c9b290c1d54fedf6bf22c5a19
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2026-05-05 (Tue, 05 May 2026)

  Changed paths:
    M Tools/TestWebKitAPI/Helpers/PlatformWebView.h

  Log Message:
  -----------
  [TestWebKitAPI] macCatalyst build broken because PlatformWebView.h uses 
NSWindow unconditionally on Apple platforms
https://bugs.webkit.org/show_bug.cgi?id=313872
rdar://176070030

Reviewed by Richard Robinson.

PlatformWebView.h forward-declares NSWindow and typedefs PlatformWindow
as NSWindow * under `#if defined(__APPLE__) && !PLATFORM(GTK)`. This
condition is true on macCatalyst, but NSWindow is not available there.

This contradiction has been latent for a long time since nothing compiled
PlatformWebView.h for macCatalyst. The failure now surfaces during the
SwiftExplicitDependencyGeneratePcm build phase: the TestWebKitAPILibrary
module map declares `umbrella "../Helpers"`, which pulls in every header
under Tools/TestWebKitAPI/Helpers/. When this precompiled module is then
built for macCatalyst, the compiler sees the NSWindow forward declaration
and emits:

```
  error: 'NSWindow' is unavailable: not available on macCatalyst
```

Originally, I wanted to change the outer guard to read PLATFORM(MAC),
but it was intentionally written that way in 168883@main to support the
GTK-on-macOS-clang build. Instead, to fix this bug, we add PLATFORM(MAC)
guards inside the block so that we can distinguish between NSWindow and
UIWindow as necessary.

* Tools/TestWebKitAPI/Helpers/PlatformWebView.h:

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



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

Reply via email to