Title: [275100] trunk/Source/WebCore
- Revision
- 275100
- Author
- [email protected]
- Date
- 2021-03-26 08:58:17 -0700 (Fri, 26 Mar 2021)
Log Message
Adopt AVKit SPI for hiding touch bar seeking controls
https://bugs.webkit.org/show_bug.cgi?id=223773
<rdar://problem/68937617>
Reviewed by Jer Noble.
Source/WebCore:
* platform/mac/WebPlaybackControlsManager.h:
* platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager setSeekableTimeRanges:]):
(-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):
If the list of seekable time ranges is empty, we are unable to seek.
Source/WebCore/PAL:
* pal/spi/cocoa/AVKitSPI.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (275099 => 275100)
--- trunk/Source/WebCore/ChangeLog 2021-03-26 15:50:16 UTC (rev 275099)
+++ trunk/Source/WebCore/ChangeLog 2021-03-26 15:58:17 UTC (rev 275100)
@@ -1,3 +1,17 @@
+2021-03-26 Devin Rousso <[email protected]>
+
+ Adopt AVKit SPI for hiding touch bar seeking controls
+ https://bugs.webkit.org/show_bug.cgi?id=223773
+ <rdar://problem/68937617>
+
+ Reviewed by Jer Noble.
+
+ * platform/mac/WebPlaybackControlsManager.h:
+ * platform/mac/WebPlaybackControlsManager.mm:
+ (-[WebPlaybackControlsManager setSeekableTimeRanges:]):
+ (-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):
+ If the list of seekable time ranges is empty, we are unable to seek.
+
2021-03-26 Kimmo Kinnunen <[email protected]>
GraphicsContextGLOpenGL should avoid calling into ANGLE MakeCurrent
Modified: trunk/Source/WebCore/PAL/ChangeLog (275099 => 275100)
--- trunk/Source/WebCore/PAL/ChangeLog 2021-03-26 15:50:16 UTC (rev 275099)
+++ trunk/Source/WebCore/PAL/ChangeLog 2021-03-26 15:58:17 UTC (rev 275100)
@@ -1,3 +1,13 @@
+2021-03-26 Devin Rousso <[email protected]>
+
+ Adopt AVKit SPI for hiding touch bar seeking controls
+ https://bugs.webkit.org/show_bug.cgi?id=223773
+ <rdar://problem/68937617>
+
+ Reviewed by Jer Noble.
+
+ * pal/spi/cocoa/AVKitSPI.h:
+
2021-03-26 Jessie Berlin <[email protected]>
Update the BEFORE/SINCE, SYSTEM_VERSION_PREFIX, and MACOSX_DEPLOYMENT_TARGET flags
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h (275099 => 275100)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h 2021-03-26 15:50:16 UTC (rev 275099)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h 2021-03-26 15:58:17 UTC (rev 275100)
@@ -329,6 +329,7 @@
@property (readonly, getter=isPictureInPictureActive) BOOL pictureInPictureActive;
@property (readonly) BOOL canTogglePictureInPicture;
- (void)togglePictureInPicture;
+@property (nonatomic, readonly) BOOL canSeek;
typedef NS_ENUM(NSInteger, AVTouchBarMediaSelectionOptionType) {
AVTouchBarMediaSelectionOptionTypeRegular,
Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h (275099 => 275100)
--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h 2021-03-26 15:50:16 UTC (rev 275099)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h 2021-03-26 15:58:17 UTC (rev 275100)
@@ -56,6 +56,7 @@
BOOL _hasEnabledAudio;
BOOL _hasEnabledVideo;
BOOL _canTogglePlayback;
+ BOOL _canSeek;
}
@property (assign) WebCore::PlaybackSessionInterfaceMac* playbackSessionInterfaceMac;
@@ -73,6 +74,7 @@
@property (getter=isPictureInPictureActive) BOOL pictureInPictureActive;
@property BOOL canTogglePictureInPicture;
- (void)togglePictureInPicture;
+@property (nonatomic, readonly) BOOL canSeek;
- (AVTouchBarMediaSelectionOption *)currentAudioTouchBarMediaSelectionOption;
- (void)setCurrentAudioTouchBarMediaSelectionOption:(AVTouchBarMediaSelectionOption *)option;
Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm (275099 => 275100)
--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm 2021-03-26 15:50:16 UTC (rev 275099)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm 2021-03-26 15:58:17 UTC (rev 275100)
@@ -54,6 +54,7 @@
@synthesize allowsPictureInPicturePlayback;
@synthesize pictureInPictureActive;
@synthesize canTogglePictureInPicture;
+@synthesize canSeek = _canSeek;
- (void)dealloc
{
@@ -90,6 +91,8 @@
- (void)setSeekableTimeRanges:(NSArray *)timeRanges
{
_seekableTimeRanges = timeRanges;
+
+ _canSeek = timeRanges.count;
}
- (BOOL)isSeeking
@@ -130,7 +133,7 @@
// quirk means we pretend Netflix is a live stream for Touch Bar.) It's not ideal to return YES all the time for
// other media. The intent of the API is that we return NO when the media is being scrubbed via the on-screen scrubber.
// But we can only possibly get the right answer for media that uses the default controls.
- return std::isfinite(_contentDuration) && [_seekableTimeRanges count];
+ return _canSeek && std::isfinite(_contentDuration);
}
- (void)beginTouchBarScrubbing
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes