Title: [217802] trunk/Source
Revision
217802
Author
[email protected]
Date
2017-06-05 16:04:12 -0700 (Mon, 05 Jun 2017)

Log Message

Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.

Source/WebCore:

* platform/spi/cocoa/AVKitSPI.h:

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView updateMediaTouchBar]):
* WebView/WebViewData.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (217801 => 217802)


--- trunk/Source/WebCore/ChangeLog	2017-06-05 23:01:21 UTC (rev 217801)
+++ trunk/Source/WebCore/ChangeLog	2017-06-05 23:04:12 UTC (rev 217802)
@@ -1,3 +1,9 @@
+2017-06-05  Dan Bernstein  <[email protected]>
+
+        Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.
+
+        * platform/spi/cocoa/AVKitSPI.h:
+
 2017-06-05  Konstantin Tokarev  <[email protected]>
 
         Unreviewed, fix missing semicolon in r217795

Modified: trunk/Source/WebCore/platform/spi/cocoa/AVKitSPI.h (217801 => 217802)


--- trunk/Source/WebCore/platform/spi/cocoa/AVKitSPI.h	2017-06-05 23:01:21 UTC (rev 217801)
+++ trunk/Source/WebCore/platform/spi/cocoa/AVKitSPI.h	2017-06-05 23:04:12 UTC (rev 217802)
@@ -153,15 +153,10 @@
 
 #if PLATFORM(MAC) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
 
-#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101300
 OBJC_CLASS AVFunctionBarPlaybackControlsProvider;
 OBJC_CLASS AVFunctionBarScrubber;
 OBJC_CLASS AVFunctionBarMediaSelectionOption;
-typedef AVFunctionBarMediaSelectionOption AVTouchBarMediaSelectionOption;
-typedef AVFunctionBarPlaybackControlsProvider AVTouchBarPlaybackControlsProvider;
-typedef AVFunctionBarScrubber AVTouchBarScrubber;
-#define AVTouchBarPlaybackControlsControlling AVFunctionBarPlaybackControlsControlling
-#else
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300
 OBJC_CLASS AVTouchBarPlaybackControlsProvider;
 OBJC_CLASS AVTouchBarScrubber;
 OBJC_CLASS AVTouchBarMediaSelectionOption;
@@ -176,11 +171,11 @@
 #import <AVKit/AVFunctionBarScrubber.h>
 #endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
 
-#elif __MAC_OS_X_VERSION_MAX_ALLOWED < 101300
+#else
 
 NS_ASSUME_NONNULL_BEGIN
 
-@protocol AVFunctionBarPlaybackControlsControlling <NSObject>
+__attribute__((availability(macosx,obsoleted=10.13))) @protocol AVFunctionBarPlaybackControlsControlling <NSObject>;
 @property (readonly) NSTimeInterval contentDuration;
 @property (readonly, nullable) AVValueTiming *timing;
 @property (readonly, getter=isSeeking) BOOL seeking;
@@ -190,23 +185,19 @@
 @property (readonly) BOOL hasEnabledVideo;
 @end
 
-@interface AVFunctionBarPlaybackControlsProvider : NSResponder
+__attribute__((availability(macosx,obsoleted=10.13))) @interface AVFunctionBarPlaybackControlsProvider : NSResponder
 @property (strong, readonly, nullable) NSTouchBar *touchBar;
 @property (assign, nullable) id<AVFunctionBarPlaybackControlsControlling> playbackControlsController;
 @end
 
-@interface AVFunctionBarScrubber : NSView
+@class AVThumbnail;
+
+__attribute__((availability(macosx,obsoleted=10.13))) @interface AVFunctionBarScrubber : NSView
 @property (assign, nullable) id<AVFunctionBarPlaybackControlsControlling> playbackControlsController;
 @end
 
-@class AVThumbnail;
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300
 
-NS_ASSUME_NONNULL_END
-
-#else
-
-NS_ASSUME_NONNULL_BEGIN
-
 @protocol AVTouchBarPlaybackControlsControlling <NSObject>
 @property (readonly) NSTimeInterval contentDuration;
 @property (readonly, nullable) AVValueTiming *timing;
@@ -233,6 +224,8 @@
 
 @class AVThumbnail;
 
+#endif
+
 NS_ASSUME_NONNULL_END
 
 #endif

Modified: trunk/Source/WebKit/mac/ChangeLog (217801 => 217802)


--- trunk/Source/WebKit/mac/ChangeLog	2017-06-05 23:01:21 UTC (rev 217801)
+++ trunk/Source/WebKit/mac/ChangeLog	2017-06-05 23:04:12 UTC (rev 217802)
@@ -1,3 +1,11 @@
+2017-06-05  Dan Bernstein  <[email protected]>
+
+        Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.
+
+        * WebView/WebView.mm:
+        (-[WebView updateMediaTouchBar]):
+        * WebView/WebViewData.h:
+
 2017-06-03  Darin Adler  <[email protected]>
 
         Streamline handling of attributes, using references as much as possible

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (217801 => 217802)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2017-06-05 23:01:21 UTC (rev 217801)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2017-06-05 23:04:12 UTC (rev 217802)
@@ -9825,8 +9825,13 @@
     if (![_private->mediaTouchBarProvider playbackControlsController]) {
         ASSERT(_private->playbackSessionInterface);
         WebPlaybackControlsManager *manager = _private->playbackSessionInterface->playBackControlsManager();
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
         [_private->mediaTouchBarProvider setPlaybackControlsController:(id <AVTouchBarPlaybackControlsControlling>)manager];
         [_private->mediaPlaybackControlsView setPlaybackControlsController:(id <AVTouchBarPlaybackControlsControlling>)manager];
+#else
+        [_private->mediaTouchBarProvider setPlaybackControlsController:(id <AVFunctionBarPlaybackControlsControlling>)manager];
+        [_private->mediaPlaybackControlsView setPlaybackControlsController:(id <AVFunctionBarPlaybackControlsControlling>)manager];
+#endif
     }
 #endif
 }

Modified: trunk/Source/WebKit/mac/WebView/WebViewData.h (217801 => 217802)


--- trunk/Source/WebKit/mac/WebView/WebViewData.h	2017-06-05 23:01:21 UTC (rev 217801)
+++ trunk/Source/WebKit/mac/WebView/WebViewData.h	2017-06-05 23:04:12 UTC (rev 217802)
@@ -194,8 +194,13 @@
     RetainPtr<NSCandidateListTouchBarItem> _plainTextCandidateListTouchBarItem;
     RetainPtr<NSCandidateListTouchBarItem> _passwordTextCandidateListTouchBarItem;
 #if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
     RetainPtr<AVTouchBarPlaybackControlsProvider> mediaTouchBarProvider;
     RetainPtr<AVTouchBarScrubber> mediaPlaybackControlsView;
+#else
+    RetainPtr<AVFunctionBarPlaybackControlsProvider> mediaTouchBarProvider;
+    RetainPtr<AVFunctionBarScrubber> mediaPlaybackControlsView;
+#endif
 #endif // ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
 
     BOOL _canCreateTouchBars;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to