Diff
Modified: trunk/LayoutTests/ChangeLog (251297 => 251298)
--- trunk/LayoutTests/ChangeLog 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/LayoutTests/ChangeLog 2019-10-18 22:00:48 UTC (rev 251298)
@@ -1,3 +1,16 @@
+2019-10-18 Jer Noble <jer.no...@apple.com>
+
+ Add experimental HDR MediaCapabilities support.
+ https://bugs.webkit.org/show_bug.cgi?id=203113
+
+ Reviewed by Eric Carlson.
+
+ * media/mediacapabilities/mock-decodingInfo-alphaChannel-expected.txt:
+ * media/mediacapabilities/mock-decodingInfo-hdr-expected.txt: Added.
+ * media/mediacapabilities/mock-decodingInfo-hdr.html: Added.
+ * platform/mac/media/mediacapabilities/hevc-decodingInfo-hdr-expected.txt: Added.
+ * platform/mac/media/mediacapabilities/hevc-decodingInfo-hdr.html: Added.
+
2019-10-18 Jiewen Tan <jiewen_...@apple.com>
[WebAuthn] Implement AuthenticatorCancel
Modified: trunk/LayoutTests/media/mediacapabilities/mock-decodingInfo-alphaChannel-expected.txt (251297 => 251298)
--- trunk/LayoutTests/media/mediacapabilities/mock-decodingInfo-alphaChannel-expected.txt 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/LayoutTests/media/mediacapabilities/mock-decodingInfo-alphaChannel-expected.txt 2019-10-18 22:00:48 UTC (rev 251298)
@@ -10,7 +10,7 @@
EXPECTED (info.supportedConfiguration.video.alphaChannel == 'false') OK
RUN(promise = navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="mock-with-alpha"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5, alphaChannel: true }});)
Promise resolved OK
-EXPECTED (info.supported == 'true'), OBSERVED 'false' FAIL
+EXPECTED (info.supported == 'true') OK
EXPECTED (info.supportedConfiguration.video.alphaChannel == 'true') OK
RUN(promise = navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="mock-without-alpha"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5, alphaChannel: false }});)
Promise resolved OK
Added: trunk/LayoutTests/media/mediacapabilities/mock-decodingInfo-hdr-expected.txt (0 => 251298)
--- trunk/LayoutTests/media/mediacapabilities/mock-decodingInfo-hdr-expected.txt (rev 0)
+++ trunk/LayoutTests/media/mediacapabilities/mock-decodingInfo-hdr-expected.txt 2019-10-18 22:00:48 UTC (rev 251298)
@@ -0,0 +1,17 @@
+RUN(internals.enableMockMediaCapabilities())
+RUN(internals.settings.setMediaCapabilitiesExtensionsEnabled(true))
+RUN(internals.settings.setHDRMediaCapabilitiesEnabled(true))
+RUN(promise = navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="mock-with-hdr"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5 }});)
+Promise resolved OK
+EXPECTED (info.supported == 'true') OK
+EXPECTED (info.supportedConfiguration.video.colorGamut == 'null') OK
+RUN(promise = navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="mock-with-hdr"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5, colorGamut: 'rec2020' }});)
+Promise resolved OK
+EXPECTED (info.supported == 'true') OK
+EXPECTED (info.supportedConfiguration.video.colorGamut == 'rec2020') OK
+RUN(promise = navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="mock"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5, colorGamut: 'rec2020' }});)
+Promise resolved OK
+EXPECTED (info.supported == 'false') OK
+EXPECTED (info.supportedConfiguration.video.colorGamut == 'rec2020') OK
+END OF TEST
+
Added: trunk/LayoutTests/media/mediacapabilities/mock-decodingInfo-hdr.html (0 => 251298)
--- trunk/LayoutTests/media/mediacapabilities/mock-decodingInfo-hdr.html (rev 0)
+++ trunk/LayoutTests/media/mediacapabilities/mock-decodingInfo-hdr.html 2019-10-18 22:00:48 UTC (rev 251298)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script type="text/_javascript_">
+ var promise;
+ var info;
+
+ async function doTest()
+ {
+ if (!window.internals) {
+ failTest("Internals is required for this test.")
+ return;
+ }
+
+ run('internals.enableMockMediaCapabilities()');
+ run('internals.settings.setMediaCapabilitiesExtensionsEnabled(true)');
+ run('internals.settings.setHDRMediaCapabilitiesEnabled(true)');
+
+ run("promise = navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs=\"mock-with-hdr\"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5 }});");
+ info = await shouldResolve(promise);
+ testExpected('info.supported', true);
+ testExpected('info.supportedConfiguration.video.colorGamut', null);
+
+ run("promise = navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs=\"mock-with-hdr\"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5, colorGamut: 'rec2020' }});");
+ info = await shouldResolve(promise);
+ testExpected('info.supported', true);
+ testExpected('info.supportedConfiguration.video.colorGamut', 'rec2020');
+
+ run("promise = navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs=\"mock\"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5, colorGamut: 'rec2020' }});");
+ info = await shouldResolve(promise);
+ testExpected('info.supported', false);
+ testExpected('info.supportedConfiguration.video.colorGamut', 'rec2020');
+
+ endTest();
+ }
+ </script>
+</head>
+<body _onload_="doTest()" />
+</html>
Added: trunk/LayoutTests/platform/mac/media/mediacapabilities/hevc-decodingInfo-hdr-expected.txt (0 => 251298)
--- trunk/LayoutTests/platform/mac/media/mediacapabilities/hevc-decodingInfo-hdr-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/media/mediacapabilities/hevc-decodingInfo-hdr-expected.txt 2019-10-18 22:00:48 UTC (rev 251298)
@@ -0,0 +1,16 @@
+RUN(internals.settings.setMediaCapabilitiesExtensionsEnabled(true))
+RUN(internals.settings.setHDRMediaCapabilitiesEnabled(true))
+RUN(promise = navigator.mediaCapabilities.decodingInfo({ type: 'media-source', video: { contentType: 'video/mp4; codecs="hvc1.2.4.H153.B0"', height: 720, bitrate: 800000, width: 1280, framerate: 24.5 }});)
+Promise resolved OK
+EXPECTED (info.supported == 'true') OK
+EXPECTED (info.supportedConfiguration.video.hdrMetadataType == 'null') OK
+RUN(promise = navigator.mediaCapabilities.decodingInfo({ type: 'media-source', video: { contentType: 'video/mp4; codecs="hvc1.2.4.H153.B0"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5, hdrMetadataType: 'smpteSt2086', transferFunction: 'pq' }});)
+Promise resolved OK
+EXPECTED (info.supported == 'true') OK
+EXPECTED (info.supportedConfiguration.video.hdrMetadataType == 'smpteSt2086') OK
+RUN(promise = navigator.mediaCapabilities.decodingInfo({ type: 'media-source', video: { contentType: 'video/mp4; codecs="avc1.640028"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5, hdrMetadataType: 'smpteSt2086', transferFunction: 'pq' }});)
+Promise resolved OK
+EXPECTED (info.supported == 'false') OK
+EXPECTED (info.supportedConfiguration.video.hdrMetadataType == 'smpteSt2086') OK
+END OF TEST
+
Added: trunk/LayoutTests/platform/mac/media/mediacapabilities/hevc-decodingInfo-hdr.html (0 => 251298)
--- trunk/LayoutTests/platform/mac/media/mediacapabilities/hevc-decodingInfo-hdr.html (rev 0)
+++ trunk/LayoutTests/platform/mac/media/mediacapabilities/hevc-decodingInfo-hdr.html 2019-10-18 22:00:48 UTC (rev 251298)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src=""
+ <script type="text/_javascript_">
+ var promise;
+ var info;
+
+ async function doTest()
+ {
+ if (!window.internals) {
+ failTest("Internals is required for this test.")
+ return;
+ }
+
+ run('internals.settings.setMediaCapabilitiesExtensionsEnabled(true)');
+ run('internals.settings.setHDRMediaCapabilitiesEnabled(true)');
+
+ run("promise = navigator.mediaCapabilities.decodingInfo({ type: 'media-source', video: { contentType: 'video/mp4; codecs=\"hvc1.2.4.H153.B0\"', height: 720, bitrate: 800000, width: 1280, framerate: 24.5 }});");
+ info = await shouldResolve(promise);
+ testExpected('info.supported', true);
+ testExpected('info.supportedConfiguration.video.hdrMetadataType', null);
+
+ run("promise = navigator.mediaCapabilities.decodingInfo({ type: 'media-source', video: { contentType: 'video/mp4; codecs=\"hvc1.2.4.H153.B0\"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5, hdrMetadataType: 'smpteSt2086', transferFunction: 'pq' }});");
+ info = await shouldResolve(promise);
+ testExpected('info.supported', true);
+ testExpected('info.supportedConfiguration.video.hdrMetadataType', 'smpteSt2086');
+
+ run("promise = navigator.mediaCapabilities.decodingInfo({ type: 'media-source', video: { contentType: 'video/mp4; codecs=\"avc1.640028\"', height: 720, bitrate: 1000, width: 1280, framerate: 24.5, hdrMetadataType: 'smpteSt2086', transferFunction: 'pq' }});");
+ info = await shouldResolve(promise);
+ testExpected('info.supported', false);
+ testExpected('info.supportedConfiguration.video.hdrMetadataType', 'smpteSt2086');
+
+ endTest();
+ }
+ </script>
+</head>
+<body _onload_="doTest()" />
+</html>
Modified: trunk/Source/WebCore/CMakeLists.txt (251297 => 251298)
--- trunk/Source/WebCore/CMakeLists.txt 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/CMakeLists.txt 2019-10-18 22:00:48 UTC (rev 251298)
@@ -292,6 +292,8 @@
Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl
Modules/mediacapabilities/AudioConfiguration.idl
+ Modules/mediacapabilities/ColorGamut.idl
+ Modules/mediacapabilities/HdrMetadataType.idl
Modules/mediacapabilities/MediaCapabilities.idl
Modules/mediacapabilities/MediaCapabilitiesDecodingInfo.idl
Modules/mediacapabilities/MediaCapabilitiesEncodingInfo.idl
@@ -302,8 +304,7 @@
Modules/mediacapabilities/MediaEncodingConfiguration.idl
Modules/mediacapabilities/MediaEncodingType.idl
Modules/mediacapabilities/NavigatorMediaCapabilities.idl
- Modules/mediacapabilities/ScreenColorGamut.idl
- Modules/mediacapabilities/ScreenLuminance.idl
+ Modules/mediacapabilities/TransferFunction.idl
Modules/mediacapabilities/VideoConfiguration.idl
Modules/mediacontrols/MediaControlsHost.idl
Modified: trunk/Source/WebCore/ChangeLog (251297 => 251298)
--- trunk/Source/WebCore/ChangeLog 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/ChangeLog 2019-10-18 22:00:48 UTC (rev 251298)
@@ -1,3 +1,45 @@
+2019-10-18 Jer Noble <jer.no...@apple.com>
+
+ Add experimental HDR MediaCapabilities support.
+ https://bugs.webkit.org/show_bug.cgi?id=203113
+
+ Reviewed by Eric Carlson.
+
+ Tests: media/mediacapabilities/mock-decodingInfo-hdr.html
+ platform/mac/media/mediacapabilities/hevc-decodingInfo-hdr.html
+
+ Add support for MediaCapabilities.decodeInfo() HDR support detection.
+
+ Add new enum IDL types to MediaCapabilities and remove old unused ones. Add
+ mock implementation for HDR detection. Add Cocoa platform implementation.
+
+ * CMakeLists.txt:
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources-output.xcfilelist:
+ * DerivedSources.make:
+ * Modules/mediacapabilities/ColorGamut.idl:
+ * Modules/mediacapabilities/HdrMetadataType.idl:
+ * Modules/mediacapabilities/ScreenLuminance.h:
+ * Modules/mediacapabilities/TransferFunction.idl:
+ * Modules/mediacapabilities/VideoConfiguration.idl:
+ * Scripts/GenerateSettings.rb:
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/scripts/CodeGenerator.pm:
+ (WK_ucfirst):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (ToMethodName):
+ * page/Settings.yaml:
+ * platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:
+ (WebCore::createMediaPlayerDecodingConfigurationCocoa):
+ * platform/mediacapabilities/ColorGamut.h:
+ * platform/mediacapabilities/HdrMetadataType.h:
+ * platform/mediacapabilities/TransferFunction.h:
+ * platform/mediacapabilities/VideoConfiguration.h:
+ * platform/mock/MediaEngineConfigurationFactoryMock.cpp:
+ (WebCore::canDecodeMedia):
+ (WebCore::canEncodeMedia):
+
2019-10-18 Jiewen Tan <jiewen_...@apple.com>
[WebAuthn] Implement AuthenticatorCancel
Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (251297 => 251298)
--- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2019-10-18 22:00:48 UTC (rev 251298)
@@ -129,6 +129,8 @@
$(PROJECT_DIR)/Modules/indexeddb/IDBVersionChangeEvent.idl
$(PROJECT_DIR)/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl
$(PROJECT_DIR)/Modules/mediacapabilities/AudioConfiguration.idl
+$(PROJECT_DIR)/Modules/mediacapabilities/ColorGamut.idl
+$(PROJECT_DIR)/Modules/mediacapabilities/HdrMetadataType.idl
$(PROJECT_DIR)/Modules/mediacapabilities/MediaCapabilities.idl
$(PROJECT_DIR)/Modules/mediacapabilities/MediaCapabilitiesDecodingInfo.idl
$(PROJECT_DIR)/Modules/mediacapabilities/MediaCapabilitiesEncodingInfo.idl
@@ -139,8 +141,7 @@
$(PROJECT_DIR)/Modules/mediacapabilities/MediaEncodingConfiguration.idl
$(PROJECT_DIR)/Modules/mediacapabilities/MediaEncodingType.idl
$(PROJECT_DIR)/Modules/mediacapabilities/NavigatorMediaCapabilities.idl
-$(PROJECT_DIR)/Modules/mediacapabilities/ScreenColorGamut.idl
-$(PROJECT_DIR)/Modules/mediacapabilities/ScreenLuminance.idl
+$(PROJECT_DIR)/Modules/mediacapabilities/TransferFunction.idl
$(PROJECT_DIR)/Modules/mediacapabilities/VideoConfiguration.idl
$(PROJECT_DIR)/Modules/mediacontrols/MediaControlsHost.idl
$(PROJECT_DIR)/Modules/mediarecorder/BlobEvent.idl
Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (251297 => 251298)
--- trunk/Source/WebCore/DerivedSources-output.xcfilelist 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist 2019-10-18 22:00:48 UTC (rev 251298)
@@ -298,6 +298,8 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSClipboardItem.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCloseEvent.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCloseEvent.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSColorGamut.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSColorGamut.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCommandLineAPIHost.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCommandLineAPIHost.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSComment.cpp
@@ -863,6 +865,8 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHTMLVideoElementPictureInPicture.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHashChangeEvent.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHashChangeEvent.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHdrMetadataType.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHdrMetadataType.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHistory.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHistory.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSHkdfParams.cpp
@@ -1711,10 +1715,6 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSSVGZoomEvent.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSScreen.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSScreen.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSScreenColorGamut.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSScreenColorGamut.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSScreenLuminance.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSScreenLuminance.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSScriptProcessorNode.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSScriptProcessorNode.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSScrollIntoViewOptions.cpp
@@ -1829,6 +1829,8 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTouchList.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTrackEvent.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTrackEvent.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTransferFunction.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTransferFunction.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTransitionEvent.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTransitionEvent.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTreeWalker.cpp
Modified: trunk/Source/WebCore/DerivedSources.make (251297 => 251298)
--- trunk/Source/WebCore/DerivedSources.make 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/DerivedSources.make 2019-10-18 22:00:48 UTC (rev 251298)
@@ -203,6 +203,8 @@
$(WebCore)/Modules/indexeddb/IDBVersionChangeEvent.idl \
$(WebCore)/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl \
$(WebCore)/Modules/mediacapabilities/AudioConfiguration.idl \
+ $(WebCore)/Modules/mediacapabilities/ColorGamut.idl \
+ $(WebCore)/Modules/mediacapabilities/HdrMetadataType.idl \
$(WebCore)/Modules/mediacapabilities/MediaCapabilities.idl \
$(WebCore)/Modules/mediacapabilities/MediaCapabilitiesDecodingInfo.idl \
$(WebCore)/Modules/mediacapabilities/MediaCapabilitiesEncodingInfo.idl \
@@ -213,8 +215,7 @@
$(WebCore)/Modules/mediacapabilities/MediaEncodingConfiguration.idl \
$(WebCore)/Modules/mediacapabilities/MediaEncodingType.idl \
$(WebCore)/Modules/mediacapabilities/NavigatorMediaCapabilities.idl \
- $(WebCore)/Modules/mediacapabilities/ScreenColorGamut.idl \
- $(WebCore)/Modules/mediacapabilities/ScreenLuminance.idl \
+ $(WebCore)/Modules/mediacapabilities/TransferFunction.idl \
$(WebCore)/Modules/mediacapabilities/VideoConfiguration.idl \
$(WebCore)/Modules/mediacontrols/MediaControlsHost.idl \
$(WebCore)/Modules/mediarecorder/BlobEvent.idl \
Copied: trunk/Source/WebCore/Modules/mediacapabilities/ColorGamut.idl (from rev 251297, trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.idl) (0 => 251298)
--- trunk/Source/WebCore/Modules/mediacapabilities/ColorGamut.idl (rev 0)
+++ trunk/Source/WebCore/Modules/mediacapabilities/ColorGamut.idl 2019-10-18 22:00:48 UTC (rev 251298)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum ColorGamut {
+ "srgb",
+ "p3",
+ "rec2020"
+};
Copied: trunk/Source/WebCore/Modules/mediacapabilities/HdrMetadataType.idl (from rev 251297, trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.idl) (0 => 251298)
--- trunk/Source/WebCore/Modules/mediacapabilities/HdrMetadataType.idl (rev 0)
+++ trunk/Source/WebCore/Modules/mediacapabilities/HdrMetadataType.idl 2019-10-18 22:00:48 UTC (rev 251298)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum HdrMetadataType {
+ "smpteSt2086",
+ "smpteSt2094-10",
+ "smpteSt2094-40"
+};
Deleted: trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h (251297 => 251298)
--- trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h 2019-10-18 22:00:48 UTC (rev 251298)
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-namespace WebCore {
-
-enum class ScreenColorGamut {
- SRGB,
- P3,
- Rec2020,
-};
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.idl (251297 => 251298)
--- trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.idl 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.idl 2019-10-18 22:00:48 UTC (rev 251298)
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-enum ScreenColorGamut {
- "srgb",
- "p3",
- "rec2020"
-};
Deleted: trunk/Source/WebCore/Modules/mediacapabilities/ScreenLuminance.h (251297 => 251298)
--- trunk/Source/WebCore/Modules/mediacapabilities/ScreenLuminance.h 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/Modules/mediacapabilities/ScreenLuminance.h 2019-10-18 22:00:48 UTC (rev 251298)
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-class ScreenLuminance : public RefCounted<ScreenLuminance> {
-public:
- double min() const { return m_min; }
- void setMin(double min) { m_min = min; }
-
- double max() const { return m_max; }
- void setMax(double max) { m_max = max; }
-
- double maxAverage() const { return m_maxAverage; }
- void setMaxAverage(double maxAverage) { m_maxAverage = maxAverage; }
-
-private:
- double m_min { 0 };
- double m_max { 0 };
- double m_maxAverage { 0 };
-};
-
-}
Deleted: trunk/Source/WebCore/Modules/mediacapabilities/ScreenLuminance.idl (251297 => 251298)
--- trunk/Source/WebCore/Modules/mediacapabilities/ScreenLuminance.idl 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/Modules/mediacapabilities/ScreenLuminance.idl 2019-10-18 22:00:48 UTC (rev 251298)
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
- EnabledBySetting=MediaCapabilities,
- ImplementationLacksVTable
-]
-interface ScreenLuminance {
- readonly attribute double min;
- readonly attribute double max;
- readonly attribute double maxAverage;
-};
Copied: trunk/Source/WebCore/Modules/mediacapabilities/TransferFunction.idl (from rev 251297, trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.idl) (0 => 251298)
--- trunk/Source/WebCore/Modules/mediacapabilities/TransferFunction.idl (rev 0)
+++ trunk/Source/WebCore/Modules/mediacapabilities/TransferFunction.idl 2019-10-18 22:00:48 UTC (rev 251298)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum TransferFunction {
+ "srgb",
+ "pq",
+ "hlg"
+};
Modified: trunk/Source/WebCore/Modules/mediacapabilities/VideoConfiguration.idl (251297 => 251298)
--- trunk/Source/WebCore/Modules/mediacapabilities/VideoConfiguration.idl 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/Modules/mediacapabilities/VideoConfiguration.idl 2019-10-18 22:00:48 UTC (rev 251298)
@@ -34,4 +34,7 @@
required unsigned long long bitrate;
required double framerate;
[EnabledBySetting=MediaCapabilitiesExtensions] boolean alphaChannel;
+ [EnabledBySetting=HDRMediaCapabilities] HdrMetadataType hdrMetadataType;
+ [EnabledBySetting=HDRMediaCapabilities] ColorGamut colorGamut;
+ [EnabledBySetting=HDRMediaCapabilities] TransferFunction transferFunction;
};
Modified: trunk/Source/WebCore/Scripts/GenerateSettings.rb (251297 => 251298)
--- trunk/Source/WebCore/Scripts/GenerateSettings.rb 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/Scripts/GenerateSettings.rb 2019-10-18 22:00:48 UTC (rev 251298)
@@ -120,7 +120,7 @@
end
def setterFunctionName
- if @name.start_with?("css", "xss", "ftp", "dom", "dns", "ice")
+ if @name.start_with?("css", "xss", "ftp", "dom", "dns", "ice", "hdr")
"set" + @name[0..2].upcase + @name[3..@name.length]
else
"set" + @name[0].upcase + @name[1..@name.length]
Modified: trunk/Source/WebCore/Sources.txt (251297 => 251298)
--- trunk/Source/WebCore/Sources.txt 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/Sources.txt 2019-10-18 22:00:48 UTC (rev 251298)
@@ -2709,6 +2709,7 @@
JSClipboardEvent.cpp
JSClipboardItem.cpp
JSCloseEvent.cpp
+JSColorGamut.cpp
JSCommandLineAPIHost.cpp
JSComment.cpp
JSCompositionEvent.cpp
@@ -2969,6 +2970,7 @@
JSHTMLVideoElement.cpp
JSHTMLVideoElementPictureInPicture.cpp
JSHashChangeEvent.cpp
+JSHdrMetadataType.cpp
JSHistory.cpp
JSHkdfParams.cpp
JSHmacKeyParams.cpp
@@ -3353,7 +3355,6 @@
JSSVGZoomAndPan.cpp
JSSVGZoomEvent.cpp
JSScreen.cpp
-JSScreenLuminance.cpp
JSScriptProcessorNode.cpp
JSScrollIntoViewOptions.cpp
JSScrollLogicalPosition.cpp
@@ -3394,6 +3395,7 @@
JSTextEvent.cpp
JSTextMetrics.cpp
JSTimeRanges.cpp
+JSTransferFunction.cpp
JSTransitionEvent.cpp
JSTreeWalker.cpp
JSUndoItem.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (251297 => 251298)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2019-10-18 22:00:48 UTC (rev 251298)
@@ -13649,6 +13649,41 @@
CD4AC5281496AE2F0087C4EF /* Composite.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = Composite.wav; path = platform/audio/resources/Composite.wav; sourceTree = SOURCE_ROOT; };
CD4BE5291CE13425009D87DA /* GenericTaskQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GenericTaskQueue.cpp; sourceTree = "<group>"; };
CD4E0AFA11F7BC27009D3811 /* fullscreen.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = fullscreen.css; sourceTree = "<group>"; };
+ CD4E4E602357B317007895C3 /* HdrMetadataType.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = HdrMetadataType.idl; sourceTree = "<group>"; };
+ CD4E4E622357B3AD007895C3 /* TransferFunction.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = TransferFunction.idl; sourceTree = "<group>"; };
+ CD4E4E6C2357B556007895C3 /* JSMediaCapabilitiesEncodingInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaCapabilitiesEncodingInfo.h; sourceTree = "<group>"; };
+ CD4E4E6D2357B556007895C3 /* JSMediaCapabilitiesDecodingInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaCapabilitiesDecodingInfo.h; sourceTree = "<group>"; };
+ CD4E4E6E2357B556007895C3 /* JSMediaCapabilitiesInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaCapabilitiesInfo.h; sourceTree = "<group>"; };
+ CD4E4E6F2357B557007895C3 /* JSMediaCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaCapabilities.h; sourceTree = "<group>"; };
+ CD4E4E702357B557007895C3 /* JSMediaCapabilitiesInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaCapabilitiesInfo.cpp; sourceTree = "<group>"; };
+ CD4E4E712357B557007895C3 /* JSMediaCapabilitiesEncodingInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaCapabilitiesEncodingInfo.cpp; sourceTree = "<group>"; };
+ CD4E4E722357B558007895C3 /* JSMediaCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaCapabilities.cpp; sourceTree = "<group>"; };
+ CD4E4E7C2357B5FD007895C3 /* JSAudioConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSAudioConfiguration.h; sourceTree = "<group>"; };
+ CD4E4E7D2357B5FD007895C3 /* JSMediaCapabilitiesInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMediaCapabilitiesInfo.h; sourceTree = "<group>"; };
+ CD4E4E7E2357B5FD007895C3 /* JSMediaConfiguration.dep */ = {isa = PBXFileReference; lastKnownFileType = file; path = JSMediaConfiguration.dep; sourceTree = "<group>"; };
+ CD4E4E7F2357B5FD007895C3 /* JSTransferFunction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSTransferFunction.h; sourceTree = "<group>"; };
+ CD4E4E802357B5FE007895C3 /* JSMediaEncodingConfiguration.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaEncodingConfiguration.cpp; sourceTree = "<group>"; };
+ CD4E4E812357B5FE007895C3 /* JSHdrMetadataType.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSHdrMetadataType.cpp; sourceTree = "<group>"; };
+ CD4E4E822357B5FE007895C3 /* JSMediaDecodingConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMediaDecodingConfiguration.h; sourceTree = "<group>"; };
+ CD4E4E832357B5FF007895C3 /* JSHdrMetadataType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSHdrMetadataType.h; sourceTree = "<group>"; };
+ CD4E4E842357B5FF007895C3 /* JSColorGamut.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSColorGamut.cpp; sourceTree = "<group>"; };
+ CD4E4E852357B5FF007895C3 /* JSMediaCapabilitiesDecodingInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaCapabilitiesDecodingInfo.cpp; sourceTree = "<group>"; };
+ CD4E4E862357B600007895C3 /* JSColorGamut.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSColorGamut.h; sourceTree = "<group>"; };
+ CD4E4E872357B600007895C3 /* JSMediaConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMediaConfiguration.h; sourceTree = "<group>"; };
+ CD4E4E882357B600007895C3 /* JSMediaDecodingType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMediaDecodingType.h; sourceTree = "<group>"; };
+ CD4E4E892357B601007895C3 /* JSMediaDecodingConfiguration.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaDecodingConfiguration.cpp; sourceTree = "<group>"; };
+ CD4E4E8C2357B602007895C3 /* JSTransferFunction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSTransferFunction.cpp; sourceTree = "<group>"; };
+ CD4E4E8D2357B602007895C3 /* JSAudioConfiguration.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioConfiguration.cpp; sourceTree = "<group>"; };
+ CD4E4E8E2357B602007895C3 /* JSMediaEncodingType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMediaEncodingType.h; sourceTree = "<group>"; };
+ CD4E4E8F2357B603007895C3 /* JSMediaEncodingType.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaEncodingType.cpp; sourceTree = "<group>"; };
+ CD4E4E902357B603007895C3 /* JSMediaDecodingType.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaDecodingType.cpp; sourceTree = "<group>"; };
+ CD4E4E912357B603007895C3 /* JSMediaEncodingConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMediaEncodingConfiguration.h; sourceTree = "<group>"; };
+ CD4E4E932357B604007895C3 /* JSMediaCapabilitiesInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaCapabilitiesInfo.cpp; sourceTree = "<group>"; };
+ CD4E4E972357BA8F007895C3 /* JSVideoConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSVideoConfiguration.h; sourceTree = "<group>"; };
+ CD4E4E992357BA8F007895C3 /* JSVideoConfiguration.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSVideoConfiguration.cpp; sourceTree = "<group>"; };
+ CD4E4E9A2357CB9C007895C3 /* TransferFunction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TransferFunction.h; path = mediacapabilities/TransferFunction.h; sourceTree = "<group>"; };
+ CD4E4E9B2357CB9D007895C3 /* ColorGamut.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ColorGamut.h; path = mediacapabilities/ColorGamut.h; sourceTree = "<group>"; };
+ CD4E4E9C2357CB9D007895C3 /* HdrMetadataType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HdrMetadataType.h; path = mediacapabilities/HdrMetadataType.h; sourceTree = "<group>"; };
CD5209E31B0BD8380077184E /* MediaPlayerEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerEnums.h; sourceTree = "<group>"; };
CD5209E51B0BD9E10077184E /* HTMLMediaElementEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLMediaElementEnums.h; sourceTree = "<group>"; };
CD525BA21EE0B10700788DF5 /* FourCC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FourCC.h; sourceTree = "<group>"; };
@@ -13795,11 +13830,9 @@
CDBD3D291FE85CB90012C545 /* MediaConfiguration.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaConfiguration.idl; sourceTree = "<group>"; };
CDBD3D2A1FE85CBA0012C545 /* MediaEncodingConfiguration.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaEncodingConfiguration.idl; sourceTree = "<group>"; };
CDBD3D2B1FE85CBB0012C545 /* AudioConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioConfiguration.h; path = mediacapabilities/AudioConfiguration.h; sourceTree = "<group>"; };
- CDBD3D2C1FE85CBB0012C545 /* ScreenLuminance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenLuminance.h; sourceTree = "<group>"; };
CDBD3D2D1FE85CBC0012C545 /* MediaEncodingType.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaEncodingType.idl; sourceTree = "<group>"; };
CDBD3D2E1FE85CBC0012C545 /* MediaDecodingType.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaDecodingType.idl; sourceTree = "<group>"; };
CDBD3D2F1FE85CBC0012C545 /* MediaCapabilities.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaCapabilities.idl; sourceTree = "<group>"; };
- CDBD3D301FE85CBD0012C545 /* ScreenLuminance.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScreenLuminance.idl; sourceTree = "<group>"; };
CDBD3D311FE85CBE0012C545 /* NavigatorMediaCapabilities.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorMediaCapabilities.idl; sourceTree = "<group>"; };
CDBD3D321FE85CBE0012C545 /* MediaCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaCapabilities.h; sourceTree = "<group>"; };
CDBD3D331FE85CBE0012C545 /* MediaCapabilitiesInfo.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaCapabilitiesInfo.idl; sourceTree = "<group>"; };
@@ -13809,11 +13842,10 @@
CDBD3D371FE85CC00012C545 /* MediaEncodingConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaEncodingConfiguration.h; path = mediacapabilities/MediaEncodingConfiguration.h; sourceTree = "<group>"; };
CDBD3D381FE85CC00012C545 /* MediaDecodingType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaDecodingType.h; path = mediacapabilities/MediaDecodingType.h; sourceTree = "<group>"; };
CDBD3D391FE85CC10012C545 /* NavigatorMediaCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorMediaCapabilities.h; sourceTree = "<group>"; };
- CDBD3D3A1FE85CC10012C545 /* ScreenColorGamut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenColorGamut.h; sourceTree = "<group>"; };
CDBD3D3B1FE85CC20012C545 /* MediaDecodingConfiguration.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaDecodingConfiguration.idl; sourceTree = "<group>"; };
CDBD3D3C1FE85CC20012C545 /* AudioConfiguration.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioConfiguration.idl; sourceTree = "<group>"; };
CDBD3D3E1FE85CC30012C545 /* MediaEncodingType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaEncodingType.h; path = mediacapabilities/MediaEncodingType.h; sourceTree = "<group>"; };
- CDBD3D3F1FE85CC30012C545 /* ScreenColorGamut.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScreenColorGamut.idl; sourceTree = "<group>"; };
+ CDBD3D3F1FE85CC30012C545 /* ColorGamut.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ColorGamut.idl; sourceTree = "<group>"; };
CDBEAEAA19D92B6C00BEBA88 /* MediaSelectionGroupAVFObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaSelectionGroupAVFObjC.mm; sourceTree = "<group>"; };
CDBEAEAB19D92B6C00BEBA88 /* MediaSelectionGroupAVFObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSelectionGroupAVFObjC.h; sourceTree = "<group>"; };
CDC1DD4117CC2C48008CB55D /* mediaControlsApple.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = mediaControlsApple.css; sourceTree = "<group>"; };
@@ -16661,6 +16693,7 @@
A83B79080CCAFF2B000B0825 /* HTML */,
1C5FAECA0DCFD8C900D58F78 /* Inspector */,
AACC83D92316578600EB6BF5 /* MATHML */,
+ CD4E4E6A2357B526007895C3 /* MediaCapabilities */,
CDAB6D2A17C7E97D00C60B34 /* MediaControls */,
CD61FE7B1794CA02004101EB /* MediaSource */,
07CFD99317D01405001C4FFC /* MediaStream */,
@@ -22388,6 +22421,8 @@
isa = PBXGroup;
children = (
CDBD3D2B1FE85CBB0012C545 /* AudioConfiguration.h */,
+ CD4E4E9B2357CB9D007895C3 /* ColorGamut.h */,
+ CD4E4E9C2357CB9D007895C3 /* HdrMetadataType.h */,
CDCC9BCE22387E9A00FFB51C /* MediaCapabilitiesDecodingInfo.h */,
CDCC9BD022387EAA00FFB51C /* MediaCapabilitiesEncodingInfo.h */,
CD0C8B582141C8CA0062F59D /* MediaCapabilitiesInfo.h */,
@@ -22398,6 +22433,7 @@
CDBD3D3E1FE85CC30012C545 /* MediaEncodingType.h */,
9AC6F02221148F5100CBDA06 /* MediaEngineConfigurationFactory.cpp */,
9AC6F02521148F5400CBDA06 /* MediaEngineConfigurationFactory.h */,
+ CD4E4E9A2357CB9C007895C3 /* TransferFunction.h */,
CDBD3D341FE85CBF0012C545 /* VideoConfiguration.h */,
);
name = mediacapabilities;
@@ -25863,6 +25899,43 @@
path = ios;
sourceTree = "<group>";
};
+ CD4E4E6A2357B526007895C3 /* MediaCapabilities */ = {
+ isa = PBXGroup;
+ children = (
+ CD4E4E8D2357B602007895C3 /* JSAudioConfiguration.cpp */,
+ CD4E4E7C2357B5FD007895C3 /* JSAudioConfiguration.h */,
+ CD4E4E842357B5FF007895C3 /* JSColorGamut.cpp */,
+ CD4E4E862357B600007895C3 /* JSColorGamut.h */,
+ CD4E4E812357B5FE007895C3 /* JSHdrMetadataType.cpp */,
+ CD4E4E832357B5FF007895C3 /* JSHdrMetadataType.h */,
+ CD4E4E722357B558007895C3 /* JSMediaCapabilities.cpp */,
+ CD4E4E6F2357B557007895C3 /* JSMediaCapabilities.h */,
+ CD4E4E852357B5FF007895C3 /* JSMediaCapabilitiesDecodingInfo.cpp */,
+ CD4E4E6D2357B556007895C3 /* JSMediaCapabilitiesDecodingInfo.h */,
+ CD4E4E712357B557007895C3 /* JSMediaCapabilitiesEncodingInfo.cpp */,
+ CD4E4E6C2357B556007895C3 /* JSMediaCapabilitiesEncodingInfo.h */,
+ CD4E4E932357B604007895C3 /* JSMediaCapabilitiesInfo.cpp */,
+ CD4E4E702357B557007895C3 /* JSMediaCapabilitiesInfo.cpp */,
+ CD4E4E7D2357B5FD007895C3 /* JSMediaCapabilitiesInfo.h */,
+ CD4E4E6E2357B556007895C3 /* JSMediaCapabilitiesInfo.h */,
+ CD4E4E7E2357B5FD007895C3 /* JSMediaConfiguration.dep */,
+ CD4E4E872357B600007895C3 /* JSMediaConfiguration.h */,
+ CD4E4E892357B601007895C3 /* JSMediaDecodingConfiguration.cpp */,
+ CD4E4E822357B5FE007895C3 /* JSMediaDecodingConfiguration.h */,
+ CD4E4E902357B603007895C3 /* JSMediaDecodingType.cpp */,
+ CD4E4E882357B600007895C3 /* JSMediaDecodingType.h */,
+ CD4E4E802357B5FE007895C3 /* JSMediaEncodingConfiguration.cpp */,
+ CD4E4E912357B603007895C3 /* JSMediaEncodingConfiguration.h */,
+ CD4E4E8F2357B603007895C3 /* JSMediaEncodingType.cpp */,
+ CD4E4E8E2357B602007895C3 /* JSMediaEncodingType.h */,
+ CD4E4E8C2357B602007895C3 /* JSTransferFunction.cpp */,
+ CD4E4E7F2357B5FD007895C3 /* JSTransferFunction.h */,
+ CD4E4E992357BA8F007895C3 /* JSVideoConfiguration.cpp */,
+ CD4E4E972357BA8F007895C3 /* JSVideoConfiguration.h */,
+ );
+ name = MediaCapabilities;
+ sourceTree = "<group>";
+ };
CD61FE7B1794CA02004101EB /* MediaSource */ = {
isa = PBXGroup;
children = (
@@ -26066,6 +26139,8 @@
isa = PBXGroup;
children = (
CDBD3D3C1FE85CC20012C545 /* AudioConfiguration.idl */,
+ CDBD3D3F1FE85CC30012C545 /* ColorGamut.idl */,
+ CD4E4E602357B317007895C3 /* HdrMetadataType.idl */,
CDA130BD1FEB332D00F53254 /* MediaCapabilities.cpp */,
CDBD3D321FE85CBE0012C545 /* MediaCapabilities.h */,
CDBD3D2F1FE85CBC0012C545 /* MediaCapabilities.idl */,
@@ -26080,10 +26155,7 @@
CDA130BB1FEB332C00F53254 /* NavigatorMediaCapabilities.cpp */,
CDBD3D391FE85CC10012C545 /* NavigatorMediaCapabilities.h */,
CDBD3D311FE85CBE0012C545 /* NavigatorMediaCapabilities.idl */,
- CDBD3D3A1FE85CC10012C545 /* ScreenColorGamut.h */,
- CDBD3D3F1FE85CC30012C545 /* ScreenColorGamut.idl */,
- CDBD3D2C1FE85CBB0012C545 /* ScreenLuminance.h */,
- CDBD3D301FE85CBD0012C545 /* ScreenLuminance.idl */,
+ CD4E4E622357B3AD007895C3 /* TransferFunction.idl */,
CDBD3D281FE85CB80012C545 /* VideoConfiguration.idl */,
);
path = mediacapabilities;
Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (251297 => 251298)
--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm 2019-10-18 22:00:48 UTC (rev 251298)
@@ -846,6 +846,8 @@
$ret =~ s/Srgb/SRGB/ if $ret =~ /^Srgb/;
$ret =~ s/Cenc/cenc/ if $ret =~ /^Cenc/;
$ret =~ s/Cbcs/cbcs/ if $ret =~ /^Cbcs/;
+ $ret =~ s/Pq/PQ/ if $ret =~ /^Pq$/;
+ $ret =~ s/Hlg/HLG/ if $ret =~ /^Hlg/;
return $ret;
}
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (251297 => 251298)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2019-10-18 22:00:48 UTC (rev 251298)
@@ -3677,6 +3677,7 @@
$ret =~ s/cSS/css/ if $ret =~ /^cSS/;
$ret =~ s/dOM/dom/ if $ret =~ /^dOM/;
$ret =~ s/hTML/html/ if $ret =~ /^hTML/;
+ $ret =~ s/hDR/hdr/ if $ret =~ /^hDR/;
$ret =~ s/jS/js/ if $ret =~ /^jS/;
$ret =~ s/uRL/url/ if $ret =~ /^uRL/;
$ret =~ s/xML/xml/ if $ret =~ /^xML/;
Modified: trunk/Source/WebCore/page/Settings.yaml (251297 => 251298)
--- trunk/Source/WebCore/page/Settings.yaml 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/page/Settings.yaml 2019-10-18 22:00:48 UTC (rev 251298)
@@ -823,6 +823,10 @@
type: bool
initial: false
+hdrMediaCapabilitiesEnabled:
+ type: bool
+ initial: false
+
clientCoordinatesRelativeToLayoutViewport:
initial: false
onChange: setNeedsRecalcStyleInAllFrames
Modified: trunk/Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.h (251297 => 251298)
--- trunk/Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.h 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.h 2019-10-18 22:00:48 UTC (rev 251298)
@@ -33,7 +33,7 @@
struct MediaCapabilitiesInfo;
-extern bool validateHEVCParameters(HEVCParameterSet&, MediaCapabilitiesInfo&, bool hasAlphaChannel);
+extern bool validateHEVCParameters(HEVCParameterSet&, MediaCapabilitiesInfo&, bool hasAlphaChannel, bool hdrSupport);
}
Modified: trunk/Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm (251297 => 251298)
--- trunk/Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm 2019-10-18 22:00:48 UTC (rev 251298)
@@ -37,7 +37,7 @@
namespace WebCore {
-bool validateHEVCParameters(HEVCParameterSet& parameters, MediaCapabilitiesInfo& info, bool hasAlphaChannel)
+bool validateHEVCParameters(HEVCParameterSet& parameters, MediaCapabilitiesInfo& info, bool hasAlphaChannel, bool hdrSupport)
{
CMVideoCodecType codec = kCMVideoCodecType_HEVC;
if (hasAlphaChannel) {
@@ -50,6 +50,15 @@
codec = codecCode.value().value;
}
+
+ if (hdrSupport) {
+ // Platform supports HDR playback of HEVC Main10 Profile, as defined by ITU-T H.265 v6 (06/2019).
+ bool isMain10 = parameters.generalProfileSpace == 0
+ && (parameters.generalProfileIDC == 2 || parameters.generalProfileCompatibilityFlags == 1);
+ if (!isMain10)
+ return false;
+ }
+
OSStatus status = VTSelectAndCreateVideoDecoderInstance(codec, kCFAllocatorDefault, nullptr, nullptr);
if (status != noErr)
return false;
Modified: trunk/Source/WebCore/platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp (251297 => 251298)
--- trunk/Source/WebCore/platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp 2019-10-18 22:00:48 UTC (rev 251298)
@@ -76,16 +76,17 @@
return;
}
+ bool hdrSupported = videoConfiguration.colorGamut || videoConfiguration.hdrMetadataType || videoConfiguration.transferFunction;
bool alphaChannel = videoConfiguration.alphaChannel && videoConfiguration.alphaChannel.value();
if (videoCodecType == kCMVideoCodecType_HEVC) {
auto parameters = parseHEVCCodecParameters(codec);
- if (!parameters || !validateHEVCParameters(parameters.value(), info, alphaChannel)) {
+ if (!parameters || !validateHEVCParameters(parameters.value(), info, alphaChannel, hdrSupported)) {
callback({{ }, WTFMove(configuration)});
return;
}
} else {
- if (alphaChannel) {
+ if (alphaChannel || hdrSupported) {
callback({{ }, WTFMove(configuration)});
return;
}
Copied: trunk/Source/WebCore/platform/mediacapabilities/ColorGamut.h (from rev 251297, trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h) (0 => 251298)
--- trunk/Source/WebCore/platform/mediacapabilities/ColorGamut.h (rev 0)
+++ trunk/Source/WebCore/platform/mediacapabilities/ColorGamut.h 2019-10-18 22:00:48 UTC (rev 251298)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class ColorGamut {
+ SRGB,
+ P3,
+ Rec2020,
+};
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/platform/mediacapabilities/HdrMetadataType.h (from rev 251297, trunk/Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h) (0 => 251298)
--- trunk/Source/WebCore/platform/mediacapabilities/HdrMetadataType.h (rev 0)
+++ trunk/Source/WebCore/platform/mediacapabilities/HdrMetadataType.h 2019-10-18 22:00:48 UTC (rev 251298)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class HdrMetadataType {
+ SmpteSt2086,
+ SmpteSt209410,
+ SmpteSt209440
+};
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/platform/mediacapabilities/TransferFunction.h (from rev 251297, trunk/Source/WebCore/Modules/mediacapabilities/ScreenLuminance.idl) (0 => 251298)
--- trunk/Source/WebCore/platform/mediacapabilities/TransferFunction.h (rev 0)
+++ trunk/Source/WebCore/platform/mediacapabilities/TransferFunction.h 2019-10-18 22:00:48 UTC (rev 251298)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class TransferFunction {
+ SRGB,
+ PQ,
+ HLG
+};
+
+} // namespace WebCore
Modified: trunk/Source/WebCore/platform/mediacapabilities/VideoConfiguration.h (251297 => 251298)
--- trunk/Source/WebCore/platform/mediacapabilities/VideoConfiguration.h 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/platform/mediacapabilities/VideoConfiguration.h 2019-10-18 22:00:48 UTC (rev 251298)
@@ -25,6 +25,9 @@
#pragma once
+#include "ColorGamut.h"
+#include "HdrMetadataType.h"
+#include "TransferFunction.h"
#include <wtf/Optional.h>
#include <wtf/text/WTFString.h>
@@ -37,6 +40,9 @@
uint64_t bitrate;
double framerate;
Optional<bool> alphaChannel;
+ Optional<ColorGamut> colorGamut;
+ Optional<HdrMetadataType> hdrMetadataType;
+ Optional<TransferFunction> transferFunction;
};
}
Modified: trunk/Source/WebCore/platform/mock/MediaEngineConfigurationFactoryMock.cpp (251297 => 251298)
--- trunk/Source/WebCore/platform/mock/MediaEngineConfigurationFactoryMock.cpp 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebCore/platform/mock/MediaEngineConfigurationFactoryMock.cpp 2019-10-18 22:00:48 UTC (rev 251298)
@@ -49,10 +49,16 @@
// Only the "mock-with-alpha" codec supports alphaChannel
if (videoConfig && videoConfig->alphaChannel && videoConfig->alphaChannel.value()) {
- if (ContentType(videoConfig->contentType).codecsParameter() != "mock-with-alpha")
+ if (ContentType(videoConfig->contentType).parameter(ContentType::codecsParameter()) != "mock-with-alpha")
return false;
}
+ // Only the "mock-with-hdr" codec supports HDR)
+ if (videoConfig && (videoConfig->colorGamut || videoConfig->hdrMetadataType || videoConfig->transferFunction)) {
+ if (ContentType(videoConfig->contentType).parameter(ContentType::codecsParameter()) != "mock-with-hdr")
+ return false;
+ }
+
// Audio decoding support limited to audio/mp4.
auto audioConfig = configuration.audio;
if (audioConfig)
@@ -100,7 +106,7 @@
// Only the "mock-with-alpha" codec supports alphaChannel
if (videoConfig && videoConfig->alphaChannel && videoConfig->alphaChannel.value()) {
- if (ContentType(videoConfig->contentType).codecsParameter() != "mock-with-alpha")
+ if (ContentType(videoConfig->contentType).parameter(ContentType::codecsParameter()) != "mock-with-alpha")
return false;
}
Modified: trunk/Source/WebKit/ChangeLog (251297 => 251298)
--- trunk/Source/WebKit/ChangeLog 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebKit/ChangeLog 2019-10-18 22:00:48 UTC (rev 251298)
@@ -1,3 +1,14 @@
+2019-10-18 Jer Noble <jer.no...@apple.com>
+
+ Add experimental HDR MediaCapabilities support.
+ https://bugs.webkit.org/show_bug.cgi?id=203113
+
+ Reviewed by Eric Carlson.
+
+ Add experimental hdrMediaCapabilitiesEnabled preference.
+
+ * Shared/WebPreferences.yaml:
+
2019-10-18 Jiewen Tan <jiewen_...@apple.com>
[WebAuthn] Implement AuthenticatorCancel
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (251297 => 251298)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-10-18 21:33:06 UTC (rev 251297)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2019-10-18 22:00:48 UTC (rev 251298)
@@ -1413,6 +1413,13 @@
humanReadableDescription: "Media Capabilities Extensions"
category: experimental
+HDRMediaCapabilitiesEnabled:
+ type: bool
+ defaultValue: false
+ humanReadableName: "HDR Media Capabilities"
+ humanReadableDescription: "HDR Media Capabilities"
+ category: experimental
+
ResizeObserverEnabled:
type: bool
defaultValue: false