[Webkit-unassigned] [Bug 238368] Some Apple internal clients fail to build due to redeclared AppKit types in WebKitLegacy

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 28 11:55:25 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=238368

--- Comment #12 from Ian Anderson <iana at apple.com> ---
(In reply to David Kilzer (:ddkilzer) from comment #9)
> Comment on attachment 455831 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=455831&action=review
> 
> > Source/WebKitLegacy/mac/Misc/WebDownload.h:87
> > +#if TARGET_OS_IPHONE
> > +- (WAKWindow *)downloadWindowForAuthenticationSheet:(WebDownload *)download;
> > +#else
> >  - (NSWindow *)downloadWindowForAuthenticationSheet:(WebDownload *)download;
> > +#endif
> 
> I'm surprised this change was needed as this appears at the top of the
> header file:
> 
> #if TARGET_OS_IPHONE
> #import <WebKitLegacy/WAKAppKitStubs.h>
> #endif
> 
> Did you do a search and replace when looking for AppKit types to update in
> WebKitLegacy headers?
> 
> Note that it is not necessary to fix this before landing this patch, but I
> think including that header is the canonical way this has been solved in the
> past.

This is needed because `NSWindow` isn't always `#define`d to `WAKWindow` in `TARGET_OS_IPHONE` after this patch. Yes I did a find and replace for the types that used to be always `#define`d in WAKAppKitStubs.h to make these changes. The idea is that if `TARGET_OS_IPHONE`, everywhere in WebKitLegacy that says `NSWindow` is always `WAKWindow`. However, in Mac Catalyst, WebKitLegacy can't always `#define` `NSWindow` to `WAKWindow`, so the type needs to be explicitly declared.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220328/2510b322/attachment.htm>


More information about the webkit-unassigned mailing list