<!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>[214080] 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/214080">214080</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-03-16 17:05:36 -0700 (Thu, 16 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Wrap legacy WebRTC API in runtime flag
https://bugs.webkit.org/show_bug.cgi?id=169646

Patch by Youenn Fablet &lt;youenn@apple.com&gt; on 2017-03-16
Reviewed by Alex Christensen.

Source/WebCore:

Test: webrtc/legacy-api.html

Adding a runtime flag for legacy API.
Making some WebIDL peer connection members runtime-enabled.
Adding a JS private getter on this flag so that overloaded operations behave as promise-based only if flag is turned off.

* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCPeerConnectionInternals.js:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::isWebRTCLegacyAPIEnabled):
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):
* bindings/js/WebCoreBuiltinNames.h:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::webRTCLegacyAPIEnabled):
(WebCore::RuntimeEnabledFeatures::setWebRTCLegacyAPIEnabled):

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences webRTCLegacyAPIEnabled]):
(-[WebPreferences setWebRTCLegacyAPIEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Adding preference to legacy API.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebRTCLegacyAPIEnabled):
(WKPreferencesGetWebRTCLegacyAPIEnabled):
* UIProcess/API/C/WKPreferencesRef.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebRTCLegacyAPIEnabled):
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

* webrtc/legacy-api-expected.txt: Added.
* webrtc/legacy-api.html: 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="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectionidl">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectionInternalsjs">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMGlobalObjectcpp">trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh">trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h</a></li>
<li><a href="#trunkSourceWebCorepageRuntimeEnabledFeaturesh">trunk/Source/WebCore/page/RuntimeEnabledFeatures.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesmm">trunk/Source/WebKit/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPreferencesDefinitionsh">trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencescpp">trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencesRefh">trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlecpp">trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestswebrtclegacyapiexpectedtxt">trunk/LayoutTests/webrtc/legacy-api-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebrtclegacyapihtml">trunk/LayoutTests/webrtc/legacy-api.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/LayoutTests/ChangeLog        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -1,5 +1,15 @@
</span><span class="cx"> 2017-03-16  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Wrap legacy WebRTC API in runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=169646
+
+        Reviewed by Alex Christensen.
+
+        * webrtc/legacy-api-expected.txt: Added.
+        * webrtc/legacy-api.html: Added.
+
+2017-03-16  Youenn Fablet  &lt;youenn@apple.com&gt;
+
</ins><span class="cx">         Rebase webrtc tests
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=169791
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestswebrtclegacyapiexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/webrtc/legacy-api-expected.txt (0 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webrtc/legacy-api-expected.txt                                (rev 0)
+++ trunk/LayoutTests/webrtc/legacy-api-expected.txt        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Summary
+
+Harness status: OK
+
+Found 1 tests
+
+1 Pass
+Details
+
+Result        Test Name        Message
+Pass        Testing legacy API is not defined when legacy flag is turned off        
+
+PASS Testing legacy API is not defined when legacy flag is turned off 
+
</ins></span></pre></div>
<a id="trunkLayoutTestswebrtclegacyapihtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/webrtc/legacy-api.html (0 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webrtc/legacy-api.html                                (rev 0)
+++ trunk/LayoutTests/webrtc/legacy-api.html        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;script src=&quot;../resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+        &lt;script&gt;
+if (window.testRunner)
+    testRunner.setWebRTCLegacyAPIEnabled(false);
+
+promise_test(function() {
+    var pc1 = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
+    var pc2 = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
+    assert_equals(pc1.getLocalStreams, undefined);
+    assert_equals(pc1.getRemoteStreams, undefined);
+    assert_equals(pc1.getStreamById, undefined);
+    assert_equals(pc1.addStream, undefined);
+    assert_equals(pc1.removeStream, undefined);
+    assert_equals(pc1.onaddstream, undefined);
+
+    var channel = pc1.createDataChannel(&quot;test&quot;);
+    return pc1.createOffer({ }, assert_unreached, assert_unreached).then((offer) =&gt; {
+        return pc1.setLocalDescription(offer, assert_unreached, assert_unreached).then(() =&gt; { return offer; }); 
+    }).then((offer) =&gt; {
+        return pc2.setRemoteDescription(offer, assert_unreached, assert_unreached); 
+    }).then(() =&gt; {
+        return pc2.createAnswer({ }, assert_unreached, assert_unreached);
+    });
+}, &quot;Testing legacy API is not defined when legacy flag is turned off&quot;);
+        &lt;/script&gt;
+        &lt;script src=&quot;../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/ChangeLog        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2017-03-16  Youenn Fablet  &lt;youenn@apple.com&gt;
+
+        Wrap legacy WebRTC API in runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=169646
+
+        Reviewed by Alex Christensen.
+
+        Test: webrtc/legacy-api.html
+
+        Adding a runtime flag for legacy API.
+        Making some WebIDL peer connection members runtime-enabled.
+        Adding a JS private getter on this flag so that overloaded operations behave as promise-based only if flag is turned off.
+
+        * Modules/mediastream/RTCPeerConnection.idl:
+        * Modules/mediastream/RTCPeerConnectionInternals.js:
+        * bindings/js/JSDOMGlobalObject.cpp:
+        (WebCore::isWebRTCLegacyAPIEnabled):
+        (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
+        * bindings/js/WebCoreBuiltinNames.h:
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::webRTCLegacyAPIEnabled):
+        (WebCore::RuntimeEnabledFeatures::setWebRTCLegacyAPIEnabled):
+
</ins><span class="cx"> 2017-03-16  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebCrypto] Support SPKI/PKCS8 for Elliptic Curve
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -165,16 +165,14 @@
</span><span class="cx">     // 9.6 Identity Provider API
</span><span class="cx">     // FIXME 169644: missing IdP
</span><span class="cx"> 
</span><del>-
</del><span class="cx">     // Legacy MediaStream API
</span><del>-    // FIXME 169646: wrap this in runtime flag
-    [JSBuiltin] sequence&lt;MediaStream&gt; getLocalStreams();
-    [PrivateIdentifier, PublicIdentifier] sequence&lt;MediaStream&gt; getRemoteStreams();
-    [JSBuiltin] MediaStream getStreamById(DOMString streamId);
</del><ins>+    [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] sequence&lt;MediaStream&gt; getLocalStreams();
+    [PrivateIdentifier, PublicIdentifier, EnabledAtRuntime=WebRTCLegacyAPI] sequence&lt;MediaStream&gt; getRemoteStreams();
+    [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] MediaStream getStreamById(DOMString streamId);
</ins><span class="cx"> 
</span><del>-    [JSBuiltin] void addStream(MediaStream stream);
-    [JSBuiltin] void removeStream(MediaStream stream);
</del><ins>+    [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] void addStream(MediaStream stream);
+    [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] void removeStream(MediaStream stream);
</ins><span class="cx"> 
</span><span class="cx">     // Legacy event handler (MediaStream-based API)
</span><del>-    attribute EventHandler onaddstream;
</del><ins>+    [EnabledAtRuntime=WebRTCLegacyAPI] attribute EventHandler onaddstream;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectionInternalsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">     if (!objectArgOk)
</span><span class="cx">         return @Promise.@reject(new @TypeError(`Argument 1 ('${objectInfo.argName}') to RTCPeerConnection.${functionName} must be an instance of ${objectInfo.argType}`));
</span><span class="cx"> 
</span><del>-    if (argsCount === 1)
</del><ins>+    if (!@webRTCLegacyAPIEnabled() || argsCount === 1)
</ins><span class="cx">         return promiseMode(objectArg);
</span><span class="cx"> 
</span><span class="cx">     // More than one argument: Legacy mode
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><del>-    if (args.length &lt;= 1) {
</del><ins>+    if (!@webRTCLegacyAPIEnabled() || args.length &lt;= 1) {
</ins><span class="cx">         // Zero or one arguments: Promise mode
</span><span class="cx">         const options = args[0];
</span><span class="cx">         if (args.length &amp;&amp; !@isDictionary(options))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL makeThisTypeErrorForBuiltins(ExecState*);
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL makeGetterTypeErrorForBuiltins(ExecState*);
</span><ins>+EncodedJSValue JSC_HOST_CALL isWebRTCLegacyAPIEnabled(ExecState*);
</ins><span class="cx"> 
</span><span class="cx"> const ClassInfo JSDOMGlobalObject::s_info = { &quot;DOMGlobalObject&quot;, &amp;JSGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSDOMGlobalObject) };
</span><span class="cx"> 
</span><span class="lines">@@ -99,6 +100,13 @@
</span><span class="cx">     return JSValue::encode(createTypeError(execState, makeGetterTypeErrorMessage(interfaceName.utf8().data(), attributeName.utf8().data())));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(WEB_RTC)
+EncodedJSValue JSC_HOST_CALL isWebRTCLegacyAPIEnabled(ExecState*)
+{
+    return JSValue::encode(jsBoolean(RuntimeEnabledFeatures::sharedFeatures().webRTCLegacyAPIEnabled()));
+}
+#endif
+
</ins><span class="cx"> void JSDOMGlobalObject::addBuiltinGlobals(VM&amp; vm)
</span><span class="cx"> {
</span><span class="cx">     m_builtinInternalFunctions.initialize(*this);
</span><span class="lines">@@ -155,6 +163,9 @@
</span><span class="cx"> #endif
</span><span class="cx">         JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().ReadableStreamDefaultReaderPrivateName(), privateReadableStreamDefaultReaderConstructor, DontDelete | ReadOnly),
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(WEB_RTC)
+        JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().webRTCLegacyAPIEnabledPrivateName(), JSFunction::create(vm, this, 0, String(), isWebRTCLegacyAPIEnabled), DontDelete | ReadOnly),
+#endif
</ins><span class="cx">     };
</span><span class="cx">     addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -107,6 +107,7 @@
</span><span class="cx">     macro(underlyingSink) \
</span><span class="cx">     macro(underlyingSource) \
</span><span class="cx">     macro(view) \
</span><ins>+    macro(webRTCLegacyAPIEnabled) \
</ins><span class="cx">     macro(writing) \
</span><span class="cx">     macro(Headers) \
</span><span class="cx">     macro(MediaStream) \
</span></span></pre></div>
<a id="trunkSourceWebCorepageRuntimeEnabledFeaturesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -96,6 +96,8 @@
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx">     bool peerConnectionEnabled() const { return m_isPeerConnectionEnabled; }
</span><span class="cx">     void setPeerConnectionEnabled(bool isEnabled) { m_isPeerConnectionEnabled = isEnabled; }
</span><ins>+    bool webRTCLegacyAPIEnabled() const { return m_webRTCLegacyAPIEnabled; }
+    void setWebRTCLegacyAPIEnabled(bool isEnabled) { m_webRTCLegacyAPIEnabled = isEnabled; }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
</span><span class="lines">@@ -231,6 +233,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx">     bool m_isPeerConnectionEnabled { true };
</span><ins>+    bool m_webRTCLegacyAPIEnabled { true };
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit/mac/ChangeLog        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2017-03-16  Youenn Fablet  &lt;youenn@apple.com&gt;
+
+        Wrap legacy WebRTC API in runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=169646
+
+        Reviewed by Alex Christensen.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences webRTCLegacyAPIEnabled]):
+        (-[WebPreferences setWebRTCLegacyAPIEnabled:]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
</ins><span class="cx"> 2017-03-14  Megan Gardner  &lt;megan_gardner@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Correctly export WebItemProviderPasteboard
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -177,6 +177,7 @@
</span><span class="cx"> #define WebKitSubtleCryptoEnabledPreferenceKey @&quot;WebKitSubtleCryptoEnabled&quot;
</span><span class="cx"> #define WebKitMediaStreamEnabledPreferenceKey @&quot;WebKitMediaStreamEnabled&quot;
</span><span class="cx"> #define WebKitPeerConnectionEnabledPreferenceKey @&quot;WebKitPeerConnectionEnabled&quot;
</span><ins>+#define WebKitWebRTCLegacyAPIEnabledPreferenceKey @&quot;WebKitWebRTCLegacyAPIEnabled&quot;
</ins><span class="cx"> #define WebKitLinkPreloadEnabledPreferenceKey @&quot;WebKitLinkPreloadEnabled&quot;
</span><span class="cx"> #define WebKitCredentialManagementEnabledPreferenceKey @&quot;WebKitCredentialManagementEnabled&quot;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -655,6 +655,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx">         [NSNumber numberWithBool:NO], WebKitPeerConnectionEnabledPreferenceKey,
</span><ins>+        [NSNumber numberWithBool:NO], WebKitWebRTCLegacyAPIEnabledPreferenceKey,
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(INTERSECTION_OBSERVER)
</span><span class="cx">         @NO, WebKitIntersectionObserverEnabledPreferenceKey,
</span><span class="lines">@@ -2775,6 +2776,16 @@
</span><span class="cx">     [self _setBoolValue:flag forKey:WebKitPeerConnectionEnabledPreferenceKey];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (BOOL)webRTCLegacyAPIEnabled
+{
+    return [self _boolValueForKey:WebKitWebRTCLegacyAPIEnabledPreferenceKey];
+}
+
+- (void)setWebRTCLegacyAPIEnabled:(BOOL)flag
+{
+    [self _setBoolValue:flag forKey:WebKitWebRTCLegacyAPIEnabledPreferenceKey];
+}
+
</ins><span class="cx"> - (BOOL)linkPreloadEnabled
</span><span class="cx"> {
</span><span class="cx">     return [self _boolValueForKey:WebKitLinkPreloadEnabledPreferenceKey];
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -168,6 +168,9 @@
</span><span class="cx"> - (void)setPeerConnectionEnabled:(BOOL)flag;
</span><span class="cx"> - (BOOL)peerConnectionEnabled;
</span><span class="cx"> 
</span><ins>+- (void)setWebRTCLegacyAPIEnabled:(BOOL)flag;
+- (BOOL)webRTCLegacyAPIEnabled;
+
</ins><span class="cx"> #if !TARGET_OS_IPHONE
</span><span class="cx"> // zero means do AutoScale
</span><span class="cx"> - (float)PDFScaleFactor;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -2867,6 +2867,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx">     RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled([preferences peerConnectionEnabled]);
</span><ins>+    RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled([preferences webRTCLegacyAPIEnabled]);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_AUDIO)
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2017-03-16  Youenn Fablet  &lt;youenn@apple.com&gt;
+
+        Wrap legacy WebRTC API in runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=169646
+
+        Reviewed by Alex Christensen.
+
+        Adding preference to legacy API.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetWebRTCLegacyAPIEnabled):
+        (WKPreferencesGetWebRTCLegacyAPIEnabled):
+        * UIProcess/API/C/WKPreferencesRef.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
</ins><span class="cx"> 2017-03-16  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Update the WKHTTPCookieStore API to be simpler and add observers.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -238,6 +238,7 @@
</span><span class="cx">     macro(MockCaptureDevicesEnabled, mockCaptureDevicesEnabled, Bool, bool, false, &quot;&quot;, &quot;&quot;) \
</span><span class="cx">     macro(MediaCaptureRequiresSecureConnection, mediaCaptureRequiresSecureConnection, Bool, bool, true, &quot;&quot;, &quot;&quot;) \
</span><span class="cx">     macro(EnumeratingAllNetworkInterfacesEnabled, enumeratingAllNetworkInterfacesEnabled, Bool, bool, false, &quot;&quot;, &quot;&quot;) \
</span><ins>+    macro(WebRTCLegacyAPIEnabled, webRTCLegacyAPIEnabled, Bool, bool, true, &quot;&quot;, &quot;&quot;) \
</ins><span class="cx">     macro(ICECandidateFilteringEnabled, iceCandidateFilteringEnabled, Bool, bool, true, &quot;&quot;, &quot;&quot;) \
</span><span class="cx">     macro(ShadowDOMEnabled, shadowDOMEnabled, Bool, bool, true, &quot;Shadow DOM&quot;, &quot;HTML Shadow DOM prototype&quot;) \
</span><span class="cx">     macro(FetchAPIEnabled, fetchAPIEnabled, Bool, bool, true, &quot;&quot;, &quot;&quot;) \
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -1351,6 +1351,16 @@
</span><span class="cx">     return toImpl(preferencesRef)-&gt;peerConnectionEnabled();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WKPreferencesSetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+    toImpl(preferencesRef)-&gt;setWebRTCLegacyAPIEnabled(enabled);
+}
+
+bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)-&gt;webRTCLegacyAPIEnabled();
+}
+
</ins><span class="cx"> void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
</span><span class="cx"> {
</span><span class="cx">     toImpl(preferencesRef)-&gt;setSpatialNavigationEnabled(enabled);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencesRefh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -260,6 +260,10 @@
</span><span class="cx"> WK_EXPORT void WKPreferencesSetPeerConnectionEnabled(WKPreferencesRef preferencesRef, bool enabled);
</span><span class="cx"> WK_EXPORT bool WKPreferencesGetPeerConnectionEnabled(WKPreferencesRef preferencesRef);
</span><span class="cx"> 
</span><ins>+// Should default to false
+WK_EXPORT void WKPreferencesSetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef);
+
</ins><span class="cx"> // Defaults to false.
</span><span class="cx"> WK_EXPORT void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled);
</span><span class="cx"> WK_EXPORT bool WKPreferencesGetSpatialNavigationEnabled(WKPreferencesRef preferencesRef);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -237,6 +237,8 @@
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx">     if (preference == &quot;WebKitPeerConnectionEnabled&quot;)
</span><span class="cx">         RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled(enabled);
</span><ins>+    if (preference == &quot;WebKitWebRTCLegacyAPIEnabled&quot;)
+        RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(enabled);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -3130,6 +3130,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx">     RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled(store.getBoolValueForKey(WebPreferencesKey::peerConnectionEnabledKey()));
</span><ins>+    RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::webRTCLegacyAPIEnabledKey()));
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS)
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/ChangeLog        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2017-03-16  Youenn Fablet  &lt;youenn@apple.com&gt;
+
+        Wrap legacy WebRTC API in runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=169646
+
+        Reviewed by Alex Christensen.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (enableExperimentalFeatures):
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::beginTesting):
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::setWebRTCLegacyAPIEnabled):
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
</ins><span class="cx"> 2017-03-16  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Update the WKHTTPCookieStore API to be simpler and add observers.
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -849,6 +849,7 @@
</span><span class="cx">     [preferences setWebGL2Enabled:YES];
</span><span class="cx">     [preferences setWebGPUEnabled:YES];
</span><span class="cx">     [preferences setPeerConnectionEnabled:YES];
</span><ins>+    [preferences setWebRTCLegacyAPIEnabled:YES];
</ins><span class="cx">     [preferences setCredentialManagementEnabled:YES];
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -268,4 +268,6 @@
</span><span class="cx"> 
</span><span class="cx">     // Open panel
</span><span class="cx">     void setOpenPanelFiles(object filesArray);
</span><ins>+
+    void setWebRTCLegacyAPIEnabled(boolean value);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -345,6 +345,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_testRunner-&gt;setMediaStreamEnabled(true);
</span><span class="cx">     m_testRunner-&gt;setPeerConnectionEnabled(true);
</span><ins>+    m_testRunner-&gt;setWebRTCLegacyAPIEnabled(true);
</ins><span class="cx"> 
</span><span class="cx">     if (m_timeout &gt; 0)
</span><span class="cx">         m_testRunner-&gt;setCustomTimeout(m_timeout);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -381,6 +381,13 @@
</span><span class="cx">     WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void TestRunner::setWebRTCLegacyAPIEnabled(bool enabled)
+{
+    WKRetainPtr&lt;WKStringRef&gt; key(AdoptWK, WKStringCreateWithUTF8CString(&quot;WebKitWebRTCLegacyAPIEnabled&quot;));
+    auto&amp; injectedBundle = InjectedBundle::singleton();
+    WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
+}
+
</ins><span class="cx"> void TestRunner::setModernMediaControlsEnabled(bool enabled)
</span><span class="cx"> {
</span><span class="cx">     WKRetainPtr&lt;WKStringRef&gt; key(AdoptWK, WKStringCreateWithUTF8CString(&quot;WebKitModernMediaControlsEnabled&quot;));
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (214079 => 214080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h        2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h        2017-03-17 00:05:36 UTC (rev 214080)
</span><span class="lines">@@ -133,6 +133,7 @@
</span><span class="cx">     void setSubtleCryptoEnabled(bool);
</span><span class="cx">     void setMediaStreamEnabled(bool);
</span><span class="cx">     void setPeerConnectionEnabled(bool);
</span><ins>+    void setWebRTCLegacyAPIEnabled(bool);
</ins><span class="cx"> 
</span><span class="cx">     // Special DOM functions.
</span><span class="cx">     void clearBackForwardList();
</span></span></pre>
</div>
</div>

</body>
</html>