Bug 212853 - WebCore: Add tvOS and watchOS SPI headers
Summary: WebCore: Add tvOS and watchOS SPI headers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-05 15:52 PDT by Jonathan Bedard
Modified: 2020-06-08 10:52 PDT (History)
5 users (show)

See Also:


Attachments
Patch (10.82 KB, patch)
2020-06-05 16:09 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (10.33 KB, patch)
2020-06-05 16:35 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (9.48 KB, patch)
2020-06-08 08:43 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (10.27 KB, patch)
2020-06-08 09:06 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2020-06-05 15:52:03 PDT
tvOS and watchOS need a few SPI headers to build WebCore.
Comment 1 Radar WebKit Bug Importer 2020-06-05 15:52:31 PDT
<rdar://problem/64048485>
Comment 2 Jonathan Bedard 2020-06-05 16:09:05 PDT
Created attachment 401212 [details]
Patch
Comment 3 Jonathan Bedard 2020-06-05 16:35:32 PDT
Created attachment 401215 [details]
Patch
Comment 4 Andy Estes 2020-06-05 21:27:42 PDT
Comment on attachment 401215 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401215&action=review

> Source/WebCore/PAL/pal/spi/cocoa/CoreMotionSPI.h:30
> +#if defined __has_include && __has_include(<CoreMotion/CoreMotion.h>)
> +#import <CoreMotion/CoreMotion.h>
> +#else

"Guidelines for using SPI in WebKit" (see link in radar) says to include SDK headers based on USE(APPLE_INTERNAL_SDK) macros and PLATFORM() macros rather than __has_include() (because we want to detect if an SDK header unexpectedly goes away).

> Source/WebCore/platform/ios/WebCoreMotionManager.h:29
> -#import <CoreMotion/CoreMotion.h>
> +#import <pal/spi/cocoa/CoreMotionSPI.h>

Not new to your change, but do we really need this include? Seems like we just need to forward-declare CMMotionManager.
Comment 5 Jonathan Bedard 2020-06-08 08:43:37 PDT
Created attachment 401341 [details]
Patch
Comment 6 Jonathan Bedard 2020-06-08 09:06:18 PDT
Created attachment 401342 [details]
Patch
Comment 7 EWS 2020-06-08 10:52:21 PDT
Committed r262725: <https://trac.webkit.org/changeset/262725>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401342 [details].