Diff
Modified: trunk/Source/WTF/ChangeLog (264718 => 264719)
--- trunk/Source/WTF/ChangeLog 2020-07-22 19:00:40 UTC (rev 264718)
+++ trunk/Source/WTF/ChangeLog 2020-07-22 19:27:05 UTC (rev 264719)
@@ -1,3 +1,9 @@
+2020-07-22 Jer Noble <jer.no...@apple.com>
+
+ Unreviewed build fix after r264710; add a HAVE_AVPLAYER_VIDEORANGEOVERRIDE guard.
+
+ * wtf/PlatformHave.h:
+
2020-07-22 Geoffrey Garen <gga...@apple.com>
JSRunLoopTimer should use WTF::RunLoop rather than custom CF code
Modified: trunk/Source/WTF/wtf/PlatformHave.h (264718 => 264719)
--- trunk/Source/WTF/wtf/PlatformHave.h 2020-07-22 19:00:40 UTC (rev 264718)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2020-07-22 19:27:05 UTC (rev 264719)
@@ -550,6 +550,10 @@
#define HAVE_AVASSETWRITERDELEGATE 1
#endif
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101600
+#define HAVE_AVPLAYER_VIDEORANGEOVERRIDE 1
+#endif
+
#if PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
#define HAVE_CG_PATH_UNEVEN_CORNERS_ROUNDEDRECT 1
#endif
Modified: trunk/Source/WebCore/ChangeLog (264718 => 264719)
--- trunk/Source/WebCore/ChangeLog 2020-07-22 19:00:40 UTC (rev 264718)
+++ trunk/Source/WebCore/ChangeLog 2020-07-22 19:27:05 UTC (rev 264719)
@@ -1,3 +1,11 @@
+2020-07-22 Jer Noble <jer.no...@apple.com>
+
+ Unreviewed build fix after r264710; add a HAVE_AVPLAYER_VIDEORANGEOVERRIDE guard.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::setPreferredDynamicRangeMode):
+
2020-07-22 Myles C. Maxfield <mmaxfi...@apple.com>
REGRESSION(r205826): narrowNoBreakSpace (U+202F) has zero width, regardless of font
Modified: trunk/Source/WebCore/PAL/ChangeLog (264718 => 264719)
--- trunk/Source/WebCore/PAL/ChangeLog 2020-07-22 19:00:40 UTC (rev 264718)
+++ trunk/Source/WebCore/PAL/ChangeLog 2020-07-22 19:27:05 UTC (rev 264719)
@@ -1,5 +1,11 @@
2020-07-22 Jer Noble <jer.no...@apple.com>
+ Unreviewed build fix after r264710; add a HAVE_AVPLAYER_VIDEORANGEOVERRIDE guard.
+
+ * pal/spi/cocoa/AVFoundationSPI.h:
+
+2020-07-22 Jer Noble <jer.no...@apple.com>
+
[macOS] Adopt AVPlayer.videoRangeOverride
https://bugs.webkit.org/show_bug.cgi?id=213902
<rdar://problem/63953509>
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h (264718 => 264719)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h 2020-07-22 19:00:40 UTC (rev 264718)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h 2020-07-22 19:27:05 UTC (rev 264719)
@@ -64,11 +64,13 @@
@end
NS_ASSUME_NONNULL_END
+#if HAVE(AVPLAYER_VIDEORANGEOVERRIDE)
typedef NSString * AVVideoRange NS_TYPED_ENUM;
@interface AVPlayer (AVPlayerVideoRangeOverride)
@property (nonatomic, copy, nullable) AVVideoRange videoRangeOverride;
+ (nullable AVVideoRange)preferredVideoRangeForDisplays:(nonnull NSArray <NSNumber *>*)displays;
@end
+#endif
#if ENABLE(WIRELESS_PLAYBACK_TARGET) || PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (264718 => 264719)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2020-07-22 19:00:40 UTC (rev 264718)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2020-07-22 19:27:05 UTC (rev 264719)
@@ -912,8 +912,10 @@
setShouldObserveTimeControlStatus(true);
m_avPlayer.get().appliesMediaSelectionCriteriaAutomatically = NO;
+#if HAVE(AVPLAYER_VIDEORANGEOVERRIDE)
if ([m_avPlayer respondsToSelector:@selector(setVideoRangeOverride:)])
m_avPlayer.get().videoRangeOverride = convertDynamicRangeModeEnumToAVVideoRange(player()->preferredDynamicRangeMode());
+#endif
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
updateDisableExternalPlayback();
@@ -3271,8 +3273,12 @@
void MediaPlayerPrivateAVFoundationObjC::setPreferredDynamicRangeMode(DynamicRangeMode mode)
{
+#if HAVE(AVPLAYER_VIDEORANGEOVERRIDE)
if (m_avPlayer && [m_avPlayer respondsToSelector:@selector(setVideoRangeOverride:)])
m_avPlayer.get().videoRangeOverride = convertDynamicRangeModeEnumToAVVideoRange(mode);
+#else
+ UNUSED_PARAM(mode);
+#endif
}
NSArray* assetMetadataKeyNames()
Modified: trunk/Source/WebKit/ChangeLog (264718 => 264719)
--- trunk/Source/WebKit/ChangeLog 2020-07-22 19:00:40 UTC (rev 264718)
+++ trunk/Source/WebKit/ChangeLog 2020-07-22 19:27:05 UTC (rev 264719)
@@ -1,5 +1,12 @@
2020-07-22 Jer Noble <jer.no...@apple.com>
+ Unreviewed build fix after r264710; add a HAVE_AVPLAYER_VIDEORANGEOVERRIDE guard.
+
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::updatePageScreenProperties):
+
+2020-07-22 Jer Noble <jer.no...@apple.com>
+
[macOS] Adopt AVPlayer.videoRangeOverride
https://bugs.webkit.org/show_bug.cgi?id=213902
<rdar://problem/63953509>
Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (264718 => 264719)
--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-07-22 19:00:40 UTC (rev 264718)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-07-22 19:27:05 UTC (rev 264719)
@@ -1014,11 +1014,13 @@
#if PLATFORM(MAC)
void WebProcess::updatePageScreenProperties()
{
+#if HAVE(AVPLAYER_VIDEORANGEOVERRIDE)
// If AVPlayer.videoRangeOverride support is present, there's no need to override HDR mode
// at the MediaToolbox level, as the MediaToolbox override functionality is both duplicative
// and process global.
if (PAL::isAVFoundationFrameworkAvailable() && [PAL::getAVPlayerClass() instancesRespondToSelector:@selector(setVideoRangeOverride:)])
return;
+#endif
if (hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)) {
setShouldOverrideScreenSupportsHighDynamicRange(false, false);