<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[245636] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/245636">245636</a></dd>
<dt>Author</dt> <dd>jer.noble@apple.com</dd>
<dt>Date</dt> <dd>2019-05-22 12:10:05 -0700 (Wed, 22 May 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Hide MediaCapabilities.encodingInfo() when the platform does not support it.
https://bugs.webkit.org/show_bug.cgi?id=197476

Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html

Add a new IDL attribute, CustomEnabled, which allows non Settings-based enabling of attributes and objects.

* Modules/mediacapabilities/MediaCapabilities.idl:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSMediaCapabilitiesCustom.h: Copied from Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl.
(WebCore::JSMediaCapabilitiesEncodingInfoIsEnabled):
* bindings/scripts/CodeGeneratorJS.pm:
(NeedsRuntimeCheck):
(GenerateRuntimeEnableConditionalString):
* bindings/scripts/IDLAttributes.json:
* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttributes):
* platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
(WebCore::MediaEngineConfigurationFactory::hasDecodingConfigurationFactory):
(WebCore::MediaEngineConfigurationFactory::hasEncodingConfigurationFactory):
* platform/mediacapabilities/MediaEngineConfigurationFactory.h:

LayoutTests:

* platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt: Added.
* platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html: Added.
* platform/ios/media/mediacapabilities/mediacapabilities-types-expected.txt: Added.
* platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt: Added.
* platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html: Added.
* platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacapabilitiesMediaCapabilitiesidl">trunk/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLAttributesjson">trunk/Source/WebCore/bindings/scripts/IDLAttributes.json</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptspreprocessidlspl">trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl</a></li>
<li><a href="#trunkSourceWebCoreplatformmediacapabilitiesMediaEngineConfigurationFactorycpp">trunk/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediacapabilitiesMediaEngineConfigurationFactoryh">trunk/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/ios/media/mediacapabilities/</li>
<li><a href="#trunkLayoutTestsplatformiosmediamediacapabilitiesmediacapabilitiesencodingInfoundefinedexpectedtxt">trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiosmediamediacapabilitiesmediacapabilitiesencodingInfoundefinedhtml">trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html</a></li>
<li><a href="#trunkLayoutTestsplatformiosmediamediacapabilitiesmediacapabilitiestypesexpectedtxt">trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-types-expected.txt</a></li>
<li>trunk/LayoutTests/platform/mac/media/mediacapabilities/</li>
<li><a href="#trunkLayoutTestsplatformmacmediamediacapabilitiesmediacapabilitiesencodingInfoundefinedexpectedtxt">trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacmediamediacapabilitiesmediacapabilitiesencodingInfoundefinedhtml">trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacmediamediacapabilitiesmediacapabilitiestypesexpectedtxt">trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMediaCapabilitiesCustomh">trunk/Source/WebCore/bindings/js/JSMediaCapabilitiesCustom.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (245635 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2019-05-22 19:09:30 UTC (rev 245635)
+++ trunk/LayoutTests/ChangeLog 2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2019-05-22  Jer Noble  <jer.noble@apple.com>
+
+        Hide MediaCapabilities.encodingInfo() when the platform does not support it.
+        https://bugs.webkit.org/show_bug.cgi?id=197476
+
+        Reviewed by Eric Carlson.
+
+        * platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt: Added.
+        * platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html: Added.
+        * platform/ios/media/mediacapabilities/mediacapabilities-types-expected.txt: Added.
+        * platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt: Added.
+        * platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html: Added.
+        * platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt: Added.
+
</ins><span class="cx"> 2019-05-22  Youenn Fablet  <youenn@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Implement Feature policy self/none/* parsing
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiosmediamediacapabilitiesmediacapabilitiesencodingInfoundefinedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt (0 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt                             (rev 0)
+++ trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt        2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Test that MediaCapabilities.prototype.encodingInfo is missing.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS typeof navigator.mediaCapabilities.encodingInfo is "undefined"
+PASS typeof MediaCapabilities.prototype.encodingInfo is "undefined"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiosmediamediacapabilitiesmediacapabilitiesencodingInfoundefinedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html (0 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html                             (rev 0)
+++ trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html        2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+       <title>mediacapabilities-encodingInfo-empty</title>
+       <script src="../../../../resources/js-test-pre.js"></script>
+       <script>
+
+       </script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description('Test that MediaCapabilities.prototype.encodingInfo is missing.');
+shouldBe('typeof navigator.mediaCapabilities.encodingInfo', '"undefined"');
+shouldBe('typeof MediaCapabilities.prototype.encodingInfo', '"undefined"');
+</script>
+<script src="../../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiosmediamediacapabilitiesmediacapabilitiestypesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-types-expected.txt (0 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-types-expected.txt                              (rev 0)
+++ trunk/LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-types-expected.txt 2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -0,0 +1,87 @@
</span><ins>+Test basic dictionary and enum types of Media Capabilities API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file' });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'media-source' });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', audio: { } });
+    } rejected promise  with TypeError: Member AudioConfiguration.contentType is required and must be an instance of DOMString.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', audio: { contentType: 'video/mp4; codecs="avc1"' } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { } });
+    } rejected promise  with TypeError: Member VideoConfiguration.bitrate is required and must be an instance of unsigned long long.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'audio/mp3', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Member VideoConfiguration.width is required and must be an instance of unsigned long.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1,vp9"', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 0 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/a" } });
+    } rejected promise  with TypeError: The provided value is non-finite.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/0" } });
+    } rejected promise  with TypeError: The provided value is non-finite.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'invalid', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+FAIL () => {
+        return navigator.mediaCapabilities.encodingInfo({ type: 'record' });
+    } should not throw exception. Threw exception TypeError: navigator.mediaCapabilities.encodingInfo is not a function. (In 'navigator.mediaCapabilities.encodingInfo({ type: 'record' })', 'navigator.mediaCapabilities.encodingInfo' is undefined).
+FAIL () => {
+        return navigator.mediaCapabilities.encodingInfo({ type: 'record', audio: { } });
+    } should not throw exception. Threw exception TypeError: navigator.mediaCapabilities.encodingInfo is not a function. (In 'navigator.mediaCapabilities.encodingInfo({ type: 'record', audio: { } })', 'navigator.mediaCapabilities.encodingInfo' is undefined).
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', audio: { } });
+    } rejected promise  with TypeError: Member AudioConfiguration.contentType is required and must be an instance of DOMString.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', audio: { contentType: 'video/mp4; codecs="avc1"' } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { } });
+    } rejected promise  with TypeError: Member VideoConfiguration.bitrate is required and must be an instance of unsigned long long.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'audio/mp3', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Member VideoConfiguration.width is required and must be an instance of unsigned long.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1,vp9"', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 0 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/a" } });
+    } rejected promise  with TypeError: The provided value is non-finite.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/-1" } });
+    } rejected promise  with TypeError: The provided value is non-finite.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'invalid', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacmediamediacapabilitiesmediacapabilitiesencodingInfoundefinedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt (0 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt                             (rev 0)
+++ trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt        2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Test that MediaCapabilities.prototype.encodingInfo is missing.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS typeof navigator.mediaCapabilities.encodingInfo is "undefined"
+PASS typeof MediaCapabilities.prototype.encodingInfo is "undefined"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacmediamediacapabilitiesmediacapabilitiesencodingInfoundefinedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html (0 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html                             (rev 0)
+++ trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html        2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+       <title>mediacapabilities-encodingInfo-empty</title>
+       <script src="../../../../resources/js-test-pre.js"></script>
+       <script>
+
+       </script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description('Test that MediaCapabilities.prototype.encodingInfo is missing.');
+shouldBe('typeof navigator.mediaCapabilities.encodingInfo', '"undefined"');
+shouldBe('typeof MediaCapabilities.prototype.encodingInfo', '"undefined"');
+</script>
+<script src="../../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacmediamediacapabilitiesmediacapabilitiestypesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt (0 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt                              (rev 0)
+++ trunk/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt 2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -0,0 +1,87 @@
</span><ins>+Test basic dictionary and enum types of Media Capabilities API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file' });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'media-source' });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', audio: { } });
+    } rejected promise  with TypeError: Member AudioConfiguration.contentType is required and must be an instance of DOMString.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', audio: { contentType: 'video/mp4; codecs="avc1"' } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { } });
+    } rejected promise  with TypeError: Member VideoConfiguration.bitrate is required and must be an instance of unsigned long long.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'audio/mp3', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Member VideoConfiguration.width is required and must be an instance of unsigned long.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1,vp9"', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 0 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/a" } });
+    } rejected promise  with TypeError: The provided value is non-finite.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/0" } });
+    } rejected promise  with TypeError: The provided value is non-finite.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'invalid', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+FAIL () => {
+        return navigator.mediaCapabilities.encodingInfo({ type: 'record' });
+    } should not throw exception. Threw exception TypeError: navigator.mediaCapabilities.encodingInfo is not a function. (In 'navigator.mediaCapabilities.encodingInfo({ type: 'record' })', 'navigator.mediaCapabilities.encodingInfo' is undefined).
+FAIL () => {
+        return navigator.mediaCapabilities.encodingInfo({ type: 'record', audio: { } });
+    } should not throw exception. Threw exception TypeError: navigator.mediaCapabilities.encodingInfo is not a function. (In 'navigator.mediaCapabilities.encodingInfo({ type: 'record', audio: { } })', 'navigator.mediaCapabilities.encodingInfo' is undefined).
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', audio: { } });
+    } rejected promise  with TypeError: Member AudioConfiguration.contentType is required and must be an instance of DOMString.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', audio: { contentType: 'video/mp4; codecs="avc1"' } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { } });
+    } rejected promise  with TypeError: Member VideoConfiguration.bitrate is required and must be an instance of unsigned long long.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'audio/mp3', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Member VideoConfiguration.width is required and must be an instance of unsigned long.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1,vp9"', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 0 } });
+    } rejected promise  with TypeError: Type error.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/a" } });
+    } rejected promise  with TypeError: The provided value is non-finite.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/-1" } });
+    } rejected promise  with TypeError: The provided value is non-finite.
+PASS () => {
+        return navigator.mediaCapabilities.decodingInfo({ type: 'invalid', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+    } rejected promise  with TypeError: Type error.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (245635 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-05-22 19:09:30 UTC (rev 245635)
+++ trunk/Source/WebCore/ChangeLog      2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2019-05-22  Jer Noble  <jer.noble@apple.com>
+
+        Hide MediaCapabilities.encodingInfo() when the platform does not support it.
+        https://bugs.webkit.org/show_bug.cgi?id=197476
+
+        Reviewed by Eric Carlson.
+
+        Test: platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html
+
+        Add a new IDL attribute, CustomEnabled, which allows non Settings-based enabling of attributes and objects.
+
+        * Modules/mediacapabilities/MediaCapabilities.idl:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSMediaCapabilitiesCustom.h: Copied from Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl.
+        (WebCore::JSMediaCapabilitiesEncodingInfoIsEnabled):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (NeedsRuntimeCheck):
+        (GenerateRuntimeEnableConditionalString):
+        * bindings/scripts/IDLAttributes.json:
+        * bindings/scripts/preprocess-idls.pl:
+        (GenerateConstructorAttributes):
+        * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
+        (WebCore::MediaEngineConfigurationFactory::hasDecodingConfigurationFactory):
+        (WebCore::MediaEngineConfigurationFactory::hasEncodingConfigurationFactory):
+        * platform/mediacapabilities/MediaEngineConfigurationFactory.h:
+
</ins><span class="cx"> 2019-05-22  Youenn Fablet  <youenn@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Implement Feature policy self/none/* parsing
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacapabilitiesMediaCapabilitiesidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl (245635 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl     2019-05-22 19:09:30 UTC (rev 245635)
+++ trunk/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl        2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -25,9 +25,10 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     EnabledBySetting=MediaCapabilities,
</span><del>-    ImplementationLacksVTable
</del><ins>+    ImplementationLacksVTable,
+    JSCustomHeader
</ins><span class="cx"> ]
</span><span class="cx"> interface MediaCapabilities {
</span><del>-  [CallWith=Document] Promise<MediaCapabilitiesDecodingInfo> decodingInfo(MediaDecodingConfiguration configuration);
-  Promise<MediaCapabilitiesEncodingInfo> encodingInfo(MediaEncodingConfiguration configuration);
</del><ins>+  [CustomEnabled, CallWith=Document] Promise<MediaCapabilitiesDecodingInfo> decodingInfo(MediaDecodingConfiguration configuration);
+  [CustomEnabled] Promise<MediaCapabilitiesEncodingInfo> encodingInfo(MediaEncodingConfiguration configuration);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (245635 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2019-05-22 19:09:30 UTC (rev 245635)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -13439,6 +13439,7 @@
</span><span class="cx">          CCC2B51015F613060048CDD6 /* DeviceClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceClient.h; sourceTree = "<group>"; };
</span><span class="cx">          CCC2B51115F613060048CDD6 /* DeviceController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceController.cpp; sourceTree = "<group>"; };
</span><span class="cx">          CCC2B51215F613060048CDD6 /* DeviceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceController.h; sourceTree = "<group>"; };
</span><ins>+               CD0320152279F5BF00DD9F0B /* JSMediaCapabilitiesCustom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMediaCapabilitiesCustom.h; sourceTree = "<group>"; };
</ins><span class="cx">           CD063F801E23FA8900812BE3 /* InitDataRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InitDataRegistry.cpp; sourceTree = "<group>"; };
</span><span class="cx">          CD063F811E23FA8900812BE3 /* InitDataRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitDataRegistry.h; sourceTree = "<group>"; };
</span><span class="cx">          CD0C8B582141C8CA0062F59D /* MediaCapabilitiesInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaCapabilitiesInfo.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -20626,6 +20627,7 @@
</span><span class="cx">                          51E269321DD3BC43006B6A58 /* JSIDBTransactionCustom.cpp */,
</span><span class="cx">                          A7D0318D0E93540300E24ACD /* JSImageDataCustom.cpp */,
</span><span class="cx">                          77C13F042165658A002D9C5F /* JSIntersectionObserverEntryCustom.cpp */,
</span><ins>+                               CD0320152279F5BF00DD9F0B /* JSMediaCapabilitiesCustom.h */,
</ins><span class="cx">                           AD726FE716D9F204003A4E6D /* JSMediaListCustom.h */,
</span><span class="cx">                          415CDAF61E6CE0D3004F11EE /* JSMediaStreamTrackCustom.cpp */,
</span><span class="cx">                          E1A5F99A0E7EAA2500AF85EA /* JSMessageChannelCustom.cpp */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMediaCapabilitiesCustomhfromrev245635trunkSourceWebCoreModulesmediacapabilitiesMediaCapabilitiesidl"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/bindings/js/JSMediaCapabilitiesCustom.h (from rev 245635, trunk/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl) (0 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMediaCapabilitiesCustom.h                             (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSMediaCapabilitiesCustom.h        2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+/*
+ * 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
+
+#include "MediaEngineConfigurationFactory.h"
+
+namespace WebCore {
+
+ALWAYS_INLINE bool JSMediaCapabilitiesEncodingInfoIsEnabled()
+{
+    return MediaEngineConfigurationFactory::hasEncodingConfigurationFactory();
+}
+
+ALWAYS_INLINE bool JSMediaCapabilitiesDecodingInfoIsEnabled()
+{
+    return MediaEngineConfigurationFactory::hasDecodingConfigurationFactory();
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (245635 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2019-05-22 19:09:30 UTC (rev 245635)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm    2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -1710,7 +1710,8 @@
</span><span class="cx">         || $context->extendedAttributes->{EnabledBySetting}
</span><span class="cx">         || $context->extendedAttributes->{DisabledByQuirk}
</span><span class="cx">         || $context->extendedAttributes->{SecureContext}
</span><del>-        || $context->extendedAttributes->{ContextHasServiceWorkerScheme};
</del><ins>+        || $context->extendedAttributes->{ContextHasServiceWorkerScheme}
+        || $context->extendedAttributes->{CustomEnabled};
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # https://heycam.github.io/webidl/#es-operations
</span><span class="lines">@@ -3745,6 +3746,13 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if ($context->extendedAttributes->{CustomEnabled}) {
+        assert("CustomEnabled can only be used by interfaces only exposed to the Window") if $interface->extendedAttributes->{Exposed} && $interface->extendedAttributes->{Exposed} ne "Window";
+
+        my $className = "JS" . $interface->type->name;
+        push(@conjuncts, "${className}" . $codeGenerator->WK_ucfirst($context->name) . "IsEnabled()");
+    }
+
</ins><span class="cx">     if ($context->extendedAttributes->{DisabledByQuirk}) {
</span><span class="cx">         assert("Must specify value for DisabledByQuirk.") if $context->extendedAttributes->{DisabledByQuirk} eq "VALUE_IS_MISSING";
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributesjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.json (245635 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.json 2019-05-22 19:09:30 UTC (rev 245635)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.json    2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -154,6 +154,9 @@
</span><span class="cx">         "CustomToStringName": {
</span><span class="cx">             "contextsAllowed": ["interface"]
</span><span class="cx">         },
</span><ins>+        "CustomEnabled": {
+            "contextsAllowed": ["interface", "dictionary", "enum", "attribute", "operation", "constant", "iterable"]
+        },
</ins><span class="cx">         "DOMJIT": {
</span><span class="cx">             "contextsAllowed": ["interface", "attribute", "operation"],
</span><span class="cx">             "values": ["", "ReadDOM", "Getter"]
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptspreprocessidlspl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl (245635 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl 2019-05-22 19:09:30 UTC (rev 245635)
+++ trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl    2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -283,7 +283,7 @@
</span><span class="cx">     foreach my $attributeName (sort keys %{$extendedAttributes}) {
</span><span class="cx">       next unless ($attributeName eq "Conditional" || $attributeName eq "EnabledAtRuntime" || $attributeName eq "EnabledForWorld"
</span><span class="cx">         || $attributeName eq "EnabledBySetting" || $attributeName eq "SecureContext" || $attributeName eq "PrivateIdentifier"
</span><del>-        || $attributeName eq "PublicIdentifier" || $attributeName eq "DisabledByQuirk" || $attributeName eq "EnabledByQuirk" || $attributeName eq "EnabledForContext");
</del><ins>+        || $attributeName eq "PublicIdentifier" || $attributeName eq "DisabledByQuirk" || $attributeName eq "EnabledByQuirk" || $attributeName eq "EnabledForContext" || $attributeName eq "CustomEnabled");
</ins><span class="cx">       my $extendedAttribute = $attributeName;
</span><span class="cx">       $extendedAttribute .= "=" . $extendedAttributes->{$attributeName} unless $extendedAttributes->{$attributeName} eq "VALUE_IS_MISSING";
</span><span class="cx">       push(@extendedAttributesList, $extendedAttribute);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediacapabilitiesMediaEngineConfigurationFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp (245635 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp      2019-05-22 19:09:30 UTC (rev 245635)
+++ trunk/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp 2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include "MediaDecodingConfiguration.h"
</span><span class="cx"> #include "MediaEncodingConfiguration.h"
</span><span class="cx"> #include "MediaEngineConfigurationFactoryMock.h"
</span><ins>+#include <wtf/Algorithms.h>
</ins><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> 
</span><span class="lines">@@ -71,6 +72,16 @@
</span><span class="cx">     return factories;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool MediaEngineConfigurationFactory::hasDecodingConfigurationFactory()
+{
+    return mockEnabled() || WTF::anyOf(factories(), [] (auto& factory) { return factory.createDecodingConfiguration; });
+}
+
+bool MediaEngineConfigurationFactory::hasEncodingConfigurationFactory()
+{
+    return mockEnabled() || WTF::anyOf(factories(), [] (auto& factory) { return factory.createEncodingConfiguration; });
+}
+
</ins><span class="cx"> void MediaEngineConfigurationFactory::createDecodingConfiguration(MediaDecodingConfiguration&& config, MediaEngineConfigurationFactory::DecodingConfigurationCallback&& callback)
</span><span class="cx"> {
</span><span class="cx">     if (mockEnabled()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediacapabilitiesMediaEngineConfigurationFactoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.h (245635 => 245636)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.h        2019-05-22 19:09:30 UTC (rev 245635)
+++ trunk/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.h   2019-05-22 19:10:05 UTC (rev 245636)
</span><span class="lines">@@ -41,6 +41,9 @@
</span><span class="cx">     using DecodingConfigurationCallback = WTF::Function<void(MediaCapabilitiesDecodingInfo&&)>;
</span><span class="cx">     using EncodingConfigurationCallback = WTF::Function<void(MediaCapabilitiesEncodingInfo&&)>;
</span><span class="cx"> 
</span><ins>+    static bool hasDecodingConfigurationFactory();
+    static bool hasEncodingConfigurationFactory();
+
</ins><span class="cx">     static void createDecodingConfiguration(MediaDecodingConfiguration&&, DecodingConfigurationCallback&&);
</span><span class="cx">     static void createEncodingConfiguration(MediaEncodingConfiguration&&, EncodingConfigurationCallback&&);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>