Title: [208838] trunk/Source/WebCore
Revision
208838
Author
[email protected]
Date
2016-11-16 21:46:32 -0800 (Wed, 16 Nov 2016)

Log Message

Fix build on macOS Sierra when WEB_PLAYBACK_CONTROLS_MANAGER is enabled
https://bugs.webkit.org/show_bug.cgi?id=164845

Reviewed by Dan Bernstein.

Revert r208833 and fix the build by declaring AVFunctionBarMediaSelectionOption and AVThumbnail in AVKitSPI.h

* platform/mac/WebPlaybackControlsManager.h:
* platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]):
* platform/mac/WebPlaybackSessionInterfaceMac.mm:
(WebCore::WebPlaybackSessionInterfaceMac::seekableRangesChanged):
(WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
* platform/spi/cocoa/AVKitSPI.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (208837 => 208838)


--- trunk/Source/WebCore/ChangeLog	2016-11-17 04:32:49 UTC (rev 208837)
+++ trunk/Source/WebCore/ChangeLog	2016-11-17 05:46:32 UTC (rev 208838)
@@ -1,5 +1,24 @@
 2016-11-16  Ryosuke Niwa  <[email protected]>
 
+        Fix build on macOS Sierra when WEB_PLAYBACK_CONTROLS_MANAGER is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=164845
+
+        Reviewed by Dan Bernstein.
+
+        Revert r208833 and fix the build by declaring AVFunctionBarMediaSelectionOption and AVThumbnail in AVKitSPI.h
+
+        * platform/mac/WebPlaybackControlsManager.h:
+        * platform/mac/WebPlaybackControlsManager.mm:
+        (-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]):
+        * platform/mac/WebPlaybackSessionInterfaceMac.mm:
+        (WebCore::WebPlaybackSessionInterfaceMac::seekableRangesChanged):
+        (WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged):
+        (WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged):
+        (WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
+        * platform/spi/cocoa/AVKitSPI.h:
+
+2016-11-16  Ryosuke Niwa  <[email protected]>
+
         REGRESSION(r208082): 1% Speedometer regression on iOS
         https://bugs.webkit.org/show_bug.cgi?id=164852
 

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h (208837 => 208838)


--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h	2016-11-17 04:32:49 UTC (rev 208837)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h	2016-11-17 05:46:32 UTC (rev 208838)
@@ -46,12 +46,10 @@
     RetainPtr<NSArray> _seekableTimeRanges;
     BOOL _hasEnabledAudio;
     BOOL _hasEnabledVideo;
-#if USE(APPLE_INTERNAL_SDK)
     RetainPtr<NSArray<AVFunctionBarMediaSelectionOption *>> _audioFunctionBarMediaSelectionOptions;
     RetainPtr<AVFunctionBarMediaSelectionOption> _currentAudioFunctionBarMediaSelectionOption;
     RetainPtr<NSArray<AVFunctionBarMediaSelectionOption *>> _legibleFunctionBarMediaSelectionOptions;
     RetainPtr<AVFunctionBarMediaSelectionOption> _currentLegibleFunctionBarMediaSelectionOption;
-#endif
     float _rate;
     BOOL _playing;
     BOOL _canTogglePlayback;
@@ -72,7 +70,6 @@
 
 @property (nonatomic) float rate;
 
-#if USE(APPLE_INTERNAL_SDK)
 - (AVFunctionBarMediaSelectionOption *)currentAudioFunctionBarMediaSelectionOption;
 - (void)setCurrentAudioFunctionBarMediaSelectionOption:(AVFunctionBarMediaSelectionOption *)option;
 - (AVFunctionBarMediaSelectionOption *)currentLegibleFunctionBarMediaSelectionOption;
@@ -79,7 +76,6 @@
 - (void)setCurrentLegibleFunctionBarMediaSelectionOption:(AVFunctionBarMediaSelectionOption *)option;
 - (void)setAudioMediaSelectionOptions:(const Vector<WTF::String>&)options withSelectedIndex:(NSUInteger)selectedIndex;
 - (void)setLegibleMediaSelectionOptions:(const Vector<WTF::String>&)options withSelectedIndex:(NSUInteger)selectedIndex;
-#endif
 @end
 
 #endif // ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm (208837 => 208838)


--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2016-11-17 04:32:49 UTC (rev 208837)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2016-11-17 05:46:32 UTC (rev 208838)
@@ -90,7 +90,6 @@
 {
 }
 
-#if USE(APPLE_INTERNAL_SDK)
 - (void)generateFunctionBarThumbnailsForTimes:(NSArray<NSNumber *> *)thumbnailTimes size:(NSSize)size completionHandler:(void (^)(NSArray<AVThumbnail *> *thumbnails, NSError *error))completionHandler
 {
     UNUSED_PARAM(thumbnailTimes);
@@ -103,7 +102,6 @@
     UNUSED_PARAM(numberOfSamples);
     completionHandler(@[ ], nil);
 }
-#endif
 
 -(BOOL)canBeginFunctionBarScrubbing
 {
@@ -123,7 +121,6 @@
     _webPlaybackSessionInterfaceMac->endScrubbing();
 }
 
-#if USE(APPLE_INTERNAL_SDK)
 - (NSArray<AVFunctionBarMediaSelectionOption *> *)audioFunctionBarMediaSelectionOptions
 {
     return _audioFunctionBarMediaSelectionOptions.get();
@@ -209,7 +206,7 @@
     if (selectedIndex < [webOptions count])
         [self setCurrentLegibleFunctionBarMediaSelectionOption:[webOptions objectAtIndex:selectedIndex]];
 }
-#endif
+
 - (WebCore::WebPlaybackSessionInterfaceMac*)webPlaybackSessionInterfaceMac
 {
     return _webPlaybackSessionInterfaceMac.get();

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm (208837 => 208838)


--- trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm	2016-11-17 04:32:49 UTC (rev 208837)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm	2016-11-17 05:46:32 UTC (rev 208838)
@@ -131,7 +131,7 @@
 
 void WebPlaybackSessionInterfaceMac::seekableRangesChanged(const TimeRanges& timeRanges)
 {
-#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER) && USE(APPLE_INTERNAL_SDK)
+#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
     [playBackControlsManager() setSeekableTimeRanges:timeRangesToArray(timeRanges).get()];
 #else
     UNUSED_PARAM(timeRanges);
@@ -140,7 +140,7 @@
 
 void WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged(const Vector<WTF::String>& options, uint64_t selectedIndex)
 {
-#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER) && USE(APPLE_INTERNAL_SDK)
+#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
     [playBackControlsManager() setAudioMediaSelectionOptions:options withSelectedIndex:static_cast<NSUInteger>(selectedIndex)];
 #else
     UNUSED_PARAM(options);
@@ -150,7 +150,7 @@
 
 void WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged(const Vector<WTF::String>& options, uint64_t selectedIndex)
 {
-#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER) && USE(APPLE_INTERNAL_SDK)
+#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
     [playBackControlsManager() setLegibleMediaSelectionOptions:options withSelectedIndex:static_cast<NSUInteger>(selectedIndex)];
 #else
     UNUSED_PARAM(options);
@@ -198,10 +198,8 @@
     manager.seekableTimeRanges = timeRangesToArray(m_playbackSessionModel->seekableRanges()).get();
     manager.canTogglePlayback = YES;
     manager.playing = m_playbackSessionModel->isPlaying();
-#if USE(APPLE_INTERNAL_SDK)
     [manager setAudioMediaSelectionOptions:m_playbackSessionModel->audioMediaSelectionOptions() withSelectedIndex:static_cast<NSUInteger>(m_playbackSessionModel->audioMediaSelectedIndex())];
     [manager setLegibleMediaSelectionOptions:m_playbackSessionModel->legibleMediaSelectionOptions() withSelectedIndex:static_cast<NSUInteger>(m_playbackSessionModel->legibleMediaSelectedIndex())];
-#endif
 }
 
 void WebPlaybackSessionInterfaceMac::updatePlaybackControlsManagerTiming(double currentTime, double anchorTime, double playbackRate, bool isPlaying)

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


--- trunk/Source/WebCore/platform/spi/cocoa/AVKitSPI.h	2016-11-17 04:32:49 UTC (rev 208837)
+++ trunk/Source/WebCore/platform/spi/cocoa/AVKitSPI.h	2016-11-17 05:46:32 UTC (rev 208838)
@@ -179,6 +179,9 @@
 @property (assign, nullable) id<AVFunctionBarPlaybackControlsControlling> playbackControlsController;
 @end
 
+@class AVFunctionBarMediaSelectionOption;
+@class AVThumbnail;
+
 NS_ASSUME_NONNULL_END
 
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to