Bug 212853

Summary: WebCore: Add tvOS and watchOS SPI headers
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: WebCore Misc.Assignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, ap, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=212718
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

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].