Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 874029ca893872b29e0634e3d7ebd54b1b76579c
https://github.com/WebKit/WebKit/commit/874029ca893872b29e0634e3d7ebd54b1b76579c
Author: David Kilzer <[email protected]>
Date: 2026-08-27 (Thu, 27 Aug 2026)
Changed paths:
M Source/WebCore/platform/ios/wak/WAKAppKitStubs.h
Log Message:
-----------
WAKAppKitStubs.h declares duplicate CGRect and CGSize type aliases when
building against the public SDK
<https://bugs.webkit.org/show_bug.cgi?id=322725>
<rdar://185997724>
Reviewed by Elliott Williams.
Guard the public-SDK geometry fallbacks so they cannot redeclare
`CGRect` and `CGSize`. `IntRect.h` and `IntSize.h` define `NSRect` and
`NSSize` as object-like macros for `CGRect` and `CGSize` on iOS, so in
a translation unit that included either header first the fallback
typedefs expand into a second declaration of `CGRect` and of `CGSize`,
and Swift cannot resolve a cross-reference when two candidates carry
the same name. `WAKAppKitStubs.h` includes neither header, and is
also consumed where those macros are absent, so it cannot assume
either state.
Every other definition in the same block is already `#ifndef`-guarded,
so guarding these three restores the block's own invariant while
leaving the standalone case intact: a translation unit with no macro
in scope still gets real `NSPoint`, `NSRect` and `NSSize` typedefs.
No `#define NSPoint CGPoint` currently exists, so that guard is
defensive.
No new tests since this change is not directly testable.
* Source/WebCore/platform/ios/wak/WAKAppKitStubs.h:
Canonical link: https://commits.webkit.org/319976@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications