Modified: trunk/Source/WebCore/PAL/ChangeLog (267040 => 267041)
--- trunk/Source/WebCore/PAL/ChangeLog 2020-09-14 21:30:25 UTC (rev 267040)
+++ trunk/Source/WebCore/PAL/ChangeLog 2020-09-14 21:40:37 UTC (rev 267041)
@@ -1,5 +1,21 @@
2020-09-14 Peng Liu <[email protected]>
+ Clean up AVKitSPI.h
+ https://bugs.webkit.org/show_bug.cgi?id=216449
+
+ Reviewed by Darin Adler.
+
+ * pal/spi/cocoa/AVFoundationSPI.h:
+ Remove a duplicated AVKit header file.
+
+ * pal/spi/cocoa/AVKitSPI.h:
+ Organize header files (and definitions) in the following order:
+ - General AVKit header files
+ - General AVKit internal header files and definitions
+ - Feature specific internal header files and definitions
+
+2020-09-14 Peng Liu <[email protected]>
+
Unreviewed, reverting r267004.
The patch leads to build failures on macOS Catalina.
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h (267040 => 267041)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h 2020-09-14 21:30:25 UTC (rev 267040)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h 2020-09-14 21:40:37 UTC (rev 267041)
@@ -40,10 +40,6 @@
#import <AVFoundation/AVPlayerItem_Private.h>
#import <AVFoundation/AVPlayerLayer_Private.h>
-#if PLATFORM(IOS_FAMILY) && HAVE(AVKIT)
-#import <AVKit/AVPlayerViewController_WebKitOnly.h>
-#endif
-
#if ENABLE(MEDIA_SOURCE)
#import <AVFoundation/AVStreamDataParser.h>
#endif
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h (267040 => 267041)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h 2020-09-14 21:30:25 UTC (rev 267040)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h 2020-09-14 21:40:37 UTC (rev 267041)
@@ -26,75 +26,31 @@
#import <objc/runtime.h>
#import <wtf/SoftLinking.h>
-#if USE(APPLE_INTERNAL_SDK)
-#import <AVKit/AVPlayerController.h>
-#else
#if PLATFORM(IOS_FAMILY)
-#import <UIKit/UIResponder.h>
-@interface AVPlayerController : UIResponder
-#else
-#import <AppKit/NSResponder.h>
-@interface AVPlayerController : NSResponder <NSUserInterfaceValidations>
+#import <AVKit/AVKit.h>
+#import <QuartzCore/QuartzCore.h>
#endif
-@end
-@interface AVPlayerController ()
-typedef NS_ENUM(NSInteger, AVPlayerControllerStatus) {
- AVPlayerControllerStatusUnknown = 0,
- AVPlayerControllerStatusReadyToPlay = 2,
-};
-typedef NS_ENUM(NSInteger, AVPlayerControllerExternalPlaybackType) {
- AVPlayerControllerExternalPlaybackTypeNone = 0,
- AVPlayerControllerExternalPlaybackTypeAirPlay = 1,
- AVPlayerControllerExternalPlaybackTypeTVOut = 2,
-};
-
-@property (NS_NONATOMIC_IOSONLY, readonly) AVPlayerControllerStatus status;
-@end
-#endif // USE(APPLE_INTERNAL_SDK)
-
-#if HAVE(AVOBSERVATIONCONTROLLER)
#if USE(APPLE_INTERNAL_SDK)
-#import <AVKit/AVObservationController.h>
-#else
-@class AVKeyValueChange;
+#import <AVKit/AVValueTiming.h>
-NS_ASSUME_NONNULL_BEGIN
-
-@interface AVObservationController<Owner> : NSObject
-- (instancetype)initWithOwner:(Owner)owner NS_DESIGNATED_INITIALIZER;
-- (id)startObserving:(id)object keyPath:(NSString *)keyPath includeInitialValue:(BOOL)shouldIncludeInitialValue observationHandler:(void (^)(Owner owner, id observed, AVKeyValueChange *change))observationHandler;
-- (void)stopAllObservation;
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif
-#endif // HAVE(AVOBSERVATIONCONTROLLER)
-
#if PLATFORM(IOS_FAMILY)
-#import <AVKit/AVKit.h>
-#import <QuartzCore/QuartzCore.h>
-#import <UIKit/UIKit.h>
-
-#if USE(APPLE_INTERNAL_SDK)
-
-#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
-#import <AVKit/AVBackgroundView.h>
-#endif
-
+#import <AVKit/AVPlayerController.h>
IGNORE_WARNINGS_BEGIN("objc-property-no-attribute")
#import <AVKit/AVPlayerLayerView.h>
IGNORE_WARNINGS_END
#import <AVKit/AVPlayerViewController_Private.h>
#import <AVKit/AVPlayerViewController_WebKitOnly.h>
+#endif
+#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
+#import <AVKit/AVBackgroundView.h>
+#endif
+
#if PLATFORM(WATCHOS)
-
#import <AVFoundation/AVPlayerLayer.h>
-
NS_ASSUME_NONNULL_BEGIN
@interface AVPictureInPicturePlayerLayerView : UIView
@@ -136,8 +92,9 @@
@end
NS_ASSUME_NONNULL_END
+#endif // PLATFORM(WATCHOS)
-#elif PLATFORM(APPLETV)
+#if PLATFORM(APPLETV)
NS_ASSUME_NONNULL_BEGIN
@interface AVPlayerViewController (AVPlayerViewController_WebKitOnly_OverrideRouteSharingPolicy)
- (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID;
@@ -145,10 +102,58 @@
NS_ASSUME_NONNULL_END
#endif
+#if PLATFORM(MAC)
+#import <AVKit/AVPlayerView_Private.h>
+#endif
+
#else
NS_ASSUME_NONNULL_BEGIN
+@interface AVValueTiming : NSObject <NSCoding, NSCopying, NSMutableCopying>
+@end
+
+@interface AVValueTiming ()
++ (AVValueTiming *)valueTimingWithAnchorValue:(double)anchorValue anchorTimeStamp:(NSTimeInterval)timeStamp rate:(double)rate;
+@property (NS_NONATOMIC_IOSONLY, readonly) double currentValue;
+@property (NS_NONATOMIC_IOSONLY, readonly) double rate;
+@property (NS_NONATOMIC_IOSONLY, readonly) NSTimeInterval anchorTimeStamp;
+@property (NS_NONATOMIC_IOSONLY, readonly) double anchorValue;
+
++ (NSTimeInterval)currentTimeStamp;
+- (double)valueForTimeStamp:(NSTimeInterval)timeStamp;
+@end
+
+NS_ASSUME_NONNULL_END
+
+#if PLATFORM(IOS_FAMILY)
+#import <UIKit/UIResponder.h>
+@interface AVPlayerController : UIResponder
+@end
+#else
+#import <AppKit/NSResponder.h>
+@interface AVPlayerController : NSResponder <NSUserInterfaceValidations>
+@end
+#endif
+
+@interface AVPlayerController ()
+typedef NS_ENUM(NSInteger, AVPlayerControllerStatus) {
+ AVPlayerControllerStatusUnknown = 0,
+ AVPlayerControllerStatusReadyToPlay = 2,
+};
+
+typedef NS_ENUM(NSInteger, AVPlayerControllerExternalPlaybackType) {
+ AVPlayerControllerExternalPlaybackTypeNone = 0,
+ AVPlayerControllerExternalPlaybackTypeAirPlay = 1,
+ AVPlayerControllerExternalPlaybackTypeTVOut = 2,
+};
+
+@property (NS_NONATOMIC_IOSONLY, readonly) AVPlayerControllerStatus status;
+@end
+
+#if PLATFORM(IOS_FAMILY)
+NS_ASSUME_NONNULL_BEGIN
+
@interface AVBackgroundView : UIView
@property (nonatomic) BOOL automaticallyDrawsRoundedCorners;
typedef NS_ENUM(NSInteger, AVBackgroundViewMaterialStyle) {
@@ -203,16 +208,10 @@
@end
NS_ASSUME_NONNULL_END
-
-#endif // USE(APPLE_INTERNAL_SDK)
#endif // PLATFORM(IOS_FAMILY)
#if PLATFORM(MAC)
-#if USE(APPLE_INTERNAL_SDK)
-#import <AVKit/AVPlayerView_Private.h>
-#else
#import <AVKit/AVPlayerView.h>
-
NS_ASSUME_NONNULL_BEGIN
@interface AVPlayerView (WebKitFullscreenSPI)
@@ -223,17 +222,33 @@
@end
NS_ASSUME_NONNULL_END
+#endif
#endif // USE(APPLE_INTERNAL_SDK)
-#endif // PLATFORM(MAC)
+
+#if HAVE(AVOBSERVATIONCONTROLLER)
+#if USE(APPLE_INTERNAL_SDK)
+#import <AVKit/AVObservationController.h>
+#else
+@class AVKeyValueChange;
+NS_ASSUME_NONNULL_BEGIN
+
+@interface AVObservationController<Owner> : NSObject
+- (instancetype)initWithOwner:(Owner)owner NS_DESIGNATED_INITIALIZER;
+- (id)startObserving:(id)object keyPath:(NSString *)keyPath includeInitialValue:(BOOL)shouldIncludeInitialValue observationHandler:(void (^)(Owner owner, id observed, AVKeyValueChange *change))observationHandler;
+- (void)stopAllObservation;
+@end
+
+NS_ASSUME_NONNULL_END
+#endif // USE(APPLE_INTERNAL_SDK)
+#endif // HAVE(AVOBSERVATIONCONTROLLER)
+
+
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
#if USE(APPLE_INTERNAL_SDK)
-
#import <AVKit/AVOutputDeviceMenuController.h>
-
#else
-
NS_ASSUME_NONNULL_BEGIN
@class AVOutputContext;
@@ -253,44 +268,23 @@
@end
NS_ASSUME_NONNULL_END
-
#endif // USE(APPLE_INTERNAL_SDK)
#endif // ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
-NS_ASSUME_NONNULL_BEGIN
-@interface AVValueTiming : NSObject <NSCoding, NSCopying, NSMutableCopying>
-@end
+#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER) && PLATFORM(MAC)
-@interface AVValueTiming ()
-+ (AVValueTiming *)valueTimingWithAnchorValue:(double)anchorValue anchorTimeStamp:(NSTimeInterval)timeStamp rate:(double)rate;
-@property (NS_NONATOMIC_IOSONLY, readonly) double currentValue;
-@property (NS_NONATOMIC_IOSONLY, readonly) double rate;
-@property (NS_NONATOMIC_IOSONLY, readonly) NSTimeInterval anchorTimeStamp;
-@property (NS_NONATOMIC_IOSONLY, readonly) double anchorValue;
-
-+ (NSTimeInterval)currentTimeStamp;
-- (double)valueForTimeStamp:(NSTimeInterval)timeStamp;
-@end
-
-NS_ASSUME_NONNULL_END
-
-#if PLATFORM(MAC) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
-
+OBJC_CLASS AVFunctionBarMediaSelectionOption;
OBJC_CLASS AVFunctionBarPlaybackControlsProvider;
OBJC_CLASS AVFunctionBarScrubber;
-OBJC_CLASS AVFunctionBarMediaSelectionOption;
+OBJC_CLASS AVTouchBarMediaSelectionOption;
OBJC_CLASS AVTouchBarPlaybackControlsProvider;
OBJC_CLASS AVTouchBarScrubber;
-OBJC_CLASS AVTouchBarMediaSelectionOption;
#if USE(APPLE_INTERNAL_SDK)
-
#import <AVKit/AVTouchBarPlaybackControlsProvider.h>
#import <AVKit/AVTouchBarScrubber.h>
-
#else
-
NS_ASSUME_NONNULL_BEGIN
__attribute__((availability(macosx, obsoleted = 10.13))) @protocol AVFunctionBarPlaybackControlsControlling <NSObject>;
@@ -349,22 +343,16 @@
- (instancetype)initWithTitle:(nonnull NSString *)title type:(AVTouchBarMediaSelectionOptionType)type;
@end
-@class AVThumbnail;
-
NS_ASSUME_NONNULL_END
+#endif // USE(APPLE_INTERNAL_SDK)
+#endif // ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER) && PLATFORM(MAC)
-#endif
-#endif // PLATFORM(MAC) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
-
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && HAVE(AVROUTEPICKERVIEW)
#if USE(APPLE_INTERNAL_SDK)
-
#import <AVKit/AVRoutePickerView_Private.h>
#import <AVKit/AVRoutePickerView_WebKitOnly.h>
-
#else
-
NS_ASSUME_NONNULL_BEGIN
@protocol AVRoutePickerViewDelegate;
@@ -385,6 +373,5 @@
@end
NS_ASSUME_NONNULL_END
-
#endif // USE(APPLE_INTERNAL_SDK)
#endif // ENABLE(WIRELESS_PLAYBACK_TARGET) && HAVE(AVROUTEPICKERVIEW)