<html>
<head>
<base href="https://bugs.webkit.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:ddkilzer@webkit.org" title="David Kilzer (:ddkilzer) <ddkilzer@webkit.org>"> <span class="fn">David Kilzer (:ddkilzer)</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Add a module map file for PrivateFrameworks/WebKitLegacy"
href="https://bugs.webkit.org/show_bug.cgi?id=230735">bug 230735</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #441851 Flags</td>
<td>review?
</td>
<td>review-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Add a module map file for PrivateFrameworks/WebKitLegacy"
href="https://bugs.webkit.org/show_bug.cgi?id=230735#c16">Comment # 16</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Add a module map file for PrivateFrameworks/WebKitLegacy"
href="https://bugs.webkit.org/show_bug.cgi?id=230735">bug 230735</a>
from <span class="vcard"><a class="email" href="mailto:ddkilzer@webkit.org" title="David Kilzer (:ddkilzer) <ddkilzer@webkit.org>"> <span class="fn">David Kilzer (:ddkilzer)</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=441851&action=diff" name="attach_441851" title="Patch">attachment 441851</a> <a href="attachment.cgi?id=441851&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=441851&action=review">https://bugs.webkit.org/attachment.cgi?id=441851&action=review</a>
r-, and I think these need to be fixed at minimum:
- Move #include/#import statements inside header guard macros.
- Add comments after #endif where noted.
- Answer question about <objc/NSObject.h>. (Might be okay—don't change them all yet.)
- Fix ordering of headers where noted.
- Reuse NSURLDownloadSPI.h in WebDownload.h (or was there a reason this code was copied?).
Thanks!
<span class="quote">> Source/WebCore/platform/ios/WebItemProviderPasteboard.h:-30
> +#import <CoreGraphics/CoreGraphics.h>
> #import <WebCore/AbstractPasteboard.h>
>
> #if TARGET_OS_IOS
>
> -struct CGSize;</span >
Why not put the #Import inside #if TARGET_OS_IOS/#endif?
<span class="quote">> Source/WebCore/platform/ios/wak/WAKAppKitStubs.h:-32
> +#import <Foundation/Foundation.h>
> +
> #if TARGET_OS_IPHONE
>
> #import <CoreGraphics/CoreGraphics.h>
> -#import <Foundation/Foundation.h></span >
Why does this need to go outside `#if TARGET_OS_IPHONE`? This doesn't seem necessary since the entire contents is wrapped in #if TARGET_OS_IPHONE/#endif.
<span class="quote">> Source/WebCore/platform/ios/wak/WAKResponder.h:33
> +#import <Foundation/Foundation.h>
> +
> #if TARGET_OS_IPHONE
>
> -#import "WKTypes.h"
> -#import <Foundation/Foundation.h>
> +#import <WebCore/WKTypes.h></span >
Why can't this go inside #if TARGET_OS_IPHONE/#endif?
<span class="quote">> Source/WebCore/platform/ios/wak/WAKView.h:29
> +#import <Foundation/Foundation.h></span >
Ditto.
<span class="quote">> Source/WebCore/platform/ios/wak/WAKWindow.h:28
> +#import <Foundation/Foundation.h></span >
Ditto.
<span class="quote">> Source/WebKitLegacy/ios/Misc/WebGeolocationCoreLocationProvider.h:62
> +#endif</span >
Should have a comment here:
#endif // defined(__cplusplus)
<span class="quote">> Source/WebKitLegacy/mac/DOM/DOMEventListener.h:27
> +#import <objc/NSObject.h></span >
Is this a public header? Why wouldn't we #import <Foundation/NSObject.h> instead?
<span class="quote">> Source/WebKitLegacy/mac/DOM/DOMNodeFilter.h:27
> +#import <objc/NSObject.h></span >
Ditto.
<span class="quote">> Source/WebKitLegacy/mac/DOM/DOMXPathNSResolver.h:27
> +#import <objc/NSObject.h></span >
Ditto.
<span class="quote">> Source/WebKitLegacy/mac/DOM/WebDOMOperationsPrivate.h:31
> +#import <Foundation/Foundation.h>
> #import <WebKitLegacy/WebDOMOperations.h>
> #import <JavaScriptCore/JSBase.h></span >
The header order should probably be this (since we include the non-private header first? Or does that give a check-webkit-style error?
#import <WebKitLegacy/WebDOMOperations.h>
#import <Foundation/Foundation.h>
#import <JavaScriptCore/JSBase.h>
<span class="quote">> Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h:30
> +#import <CoreGraphics/CoreGraphics.h>
> #import <WebKitLegacy/WebHistoryItem.h></span >
Ditto.
<span class="quote">> Source/WebKitLegacy/mac/Misc/WebDownload.h:33
> #ifndef WebDownload_h
> #define WebDownload_h</span >
It's a bit strange that there are #import statements above this header guard. Can they be moved inside the header guard?
<span class="quote">> Source/WebKitLegacy/mac/Misc/WebDownload.h:40
> -#if (defined TARGET_OS_MACCATALYST && TARGET_OS_MACCATALYST)
> +#if defined(TARGET_OS_MACCATALYST) && TARGET_OS_MACCATALYST
> #import <CFNetwork/CFNSURLConnection.h>
> -#elif !TARGET_OS_IPHONE || (defined USE_APPLE_INTERNAL_SDK && USE_APPLE_INTERNAL_SDK)
> +#elif !TARGET_OS_IPHONE || (defined(USE_APPLE_INTERNAL_SDK) && USE_APPLE_INTERNAL_SDK)
> #import <Foundation/NSURLDownload.h>
> #else
> #import <WebKitLegacy/NSURLDownloadSPI.h></span >
Both WebDownload.h and NSURLDownloadSPI.h are marked as Private headers, so we should be able to replace all of this with just:
#import <WebKitLegacy/NSURLDownloadSPI.h>
Since that has al the same logic as this block of macros.
<span class="quote">> Source/WebKitLegacy/mac/Storage/WebDatabaseQuotaManager.h:27
> +#import <objc/NSObject.h></span >
Why <objc/NSObject.h> instead of <Foundation/NSObject.h>?
<span class="quote">> Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProvider.h:26
> +#import <objc/NSObject.h></span >
Ditto.
<span class="quote">> Source/WebKitLegacy/mac/WebView/WebDeviceOrientationProviderMock.h:27
> -#import "WebDeviceOrientationProvider.h"
> +#import <WebKitLegacy/WebDeviceOrientationProvider.h>
> +#import <objc/NSObject.h></span >
Ditto.
<span class="quote">> Source/WebKitLegacy/mac/WebView/WebGeolocationPosition.h:26
> +#import <objc/NSObject.h></span >
Ditto.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>