<!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>[236840] 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/236840">236840</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2018-10-04 12:27:10 -0700 (Thu, 04 Oct 2018)</dd>
</dl>

<h3>Log Message</h3>
<pre>LayoutTests/imported/w3c:
runtime flag and IDL for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=190018

Patch by YUHAN WU <yuhan_wu@apple.com> on 2018-10-04
Reviewed by Youenn Fablet and Chris Dumez.

* web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt:
* web-platform-tests/mediacapture-record/MediaRecorder-constructor-expected.txt: Added.
* web-platform-tests/mediacapture-record/MediaRecorder-constructor.html: Added.

Source/WebCore:
runtime flag and IDL for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=190018

Patch by Yuhan Wu <yuhan_wu@apple.com> on 2018-10-04
Reviewed by Youenn Fablet and Chris Dumez.

Covered by tests:
imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html

Add an architecture of the IDL and the class for MediaRecorder and BlobEvent.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediarecorder/BlobEvent.h:
(WebCore::BlobEvent::create):
(WebCore::BlobEvent:::Event):
* Modules/mediarecorder/BlobEvent.idl:
* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::create):
(WebCore::MediaRecorder::MediaRecorder):
(WebCore::MediaRecorder::activeDOMObjectName const):
(WebCore::MediaRecorder::canSuspendForDocumentSuspension const):
* Modules/mediarecorder/MediaRecorder.h: Added.
(WebCore::MediaRecorder::state const):
(WebCore::MediaRecorder::~MediaRecorder):
* Modules/mediarecorder/MediaRecorder.idl:
* Modules/mediastream/RTCRtpReceiver.cpp:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::mediaRecorderEnabled const):
(WebCore::RuntimeEnabledFeatures::setMediaRecorderEnabled):

Source/WebKit:
runtime flag and IDL for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=190018

Patch by Yuhan Wu <yuhan_wu@apple.com> on 2018-10-04
Reviewed by Youenn Fablet and Chris Dumez.

* Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:
Runtime flag and IDL for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=190018

Patch by YUHAN WU <yuhan_wu@apple.com> on 2018-10-04
Reviewed by Youenn Fablet and Chris Dumez.

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

Tools:
Runtime flag and IDL for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=190018

Patch by YUHAN WU <yuhan_wu@apple.com> on 2018-10-04
Reviewed by Youenn Fablet and Chris Dumez.

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):

LayoutTests:
runtime flag and IDL for MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=190018

Patch by YUHAN WU <yuhan_wu@apple.com> on 2018-10-04
Reviewed by Youenn Fablet and Chris Dumez.

* platform/win/TestExpectations:
* fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt:
* fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt:
* fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastmediacapturefromelementCanvasCaptureMediaStreamcaptureoutofDOMelementexpectedtxt">trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediacapturefromelementCanvasCaptureMediaStreamframerate0expectedtxt">trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediacapturefromelementCanvasCaptureMediaStreamimagebitmaprenderingcontextexpectedtxt">trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsmediacapturerecordBlobEventconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwinTestExpectations">trunk/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpReceivercpp">trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.cpp</a></li>
<li><a href="#trunkSourceWebCoreSourcestxt">trunk/Source/WebCore/Sources.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</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="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitSharedWebPreferencesyaml">trunk/Source/WebKit/Shared/WebPreferences.yaml</a></li>
<li><a href="#trunkSourceWebKitLegacymacChangeLog">trunk/Source/WebKitLegacy/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebViewWebPreferenceKeysPrivateh">trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebViewWebPreferencesmm">trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebViewWebPreferencesPrivateh">trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#trunkSourceWebKitLegacymacWebViewWebViewmm">trunk/Source/WebKitLegacy/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsmediacapturerecordMediaRecorderconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsmediacapturerecordMediaRecorderconstructorhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html</a></li>
<li>trunk/Source/WebCore/Modules/mediarecorder/</li>
<li><a href="#trunkSourceWebCoreModulesmediarecorderBlobEventh">trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediarecorderBlobEventidl">trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediarecorderMediaRecordercpp">trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediarecorderMediaRecorderh">trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediarecorderMediaRecorderidl">trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/ChangeLog 2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2018-10-04  YUHAN WU  <yuhan_wu@apple.com>
+
+        runtime flag and IDL for MediaRecorder
+        https://bugs.webkit.org/show_bug.cgi?id=190018
+
+        Reviewed by Youenn Fablet and Chris Dumez.
+
+        * platform/win/TestExpectations:
+        * fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt:
+        * fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt:
+        * fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt:
+
</ins><span class="cx"> 2018-10-04  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r236803.
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediacapturefromelementCanvasCaptureMediaStreamcaptureoutofDOMelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt  2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-element-expected.txt     2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><del>-FAIL Verify that drawing to a 2D canvas that is not attached to the DOM dispatches frames to an attached MediaRecorder. Can't find variable: MediaRecorder
-FAIL Verify that drawing to a webgl canvas that is not attached to the DOM dispatches frames to an attached MediaRecorder. Can't find variable: MediaRecorder
</del><ins>+FAIL Verify that drawing to a 2D canvas that is not attached to the DOM dispatches frames to an attached MediaRecorder. recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
+FAIL Verify that drawing to a webgl canvas that is not attached to the DOM dispatches frames to an attached MediaRecorder. recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediacapturefromelementCanvasCaptureMediaStreamframerate0expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-framerate-0-expected.txt    2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: line 45: ReferenceError: Can't find variable: MediaRecorder
</del><ins>+CONSOLE MESSAGE: line 48: TypeError: recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
</ins><span class="cx"> Exercises that at least one frame passes on captureStream(0).
</span><span class="cx"> 
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS Got a stream from canvas.
</span><span class="cx"> PASS stream.getVideoTracks().length is 1
</span><span class="cx"> PASS track.readyState is "live"
</span><del>-FAIL Unexpected error: ReferenceError: Can't find variable: MediaRecorder
</del><ins>+FAIL Unexpected error: TypeError: recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
</ins><span class="cx"> FAIL successfullyParsed should be true. Was false.
</span><span class="cx"> Some tests failed.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediacapturefromelementCanvasCaptureMediaStreamimagebitmaprenderingcontextexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext-expected.txt    2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><del>-FAIL Untitled Can't find variable: MediaRecorder
-FAIL Untitled 1 Can't find variable: MediaRecorder
</del><ins>+FAIL Untitled recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
+FAIL Untitled 1 recorder.start is not a function. (In 'recorder.start(0)', 'recorder.start' is undefined)
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/imported/w3c/ChangeLog    2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2018-10-04  YUHAN WU  <yuhan_wu@apple.com>
+
+        runtime flag and IDL for MediaRecorder
+        https://bugs.webkit.org/show_bug.cgi?id=190018
+
+        Reviewed by Youenn Fablet and Chris Dumez.
+
+        * web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt:
+        * web-platform-tests/mediacapture-record/MediaRecorder-constructor-expected.txt: Added.
+        * web-platform-tests/mediacapture-record/MediaRecorder-constructor.html: Added.
+
</ins><span class="cx"> 2018-10-03  Justin Michaud  <justin_michaud@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Registered custom properties should allow inheritance to be controlled
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsmediacapturerecordBlobEventconstructorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt    2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1,7 +1,5 @@
</span><span class="cx"> 
</span><del>-FAIL The BlobEventInit dictionary is required Can't find variable: BlobEvent
-FAIL The BlobEventInit dictionary's data member is required. assert_throws: function "function () {
-    new BlobEvent("type", {});
-  }" threw object "ReferenceError: Can't find variable: BlobEvent" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL The BlobEvent instance's data attribute is set. Can't find variable: BlobEvent
</del><ins>+PASS The BlobEventInit dictionary is required 
+PASS The BlobEventInit dictionary's data member is required. 
+FAIL The BlobEvent instance's data attribute is set. assert_equals: expected (object) object "[object Blob]" but got (undefined) undefined
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsmediacapturerecordMediaRecorderconstructorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor-expected.txt (0 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor-expected.txt                             (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor-expected.txt        2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+PASS The MediaStream argument is required 
+PASS The MediaStream instance's state attribute is set. 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsmediacapturerecordMediaRecorderconstructorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html (0 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html                             (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html        2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+<!doctype html>
+<title>MediaRecorder constructor</title>
+<link rel="help" href="https://w3c.github.io/mediacapture-record/MediaRecorder.html#mediarecorder">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+    test(function() {
+        assert_equals(MediaRecorder.length, 1);
+        assert_throws(new TypeError, function() {
+            new MediaRecorder();
+        });
+        assert_throws(new TypeError, function() {
+            new MediaRecorder(null);
+        });
+        assert_throws(new TypeError, function() {
+            new MediaRecorder(undefined);
+        });
+    }, "The MediaStream argument is required");
+
+    test(function() {
+        var context = new AudioContext();
+        var dest = context.createMediaStreamDestination();
+        var recorder = new MediaRecorder(dest.stream);
+        assert_equals(recorder.state, "inactive");
+    }, "The MediaStream instance's state attribute is set.");
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/TestExpectations (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/TestExpectations  2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/LayoutTests/platform/win/TestExpectations     2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -4212,3 +4212,9 @@
</span><span class="cx"> webkit.org/b/190032 css3/filters/composited-during-animation-layertree.html [ Pass Failure ]
</span><span class="cx"> webkit.org/b/190032 transitions/clip-path-transitions.html [ Pass Failure ]
</span><span class="cx"> webkit.org/b/190032 legacy-animation-engine/animations/stacking-context-unchanged-while-running.html [ Pass ImageOnlyFailure ]
</span><ins>+
+# MediaRecorder is not enabled on Windows
+imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html [ Skip ]
+imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html [ Skip ]
+fast/mediacapturefromelement/CanvasCaptureMediaStream-imagebitmaprenderingcontext.html [ Skip ]
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt      2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/CMakeLists.txt 2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx">     "${WEBCORE_DIR}/Modules/mediasession"
</span><span class="cx">     "${WEBCORE_DIR}/Modules/mediasource"
</span><span class="cx">     "${WEBCORE_DIR}/Modules/mediastream"
</span><ins>+    "${WEBCORE_DIR}/Modules/mediarecorder"
</ins><span class="cx">     "${WEBCORE_DIR}/Modules/navigatorcontentutils"
</span><span class="cx">     "${WEBCORE_DIR}/Modules/notifications"
</span><span class="cx">     "${WEBCORE_DIR}/Modules/paymentrequest"
</span><span class="lines">@@ -175,6 +176,7 @@
</span><span class="cx">     Modules/geolocation
</span><span class="cx">     Modules/indexeddb
</span><span class="cx">     Modules/mediacapabilities
</span><ins>+    Modules/mediarecorder
</ins><span class="cx">     Modules/mediasession
</span><span class="cx">     Modules/mediastream
</span><span class="cx">     Modules/notifications
</span><span class="lines">@@ -277,6 +279,9 @@
</span><span class="cx"> 
</span><span class="cx">     Modules/mediacontrols/MediaControlsHost.idl
</span><span class="cx"> 
</span><ins>+    Modules/mediarecorder/BlobEvent.idl
+    Modules/mediarecorder/MediaRecorder.idl
+
</ins><span class="cx">     Modules/mediasession/HTMLMediaElementMediaSession.idl
</span><span class="cx">     Modules/mediasession/MediaRemoteControls.idl
</span><span class="cx">     Modules/mediasession/MediaSession.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/ChangeLog      2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2018-10-04  Yuhan Wu  <yuhan_wu@apple.com>
+
+        runtime flag and IDL for MediaRecorder
+        https://bugs.webkit.org/show_bug.cgi?id=190018
+
+        Reviewed by Youenn Fablet and Chris Dumez.
+
+        Covered by tests:
+        imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
+        imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html
+
+        Add an architecture of the IDL and the class for MediaRecorder and BlobEvent.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * Modules/mediarecorder/BlobEvent.h:
+        (WebCore::BlobEvent::create):
+        (WebCore::BlobEvent:::Event):
+        * Modules/mediarecorder/BlobEvent.idl:
+        * Modules/mediarecorder/MediaRecorder.cpp:
+        (WebCore::MediaRecorder::create):
+        (WebCore::MediaRecorder::MediaRecorder):
+        (WebCore::MediaRecorder::activeDOMObjectName const):
+        (WebCore::MediaRecorder::canSuspendForDocumentSuspension const):
+        * Modules/mediarecorder/MediaRecorder.h: Added.
+        (WebCore::MediaRecorder::state const):
+        (WebCore::MediaRecorder::~MediaRecorder):
+        * Modules/mediarecorder/MediaRecorder.idl:
+        * Modules/mediastream/RTCRtpReceiver.cpp:
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/WebCoreBuiltinNames.h:
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::mediaRecorderEnabled const):
+        (WebCore::RuntimeEnabledFeatures::setMediaRecorderEnabled):
+
</ins><span class="cx"> 2018-10-04  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r236803.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/DerivedSources.make    2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx">     $(WebCore)/Modules/mediasession \
</span><span class="cx">     $(WebCore)/Modules/mediasource \
</span><span class="cx">     $(WebCore)/Modules/mediastream \
</span><ins>+       $(WebCore)/Modules/mediarecorder \
</ins><span class="cx">     $(WebCore)/Modules/notifications \
</span><span class="cx">     $(WebCore)/Modules/paymentrequest \
</span><span class="cx">     $(WebCore)/Modules/plugins \
</span><span class="lines">@@ -202,6 +203,8 @@
</span><span class="cx">     $(WebCore)/Modules/mediacapabilities/ScreenLuminance.idl \
</span><span class="cx">     $(WebCore)/Modules/mediacapabilities/VideoConfiguration.idl \
</span><span class="cx">     $(WebCore)/Modules/mediacontrols/MediaControlsHost.idl \
</span><ins>+       $(WebCore)/Modules/mediarecorder/BlobEvent.idl \
+       $(WebCore)/Modules/mediarecorder/MediaRecorder.idl \
</ins><span class="cx">     $(WebCore)/Modules/mediasession/HTMLMediaElementMediaSession.idl \
</span><span class="cx">     $(WebCore)/Modules/mediasession/MediaRemoteControls.idl \
</span><span class="cx">     $(WebCore)/Modules/mediasession/MediaSession.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediarecorderBlobEventh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.h (0 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.h                           (rev 0)
+++ trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.h      2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2018 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
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "Event.h"
+
+namespace WebCore {
+    
+class Blob;
+    
+class BlobEvent final : public Event {
+public:
+    struct Init : EventInit {
+        RefPtr<Blob> data;
+        double timecode;
+    };
+    
+    static Ref<BlobEvent> create(const AtomicString& type, Init&& init, IsTrusted isTrusted = IsTrusted::No)
+    {
+        return adoptRef(*new BlobEvent(type, WTFMove(init), isTrusted));
+    }
+
+private:
+    BlobEvent(const AtomicString& type, Init&& init, IsTrusted isTrusted)
+        : Event(type, WTFMove(init), isTrusted)
+    {
+    }
+};
+    
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediarecorderBlobEventidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.idl (0 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.idl                         (rev 0)
+++ trunk/Source/WebCore/Modules/mediarecorder/BlobEvent.idl    2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+/*
+ * Copyright (C) 2018 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.
+ */
+
+typedef double DOMHighResTimeStamp;
+
+[
+    Conditional=MEDIA_STREAM,
+    Constructor(DOMString type, BlobEventInit eventInitDict),
+    EnabledAtRuntime=MediaRecorder,
+    Exposed=Window
+]  interface BlobEvent : Event {
+    // FIXME: Implement these:
+    // [SameObject] readonly attribute Blob data;
+    // readonly attribute DOMHighResTimeStamp timecode;
+};
+
+dictionary BlobEventInit : EventInit {
+    required Blob data;
+    DOMHighResTimeStamp timecode;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediarecorderMediaRecordercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp (0 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp                             (rev 0)
+++ trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp        2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2018 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.
+ */
+
+
+#include "config.h"
+#include "MediaRecorder.h"
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "Document.h"
+#include "MediaStream.h"
+
+namespace WebCore {
+
+Ref<MediaRecorder> MediaRecorder::create(Document& document, Ref<MediaStream>&& stream, Options&& options)
+{
+    auto recorder = adoptRef(*new MediaRecorder(document, WTFMove(stream), WTFMove(options)));
+    recorder->suspendIfNeeded();
+    return recorder;
+}
+
+MediaRecorder::MediaRecorder(Document& document, Ref<MediaStream>&& stream, Options&& option)
+    : ActiveDOMObject(&document)
+    , m_options(WTFMove(option))
+    , m_stream(WTFMove(stream))
+{
+}
+
+const char* MediaRecorder::activeDOMObjectName() const
+{
+    return "MediaRecorder";
+}
+
+bool MediaRecorder::canSuspendForDocumentSuspension() const
+{
+    return false; // FIXME: We should do better here as this prevents entering PageCache.
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediarecorderMediaRecorderh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.h (0 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.h                               (rev 0)
+++ trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.h  2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -0,0 +1,74 @@
</span><ins>+/*
+ * Copyright (C) 2018 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
+
+#if ENABLE(MEDIA_STREAM)
+#include "ActiveDOMObject.h"
+#include "EventTarget.h"
+
+namespace WebCore {
+
+class Document;
+class MediaStream;
+
+class MediaRecorder final : public ActiveDOMObject, public RefCounted<MediaRecorder>, public EventTargetWithInlineData {
+public:
+    enum class RecordingState { Inactive, Recording, Paused };
+    
+    struct Options {
+        String mimeType;
+        unsigned audioBitsPerSecond;
+        unsigned videoBitsPerSecond;
+        unsigned bitsPerSecond;
+    };
+    
+    static Ref<MediaRecorder> create(Document&, Ref<MediaStream>&&, Options&& = { });
+    
+    RecordingState state() const { return m_state; }
+    
+    using RefCounted::ref;
+    using RefCounted::deref;
+    
+private:
+    MediaRecorder(Document&, Ref<MediaStream>&&, Options&& = { });
+    
+    // EventTarget
+    void refEventTarget() final { ref(); }
+    void derefEventTarget() final { deref(); }
+    EventTargetInterface eventTargetInterface() const final { return MediaStreamEventTargetInterfaceType; }
+    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
+
+    // ActiveDOMObject API.
+    const char* activeDOMObjectName() const final;
+    bool canSuspendForDocumentSuspension() const final;
+    
+    Options m_options;
+    Ref<MediaStream> m_stream;
+    RecordingState m_state { RecordingState::Inactive };
+};
+    
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediarecorderMediaRecorderidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl (0 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl                             (rev 0)
+++ trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.idl        2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2018 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 RecordingState { "inactive", "recording", "paused" };
+
+[
+    ActiveDOMObject,
+    Conditional=MEDIA_STREAM,
+    Constructor(MediaStream stream, optional MediaRecorderOptions options),
+    ConstructorCallWith=Document,
+    EnabledAtRuntime=MediaRecorder,
+    Exposed=Window
+] interface MediaRecorder : EventTarget {
+    readonly attribute RecordingState state;
+    // FIXME: Implement these:
+    // readonly attribute MediaStream stream;
+    // readonly attribute DOMString mimeType;
+    // attribute EventHandler onstart;
+    // attribute EventHandler onstop;
+    // attribute EventHandler ondataavailable;
+    // attribute EventHandler onpause;
+    // attribute EventHandler onresume;
+    // attribute EventHandler onerror;
+    // readonly attribute unsigned long videoBitsPerSecond;
+    // readonly attribute unsigned long audioBitsPerSecond;
+
+    // void start(optional long timeslice);
+    // void stop();
+    // void pause();
+    // void resume();
+    // void requestData();
+
+    // static boolean isTypeSupported(DOMString type);
+};
+
+dictionary MediaRecorderOptions {
+    DOMString mimeType;
+    unsigned long audioBitsPerSecond;
+    unsigned long videoBitsPerSecond;
+    unsigned long bitsPerSecond;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpReceivercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.cpp (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.cpp      2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.cpp 2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "RTCRtpReceiver.h"
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><ins>+#include "PeerConnectionBackend.h"
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Sources.txt (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Sources.txt 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/Sources.txt    2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -140,6 +140,8 @@
</span><span class="cx"> 
</span><span class="cx"> Modules/mediacontrols/MediaControlsHost.cpp
</span><span class="cx"> 
</span><ins>+Modules/mediarecorder/MediaRecorder.cpp
+
</ins><span class="cx"> Modules/mediasession/HTMLMediaElementMediaSession.cpp
</span><span class="cx"> Modules/mediasession/MediaRemoteControls.cpp
</span><span class="cx"> Modules/mediasession/MediaSession.cpp
</span><span class="lines">@@ -2438,6 +2440,7 @@
</span><span class="cx"> JSBiquadFilterNode.cpp
</span><span class="cx"> JSBlob.cpp
</span><span class="cx"> JSBlobCallback.cpp
</span><ins>+JSBlobEvent.cpp
</ins><span class="cx"> JSBlobLineEndings.cpp
</span><span class="cx"> JSBlobPropertyBag.cpp
</span><span class="cx"> JSByteLengthQueuingStrategy.cpp
</span><span class="lines">@@ -2762,6 +2765,7 @@
</span><span class="cx"> JSMediaList.cpp
</span><span class="cx"> JSMediaQueryList.cpp
</span><span class="cx"> JSMediaQueryListListener.cpp
</span><ins>+JSMediaRecorder.cpp
</ins><span class="cx"> JSMediaRemoteControls.cpp
</span><span class="cx"> JSMediaSession.cpp
</span><span class="cx"> JSMediaSource.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1351,6 +1351,8 @@
</span><span class="cx">          4BDA3FFE2151B6F500FD6604 /* DOMCSSCustomPropertyDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FF82151B6F200FD6604 /* DOMCSSCustomPropertyDescriptor.h */; };
</span><span class="cx">          4BDA3FFF2151B6F500FD6604 /* DOMCSSRegisterCustomProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */; };
</span><span class="cx">          4BDA40012151B6F500FD6604 /* CSSRegisteredCustomProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+               4D3B00AB215D69A70076B983 /* MediaRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D3B00A9215D69A70076B983 /* MediaRecorder.h */; };
+               4D3B00AF215D6A690076B983 /* BlobEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D3B00AD215D6A690076B983 /* BlobEvent.h */; };
</ins><span class="cx">           4E1959220A39DABA00220FE5 /* MediaFeatureNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959200A39DABA00220FE5 /* MediaFeatureNames.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          4E19592A0A39DACC00220FE5 /* MediaQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959240A39DACC00220FE5 /* MediaQuery.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          4E19592C0A39DACC00220FE5 /* MediaQueryEvaluator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959260A39DACC00220FE5 /* MediaQueryEvaluator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -7862,6 +7864,11 @@
</span><span class="cx">          4BDA3FF92151B6F300FD6604 /* DOMCSSRegisterCustomProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMCSSRegisterCustomProperty.h; sourceTree = "<group>"; };
</span><span class="cx">          4BDA3FFA2151B6F300FD6604 /* DOMCSSCustomPropertyDescriptor.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMCSSCustomPropertyDescriptor.idl; sourceTree = "<group>"; };
</span><span class="cx">          4BDA3FFB2151B6F400FD6604 /* CSSRegisteredCustomProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSRegisteredCustomProperty.h; sourceTree = "<group>"; };
</span><ins>+               4D3B00A4215D61040076B983 /* MediaRecorder.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaRecorder.idl; sourceTree = "<group>"; };
+               4D3B00A6215D645B0076B983 /* BlobEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BlobEvent.idl; sourceTree = "<group>"; };
+               4D3B00A8215D69A60076B983 /* MediaRecorder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaRecorder.cpp; sourceTree = "<group>"; };
+               4D3B00A9215D69A70076B983 /* MediaRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaRecorder.h; sourceTree = "<group>"; };
+               4D3B00AD215D6A690076B983 /* BlobEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobEvent.h; sourceTree = "<group>"; };
</ins><span class="cx">           4E19591F0A39DABA00220FE5 /* MediaFeatureNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MediaFeatureNames.cpp; sourceTree = "<group>"; };
</span><span class="cx">          4E1959200A39DABA00220FE5 /* MediaFeatureNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MediaFeatureNames.h; sourceTree = "<group>"; };
</span><span class="cx">          4E1959230A39DACC00220FE5 /* MediaQuery.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MediaQuery.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -17767,6 +17774,18 @@
</span><span class="cx">                  path = animation;
</span><span class="cx">                  sourceTree = "<group>";
</span><span class="cx">          };
</span><ins>+               4D3B00A0215D5C0F0076B983 /* mediarecorder */ = {
+                       isa = PBXGroup;
+                       children = (
+                               4D3B00AD215D6A690076B983 /* BlobEvent.h */,
+                               4D3B00A6215D645B0076B983 /* BlobEvent.idl */,
+                               4D3B00A8215D69A60076B983 /* MediaRecorder.cpp */,
+                               4D3B00A9215D69A70076B983 /* MediaRecorder.h */,
+                               4D3B00A4215D61040076B983 /* MediaRecorder.idl */,
+                       );
+                       path = mediarecorder;
+                       sourceTree = "<group>";
+               };
</ins><span class="cx">           510310421BA8C64C003329C0 /* client */ = {
</span><span class="cx">                  isa = PBXGroup;
</span><span class="cx">                  children = (
</span><span class="lines">@@ -21001,6 +21020,7 @@
</span><span class="cx">                          9712A55315004E3C0048AF10 /* indexeddb */,
</span><span class="cx">                          CDBD3D271FE85C920012C545 /* mediacapabilities */,
</span><span class="cx">                          CD9A37F517C7D93600C5FA7A /* mediacontrols */,
</span><ins>+                               4D3B00A0215D5C0F0076B983 /* mediarecorder */,
</ins><span class="cx">                           0709D78B1AE5552E004E42F8 /* mediasession */,
</span><span class="cx">                          B1A942DD15B5CE2200D525D1 /* mediasource */,
</span><span class="cx">                          07221B4617CEC32700848E51 /* mediastream */,
</span><span class="lines">@@ -27381,6 +27401,7 @@
</span><span class="cx">                          A15D75161E68F7C800A35FBC /* BlobCallback.h in Headers */,
</span><span class="cx">                          2EDEF1F4121B0EFC00726DB2 /* BlobData.h in Headers */,
</span><span class="cx">                          E1D31CDD19196020001005A3 /* BlobDataFileReference.h in Headers */,
</span><ins>+                               4D3B00AF215D6A690076B983 /* BlobEvent.h in Headers */,
</ins><span class="cx">                           7C77C3D71DEF850A00A50BFA /* BlobLineEndings.h in Headers */,
</span><span class="cx">                          E1C94AF9191303F000D5A893 /* BlobPart.h in Headers */,
</span><span class="cx">                          7C77C3D11DEE472400A50BFA /* BlobPropertyBag.h in Headers */,
</span><span class="lines">@@ -29574,6 +29595,7 @@
</span><span class="cx">                          D3AA10F4123A98AA0092152B /* MediaQueryMatcher.h in Headers */,
</span><span class="cx">                          9493B6C11D74B4120088E780 /* MediaQueryParser.h in Headers */,
</span><span class="cx">                          4471710E205AF945000A116E /* MediaQueryParserContext.h in Headers */,
</span><ins>+                               4D3B00AB215D69A70076B983 /* MediaRecorder.h in Headers */,
</ins><span class="cx">                           C90843D01B18E47D00B68564 /* MediaRemoteControls.h in Headers */,
</span><span class="cx">                          CD8ACA8F1D23971900ECC59E /* MediaRemoteSoftLink.h in Headers */,
</span><span class="cx">                          CEEFCD7A19DB31F7003876D7 /* MediaResourceLoader.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h   2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h      2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx">     macro(AuthenticatorAssertionResponse) \
</span><span class="cx">     macro(AuthenticatorAttestationResponse) \
</span><span class="cx">     macro(AuthenticatorResponse) \
</span><ins>+    macro(BlobEvent) \
</ins><span class="cx">     macro(Cache) \
</span><span class="cx">     macro(CacheStorage) \
</span><span class="cx">     macro(Client) \
</span><span class="lines">@@ -97,6 +98,7 @@
</span><span class="cx">     macro(MediaKeyStatusMap) \
</span><span class="cx">     macro(MediaKeySystemAccess) \
</span><span class="cx">     macro(MediaKeys) \
</span><ins>+    macro(MediaRecorder) \
</ins><span class="cx">     macro(MediaSource) \
</span><span class="cx">     macro(MediaStream) \
</span><span class="cx">     macro(MediaStreamTrack) \
</span></span></pre></div>
<a id="trunkSourceWebCorepageRuntimeEnabledFeaturesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h       2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h  2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -181,6 +181,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><ins>+    bool mediaRecorderEnabled() const { return m_isMediaRecorderEnabled; }
+    void setMediaRecorderEnabled(bool isEnabled) { m_isMediaRecorderEnabled = isEnabled; }
</ins><span class="cx">     bool mediaDevicesEnabled() const { return m_isMediaDevicesEnabled; }
</span><span class="cx">     void setMediaDevicesEnabled(bool isEnabled) { m_isMediaDevicesEnabled = isEnabled; }
</span><span class="cx">     bool mediaStreamEnabled() const { return m_isMediaStreamEnabled; }
</span><span class="lines">@@ -344,6 +346,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><ins>+    bool m_isMediaRecorderEnabled { false };
</ins><span class="cx">     bool m_isMediaDevicesEnabled { false };
</span><span class="cx">     bool m_isMediaStreamEnabled { true };
</span><span class="cx">     bool m_isScreenCaptureEnabled { false };
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKit/ChangeLog       2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2018-10-04  Yuhan Wu  <yuhan_wu@apple.com>
+
+        runtime flag and IDL for MediaRecorder
+        https://bugs.webkit.org/show_bug.cgi?id=190018
+
+        Reviewed by Youenn Fablet and Chris Dumez.
+
+        * Shared/WebPreferences.yaml:
+
</ins><span class="cx"> 2018-10-03  Dan Bernstein  <mitz@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Tried to fix non-Cocoa, ENABLE(ATTACHMENT_ELEMENT) builds after r236822.
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebPreferencesyaml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebPreferences.yaml   2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml      2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -459,6 +459,15 @@
</span><span class="cx">   type: bool
</span><span class="cx">   defaultValue: false
</span><span class="cx"> 
</span><ins>+MediaRecorderEnabled:
+    type: bool
+    defaultValue: false
+    webcoreBinding: RuntimeEnabledFeatures
+    condition: ENABLE(MEDIA_STREAM)
+    humanReadableName: "MediaRecorder"
+    humanReadableDescription: "MediaRecorder"
+    category: experimental
+
</ins><span class="cx"> MediaDevicesEnabled:
</span><span class="cx">   type: bool
</span><span class="cx">   defaultValue: false
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/ChangeLog  2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog     2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2018-10-04  YUHAN WU  <yuhan_wu@apple.com>
+
+        Runtime flag and IDL for MediaRecorder
+        https://bugs.webkit.org/show_bug.cgi?id=190018
+
+        Reviewed by Youenn Fablet and Chris Dumez.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences mediaRecorderEnabled]):
+        (-[WebPreferences setMediaRecorderEnabled:]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
</ins><span class="cx"> 2018-10-03  Ryosuke Niwa  <rniwa@webkit.org>
</span><span class="cx"> 
</span><span class="cx">         Enable selectionAcrossShadowBoundariesEnabled by default in WebKitLegacy
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h    2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -260,5 +260,6 @@
</span><span class="cx"> #define WebKitAccessibilityObjectModelEnabledPreferenceKey @"WebKitAccessibilityObjectModelEnabled"
</span><span class="cx"> #define WebKitAriaReflectionEnabledPreferenceKey @"WebKitAriaReflectionEnabled"
</span><span class="cx"> #define WebKitMediaCapabilitiesEnabledPreferenceKey @"WebKitMediaCapabilitiesEnabled"
</span><ins>+#define WebKitMediaRecorderEnabledPreferenceKey @"WebKitMediaRecorderEnabled"
</ins><span class="cx"> #define WebKitServerTimingEnabledPreferenceKey @"WebKitServerTimingEnabled"
</span><span class="cx"> #define WebKitSelectionAcrossShadowBoundariesEnabledPreferenceKey @"WebKitSelectionAcrossShadowBoundariesEnabled"
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm  2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm     2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -659,6 +659,7 @@
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">         [NSNumber numberWithBool:NO], WebKitMediaDevicesEnabledPreferenceKey,
</span><span class="cx">         [NSNumber numberWithBool:YES], WebKitMediaStreamEnabledPreferenceKey,
</span><ins>+        [NSNumber numberWithBool:YES], WebKitMediaRecorderEnabledPreferenceKey,
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx">         [NSNumber numberWithBool:YES], WebKitPeerConnectionEnabledPreferenceKey,
</span><span class="lines">@@ -3345,6 +3346,16 @@
</span><span class="cx">     [self _setBoolValue:flag forKey:WebKitMediaCapabilitiesEnabledPreferenceKey];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (BOOL)mediaRecorderEnabled
+{
+    return [self _boolValueForKey:WebKitMediaRecorderEnabledPreferenceKey];
+}
+
+- (void)setMediaRecorderEnabled:(BOOL)flag
+{
+    [self _setBoolValue:flag forKey:WebKitMediaRecorderEnabledPreferenceKey];
+}
+
</ins><span class="cx"> - (BOOL)serverTimingEnabled
</span><span class="cx"> {
</span><span class="cx">     return [self _boolValueForKey:WebKitServerTimingEnabledPreferenceKey];
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h    2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h       2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -611,6 +611,7 @@
</span><span class="cx"> @property (nonatomic) BOOL accessibilityObjectModelEnabled;
</span><span class="cx"> @property (nonatomic) BOOL ariaReflectionEnabled;
</span><span class="cx"> @property (nonatomic) BOOL mediaCapabilitiesEnabled;
</span><ins>+@property (nonatomic) BOOL mediaRecorderEnabled;
</ins><span class="cx"> @property (nonatomic) BOOL allowCrossOriginSubresourcesToAskForCredentials;
</span><span class="cx"> @property (nonatomic) BOOL sourceBufferChangeTypeEnabled;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitLegacymacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm    2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -3048,6 +3048,7 @@
</span><span class="cx">     DeprecatedGlobalSettings::setMediaCaptureRequiresSecureConnection(true);
</span><span class="cx">     RuntimeEnabledFeatures::sharedFeatures().setMediaStreamEnabled(false);
</span><span class="cx">     RuntimeEnabledFeatures::sharedFeatures().setMediaDevicesEnabled(false);
</span><ins>+    RuntimeEnabledFeatures::sharedFeatures().setMediaRecorderEnabled(preferences.mediaRecorderEnabled);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Tools/ChangeLog       2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2018-10-04  YUHAN WU  <yuhan_wu@apple.com>
+
+        Runtime flag and IDL for MediaRecorder
+        https://bugs.webkit.org/show_bug.cgi?id=190018
+
+        Reviewed by Youenn Fablet and Chris Dumez.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (enableExperimentalFeatures):
+
</ins><span class="cx"> 2018-10-04  Basuke Suzuki  <Basuke.Suzuki@sony.com>
</span><span class="cx"> 
</span><span class="cx">         [LayoutTests][Win] Stop wpt server correctly.
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (236839 => 236840)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2018-10-04 19:23:34 UTC (rev 236839)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm    2018-10-04 19:27:10 UTC (rev 236840)
</span><span class="lines">@@ -869,6 +869,7 @@
</span><span class="cx">     [preferences setIntersectionObserverEnabled:YES];
</span><span class="cx">     preferences.sourceBufferChangeTypeEnabled = YES;
</span><span class="cx">     [preferences setCSSOMViewScrollingAPIEnabled:YES];
</span><ins>+    [preferences setMediaRecorderEnabled:YES];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Called before each test.
</span></span></pre>
</div>
</div>

</body>
</html>