<!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>[192602] 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/192602">192602</a></dd>
<dt>Author</dt> <dd>eric.carlson@apple.com</dd>
<dt>Date</dt> <dd>2015-11-18 17:24:02 -0800 (Wed, 18 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>MediaStream: Implement MediaDevices.getSupportedConstraints
https://bugs.webkit.org/show_bug.cgi?id=151394

Reviewed by Brent Fulgham.

Source/WebCore:

Test: fast/mediastream/MediaDevices-getSupportedConstraints.html

* CMakeLists.txt: Add MediaTrackSupportedConstraints and JSMediaTrackSupportedConstraintsCustom.

* DerivedSources.make: Ditto.

* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getSupportedConstraints): New.
* Modules/mediastream/MediaDevices.h:
* Modules/mediastream/MediaDevices.idl:

* Modules/mediastream/MediaTrackSupportedConstraints.h: Added. Wrapper around a 
  RealtimeMediaSourceSupportedConstraints.
(WebCore::MediaTrackSupportedConstraints::create):
(WebCore::MediaTrackSupportedConstraints::supportsWidth):
(WebCore::MediaTrackSupportedConstraints::supportsHeight):
(WebCore::MediaTrackSupportedConstraints::supportsAspectRatio):
(WebCore::MediaTrackSupportedConstraints::supportsFrameRate):
(WebCore::MediaTrackSupportedConstraints::supportsFacingMode):
(WebCore::MediaTrackSupportedConstraints::supportsVolume):
(WebCore::MediaTrackSupportedConstraints::supportsSampleRate):
(WebCore::MediaTrackSupportedConstraints::supportsSampleSize):
(WebCore::MediaTrackSupportedConstraints::supportsEchoCancellation):
(WebCore::MediaTrackSupportedConstraints::supportsDeviceId):
(WebCore::MediaTrackSupportedConstraints::supportsGroupId):
(WebCore::MediaTrackSupportedConstraints::MediaTrackSupportedConstraints):
* Modules/mediastream/MediaTrackSupportedConstraints.idl: Added.

* WebCore.xcodeproj/project.pbxproj: Add JSMediaTrackSupportedConstraintsCustom.cpp, 
  RealtimeMediaSourceSupportedConstraints.h, and MediaTrackSupportedConstraints.*.

A MediaTrackSupportedConstraints only contains the properties supported by the currently
available capture devices, so implement getOwnPropertySlot and getOwnPropertyNames so
we don't have to declare any attributes in the idl file.
* bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp: Added.
(WebCore::JSMediaTrackSupportedConstraints::getOwnPropertySlotDelegate):
(WebCore::JSMediaTrackSupportedConstraints::getOwnPropertyNames):

* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mediastream/RealtimeMediaSourceSupportedConstraints.h: Added.
(WebCore::RealtimeMediaSourceSupportedConstraints::RealtimeMediaSourceSupportedConstraints):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsWidth):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsWidth):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsHeight):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsHeight):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsAspectRatio):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsAspectRatio):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsFrameRate):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsFrameRate):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsFacingMode):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsFacingMode):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsVolume):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsVolume):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsSampleRate):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsSampleRate):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsSampleSize):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsSampleSize):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsEchoCancellation):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsEchoCancellation):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsDeviceId):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsDeviceId):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsGroupId):
(WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsGroupId):

* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::RealtimeMediaSourceCenterMac): Initialize supported constraints.
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:

* platform/mock/MockRealtimeMediaSource.cpp: Delete some dead code.

* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::MockRealtimeMediaSourceCenter): Initialize supported constraints.
* platform/mock/MockRealtimeMediaSourceCenter.h:

LayoutTests:

* fast/mediastream/MediaDevices-getSupportedConstraints-expected.txt: Added.
* fast/mediastream/MediaDevices-getSupportedConstraints.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</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="#trunkSourceWebCoreModulesmediastreamMediaDevicescpp">trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaDevicesh">trunk/Source/WebCore/Modules/mediastream/MediaDevices.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaDevicesidl">trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl</a></li>
<li><a href="#trunkSourceWebCorePlatformGTKcmake">trunk/Source/WebCore/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamRealtimeMediaSourceCenterh">trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreammacRealtimeMediaSourceCenterMaccpp">trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreammacRealtimeMediaSourceCenterMach">trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmockMockRealtimeMediaSourcecpp">trunk/Source/WebCore/platform/mock/MockRealtimeMediaSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmockMockRealtimeMediaSourceCentercpp">trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmockMockRealtimeMediaSourceCenterh">trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastmediastreamMediaDevicesgetSupportedConstraintsexpectedtxt">trunk/LayoutTests/fast/mediastream/MediaDevices-getSupportedConstraints-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediastreamMediaDevicesgetSupportedConstraintshtml">trunk/LayoutTests/fast/mediastream/MediaDevices-getSupportedConstraints.html</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaTrackSupportedConstraintsh">trunk/Source/WebCore/Modules/mediastream/MediaTrackSupportedConstraints.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaTrackSupportedConstraintsidl">trunk/Source/WebCore/Modules/mediastream/MediaTrackSupportedConstraints.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMediaTrackSupportedConstraintsCustomcpp">trunk/Source/WebCore/bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamRealtimeMediaSourceSupportedConstraintsh">trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceSupportedConstraints.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/LayoutTests/ChangeLog        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-11-18  Eric Carlson  &lt;eric.carlson@apple.com&gt;
+
+        MediaStream: Implement MediaDevices.getSupportedConstraints
+        https://bugs.webkit.org/show_bug.cgi?id=151394
+
+        Reviewed by Brent Fulgham.
+
+        * fast/mediastream/MediaDevices-getSupportedConstraints-expected.txt: Added.
+        * fast/mediastream/MediaDevices-getSupportedConstraints.html: Added.
+
</ins><span class="cx"> 2015-11-18  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Client Blocked Resource Requests causes Crash under InspectorPageAgent::cachedResource
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediastreamMediaDevicesgetSupportedConstraintsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/mediastream/MediaDevices-getSupportedConstraints-expected.txt (0 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediastream/MediaDevices-getSupportedConstraints-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/mediastream/MediaDevices-getSupportedConstraints-expected.txt        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+Tests MediaDevices.getSupportedConstraints()
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS navigator.mediaDevices is an instance of Object
+PASS navigator.mediaDevices.getSupportedConstraints is an instance of Function
+
+supportedConstraints = navigator.mediaDevices.getSupportedConstraints()
+
+PASS supportedConstraints.width is true
+PASS supportedConstraints.height is true
+PASS supportedConstraints.aspectRatio is true
+PASS supportedConstraints.frameRate is true
+PASS supportedConstraints.facingMode is true
+PASS supportedConstraints.volume is true
+PASS supportedConstraints.deviceId is true
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmediastreamMediaDevicesgetSupportedConstraintshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/mediastream/MediaDevices-getSupportedConstraints.html (0 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediastream/MediaDevices-getSupportedConstraints.html                                (rev 0)
+++ trunk/LayoutTests/fast/mediastream/MediaDevices-getSupportedConstraints.html        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+        &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+        &lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+        &lt;script&gt;
+            var supportedConstraints;
+
+            description(&quot;Tests MediaDevices.getSupportedConstraints()&quot;);
+            window.jsTestIsAsync = true;
+
+            shouldBeType(&quot;navigator.mediaDevices&quot;, &quot;Object&quot;);
+            shouldBeType(&quot;navigator.mediaDevices.getSupportedConstraints&quot;, &quot;Function&quot;);
+
+            debug(&quot;&quot;);
+            evalAndLog(&quot;supportedConstraints = navigator.mediaDevices.getSupportedConstraints()&quot;);
+            debug(&quot;&quot;);
+            for (var constraint in supportedConstraints)
+                shouldBeTrue(`supportedConstraints.${constraint}`);
+            debug(&quot;&quot;);
+
+
+            finishJSTest();
+
+            window.successfullyParsed = true;
+        &lt;/script&gt;
+        &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -238,6 +238,7 @@
</span><span class="cx">     Modules/mediastream/MediaTrackConstraint.idl
</span><span class="cx">     Modules/mediastream/MediaTrackConstraintSet.idl
</span><span class="cx">     Modules/mediastream/MediaTrackConstraints.idl
</span><ins>+    Modules/mediastream/MediaTrackSupportedConstraints.idl
</ins><span class="cx">     Modules/mediastream/NavigatorMediaDevices.idl
</span><span class="cx">     Modules/mediastream/NavigatorUserMedia.idl
</span><span class="cx">     Modules/mediastream/NavigatorUserMediaError.idl
</span><span class="lines">@@ -1205,6 +1206,7 @@
</span><span class="cx">     bindings/js/JSMainThreadExecState.cpp
</span><span class="cx">     bindings/js/JSMediaSourceStatesCustom.cpp
</span><span class="cx">     bindings/js/JSMediaStreamCapabilitiesCustom.cpp
</span><ins>+    bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp
</ins><span class="cx">     bindings/js/JSMessageChannelCustom.cpp
</span><span class="cx">     bindings/js/JSMessageEventCustom.cpp
</span><span class="cx">     bindings/js/JSMessagePortCustom.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/ChangeLog        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -1,3 +1,84 @@
</span><ins>+2015-11-18  Eric Carlson  &lt;eric.carlson@apple.com&gt;
+
+        MediaStream: Implement MediaDevices.getSupportedConstraints
+        https://bugs.webkit.org/show_bug.cgi?id=151394
+
+        Reviewed by Brent Fulgham.
+
+        Test: fast/mediastream/MediaDevices-getSupportedConstraints.html
+
+        * CMakeLists.txt: Add MediaTrackSupportedConstraints and JSMediaTrackSupportedConstraintsCustom.
+
+        * DerivedSources.make: Ditto.
+
+        * Modules/mediastream/MediaDevices.cpp:
+        (WebCore::MediaDevices::getSupportedConstraints): New.
+        * Modules/mediastream/MediaDevices.h:
+        * Modules/mediastream/MediaDevices.idl:
+
+        * Modules/mediastream/MediaTrackSupportedConstraints.h: Added. Wrapper around a 
+          RealtimeMediaSourceSupportedConstraints.
+        (WebCore::MediaTrackSupportedConstraints::create):
+        (WebCore::MediaTrackSupportedConstraints::supportsWidth):
+        (WebCore::MediaTrackSupportedConstraints::supportsHeight):
+        (WebCore::MediaTrackSupportedConstraints::supportsAspectRatio):
+        (WebCore::MediaTrackSupportedConstraints::supportsFrameRate):
+        (WebCore::MediaTrackSupportedConstraints::supportsFacingMode):
+        (WebCore::MediaTrackSupportedConstraints::supportsVolume):
+        (WebCore::MediaTrackSupportedConstraints::supportsSampleRate):
+        (WebCore::MediaTrackSupportedConstraints::supportsSampleSize):
+        (WebCore::MediaTrackSupportedConstraints::supportsEchoCancellation):
+        (WebCore::MediaTrackSupportedConstraints::supportsDeviceId):
+        (WebCore::MediaTrackSupportedConstraints::supportsGroupId):
+        (WebCore::MediaTrackSupportedConstraints::MediaTrackSupportedConstraints):
+        * Modules/mediastream/MediaTrackSupportedConstraints.idl: Added.
+
+        * WebCore.xcodeproj/project.pbxproj: Add JSMediaTrackSupportedConstraintsCustom.cpp, 
+          RealtimeMediaSourceSupportedConstraints.h, and MediaTrackSupportedConstraints.*.
+
+        A MediaTrackSupportedConstraints only contains the properties supported by the currently
+        available capture devices, so implement getOwnPropertySlot and getOwnPropertyNames so
+        we don't have to declare any attributes in the idl file.
+        * bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp: Added.
+        (WebCore::JSMediaTrackSupportedConstraints::getOwnPropertySlotDelegate):
+        (WebCore::JSMediaTrackSupportedConstraints::getOwnPropertyNames):
+
+        * platform/mediastream/RealtimeMediaSourceCenter.h:
+        * platform/mediastream/RealtimeMediaSourceSupportedConstraints.h: Added.
+        (WebCore::RealtimeMediaSourceSupportedConstraints::RealtimeMediaSourceSupportedConstraints):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsWidth):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsWidth):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsHeight):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsHeight):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsAspectRatio):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsAspectRatio):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsFrameRate):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsFrameRate):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsFacingMode):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsFacingMode):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsVolume):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsVolume):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsSampleRate):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsSampleRate):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsSampleSize):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsSampleSize):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsEchoCancellation):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsEchoCancellation):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsDeviceId):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsDeviceId):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::supportsGroupId):
+        (WebCore::RealtimeMediaSourceSupportedConstraints::setSupportsGroupId):
+
+        * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
+        (WebCore::RealtimeMediaSourceCenterMac::RealtimeMediaSourceCenterMac): Initialize supported constraints.
+        * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
+
+        * platform/mock/MockRealtimeMediaSource.cpp: Delete some dead code.
+
+        * platform/mock/MockRealtimeMediaSourceCenter.cpp:
+        (WebCore::MockRealtimeMediaSourceCenter::MockRealtimeMediaSourceCenter): Initialize supported constraints.
+        * platform/mock/MockRealtimeMediaSourceCenter.h:
+
</ins><span class="cx"> 2015-11-18  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Progress towards implementing Downloads with NETWORK_SESSION
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/DerivedSources.make        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -134,6 +134,7 @@
</span><span class="cx">     $(WebCore)/Modules/mediastream/MediaTrackConstraint.idl \
</span><span class="cx">     $(WebCore)/Modules/mediastream/MediaTrackConstraints.idl \
</span><span class="cx">     $(WebCore)/Modules/mediastream/MediaTrackConstraintSet.idl \
</span><ins>+    $(WebCore)/Modules/mediastream/MediaTrackSupportedConstraints.idl \
</ins><span class="cx">     $(WebCore)/Modules/mediastream/NavigatorMediaDevices.idl \
</span><span class="cx">     $(WebCore)/Modules/mediastream/NavigatorUserMedia.idl \
</span><span class="cx">     $(WebCore)/Modules/mediastream/NavigatorUserMediaError.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaDevicescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -37,6 +37,8 @@
</span><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;MediaDevicesRequest.h&quot;
</span><span class="cx"> #include &quot;MediaStream.h&quot;
</span><ins>+#include &quot;MediaTrackSupportedConstraints.h&quot;
+#include &quot;RealtimeMediaSourceCenter.h&quot;
</ins><span class="cx"> #include &quot;UserMediaController.h&quot;
</span><span class="cx"> #include &quot;UserMediaRequest.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -73,6 +75,11 @@
</span><span class="cx">         request-&gt;start();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+RefPtr&lt;MediaTrackSupportedConstraints&gt; MediaDevices::getSupportedConstraints()
+{
+    return MediaTrackSupportedConstraints::create(RealtimeMediaSourceCenter::singleton().supportedConstraints());
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(MEDIA_STREAM)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaDevicesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.h (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.h        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.h        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> class Dictionary;
</span><span class="cx"> class Document;
</span><span class="cx"> class MediaStream;
</span><ins>+class MediaTrackSupportedConstraints;
</ins><span class="cx"> class NavigatorUserMediaError;
</span><span class="cx"> 
</span><span class="cx"> typedef int ExceptionCode;
</span><span class="lines">@@ -62,6 +63,7 @@
</span><span class="cx"> 
</span><span class="cx">     void getUserMedia(const Dictionary&amp;, Promise&amp;&amp;, ExceptionCode&amp;) const;
</span><span class="cx">     void enumerateDevices(EnumerateDevicesPromise&amp;&amp;, ExceptionCode&amp;) const;
</span><ins>+    RefPtr&lt;MediaTrackSupportedConstraints&gt; getSupportedConstraints();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     explicit MediaDevices(ScriptExecutionContext*);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaDevicesidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -32,6 +32,8 @@
</span><span class="cx">     NoInterfaceObject,
</span><span class="cx">     Conditional=MEDIA_STREAM
</span><span class="cx"> ] interface MediaDevices {
</span><ins>+    MediaTrackSupportedConstraints getSupportedConstraints();
+
</ins><span class="cx">     [JSBuiltin] Promise getUserMedia(Dictionary options);
</span><span class="cx">     [RaisesException] Promise enumerateDevices();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaTrackSupportedConstraintsh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediastream/MediaTrackSupportedConstraints.h (0 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaTrackSupportedConstraints.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/MediaTrackSupportedConstraints.h        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -0,0 +1,74 @@
</span><ins>+/*
+ * Copyright (C) 2015 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.
+ * 3. Neither the name of Ericsson nor the names of its contributors
+ *    may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; 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 THE COPYRIGHT
+ * OWNER OR 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.
+ */
+
+#ifndef MediaTrackSupportedConstraints_h
+#define MediaTrackSupportedConstraints_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include &quot;RealtimeMediaSourceSupportedConstraints.h&quot;
+#include &quot;ScriptWrappable.h&quot;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebCore {
+
+class MediaTrackSupportedConstraints : public RefCounted&lt;MediaTrackSupportedConstraints&gt;, public ScriptWrappable {
+public:
+    static Ref&lt;MediaTrackSupportedConstraints&gt; create(const RealtimeMediaSourceSupportedConstraints&amp; supportedConstraints)
+    {
+        return adoptRef(*new MediaTrackSupportedConstraints(supportedConstraints));
+    }
+
+    bool supportsWidth() const { return m_supportedConstraints.supportsWidth(); }
+    bool supportsHeight() const { return m_supportedConstraints.supportsHeight(); }
+    bool supportsAspectRatio() const { return m_supportedConstraints.supportsAspectRatio(); }
+    bool supportsFrameRate() const { return m_supportedConstraints.supportsFrameRate(); }
+    bool supportsFacingMode() const { return m_supportedConstraints.supportsFacingMode(); }
+    bool supportsVolume() const { return m_supportedConstraints.supportsVolume(); }
+    bool supportsSampleRate() const { return m_supportedConstraints.supportsSampleRate(); }
+    bool supportsSampleSize() const { return m_supportedConstraints.supportsSampleSize(); }
+    bool supportsEchoCancellation() const { return m_supportedConstraints.supportsEchoCancellation(); }
+    bool supportsDeviceId() const { return m_supportedConstraints.supportsDeviceId(); }
+    bool supportsGroupId() const { return m_supportedConstraints.supportsGroupId(); }
+
+private:
+    explicit MediaTrackSupportedConstraints(const RealtimeMediaSourceSupportedConstraints&amp; supportedConstraints)
+        : m_supportedConstraints(supportedConstraints)
+    {
+    }
+
+    RealtimeMediaSourceSupportedConstraints m_supportedConstraints;
+};
+
+} // namespace WebCore
+
+#endif // MediaTrackSupportedConstraints_h
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaTrackSupportedConstraintsidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediastream/MediaTrackSupportedConstraints.idl (0 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaTrackSupportedConstraints.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/MediaTrackSupportedConstraints.idl        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+* Copyright (C) 2015 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.
+* 3. Neither the name of Ericsson nor the names of its contributors
+*    may be used to endorse or promote products derived from this
+*    software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* &quot;AS IS&quot; 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 THE COPYRIGHT
+* OWNER OR 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.
+*/
+
+[
+    Conditional=MEDIA_STREAM,
+    NoInterfaceObject,
+    ImplementationLacksVTable,
+    JSCustomGetOwnPropertySlotAndDescriptor,
+    CustomEnumerateProperty,
+] interface MediaTrackSupportedConstraints {
+};
+
</ins></span></pre></div>
<a id="trunkSourceWebCorePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformGTK.cmake (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformGTK.cmake        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/PlatformGTK.cmake        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -684,6 +684,7 @@
</span><span class="cx"> 
</span><span class="cx">     Modules/mediastream/MediaDevices.idl
</span><span class="cx">     Modules/mediastream/NavigatorMediaDevices.idl
</span><ins>+    Modules/mediastream/MediaTrackSupportedConstraints.idl
</ins><span class="cx"> 
</span><span class="cx">     Modules/quota/StorageInfo.idl
</span><span class="cx">     Modules/quota/StorageQuota.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -130,6 +130,7 @@
</span><span class="cx">                 071E49701AD5AB5E008A50B4 /* MediaPlaybackTargetMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 071E496F1AD5AB5E008A50B4 /* MediaPlaybackTargetMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0720B0A014D3323500642955 /* GenericEventQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0720B09E14D3323500642955 /* GenericEventQueue.cpp */; };
</span><span class="cx">                 0720B0A114D3323500642955 /* GenericEventQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0720B09F14D3323500642955 /* GenericEventQueue.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                072560FB1BFC2482004F9359 /* JSMediaTrackSupportedConstraintsCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07C1C0E61BFB90A700BD2256 /* JSMediaTrackSupportedConstraintsCustom.cpp */; settings = {ASSET_TAGS = (); }; };
</ins><span class="cx">                 07277E4C17D018CC0015534D /* JSMediaStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07277E4017D018CC0015534D /* JSMediaStream.cpp */; };
</span><span class="cx">                 07277E4D17D018CC0015534D /* JSMediaStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 07277E4117D018CC0015534D /* JSMediaStream.h */; };
</span><span class="cx">                 07277E4E17D018CC0015534D /* JSMediaStreamAudioDestinationNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07277E4217D018CC0015534D /* JSMediaStreamAudioDestinationNode.cpp */; };
</span><span class="lines">@@ -211,6 +212,8 @@
</span><span class="cx">                 07846342145B151A00A58DF1 /* JSTrackEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07846340145B151A00A58DF1 /* JSTrackEvent.cpp */; };
</span><span class="cx">                 07846343145B151A00A58DF1 /* JSTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07846341145B151A00A58DF1 /* JSTrackEvent.h */; };
</span><span class="cx">                 07846385145B1B8E00A58DF1 /* JSTrackCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 07846384145B1B8E00A58DF1 /* JSTrackCustom.h */; };
</span><ins>+                0787C4691BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0787C4671BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.cpp */; settings = {ASSET_TAGS = (); }; };
+                0787C46A1BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 0787C4681BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h */; settings = {ASSET_TAGS = (); }; };
</ins><span class="cx">                 078E08FE17D14CEE00420AA1 /* MediaConstraintsImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B4A17CEC32700848E51 /* MediaConstraintsImpl.cpp */; };
</span><span class="cx">                 078E08FF17D14CEE00420AA1 /* MediaStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B4C17CEC32700848E51 /* MediaStream.cpp */; };
</span><span class="cx">                 078E090017D14CEE00420AA1 /* MediaStreamEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221B4F17CEC32700848E51 /* MediaStreamEvent.cpp */; };
</span><span class="lines">@@ -314,6 +317,8 @@
</span><span class="cx">                 07B5A2DC1464320A00A81ECE /* JSTextTrackList.h in Headers */ = {isa = PBXBuildFile; fileRef = 07B5A2DA1464320A00A81ECE /* JSTextTrackList.h */; };
</span><span class="cx">                 07B5A30D14687D7100A81ECE /* JSTextTrackListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07B5A30C14687D7100A81ECE /* JSTextTrackListCustom.cpp */; };
</span><span class="cx">                 07BDD6EC1469B4C2009C9F85 /* JSTrackEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07B5A30A14687B8400A81ECE /* JSTrackEventCustom.cpp */; };
</span><ins>+                07C1C0E21BFB600100BD2256 /* MediaTrackSupportedConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 07C1C0E01BFB600100BD2256 /* MediaTrackSupportedConstraints.h */; settings = {ASSET_TAGS = (); }; };
+                07C1C0E51BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 07C1C0E41BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 07C59B6817F784BA000FBCBB /* MediaSourceStates.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07C59B6517F784BA000FBCBB /* MediaSourceStates.cpp */; };
</span><span class="cx">                 07C59B6917F784BA000FBCBB /* MediaSourceStates.h in Headers */ = {isa = PBXBuildFile; fileRef = 07C59B6617F784BA000FBCBB /* MediaSourceStates.h */; };
</span><span class="cx">                 07C59B6E17F794F6000FBCBB /* JSMediaSourceStatesCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07C59B6D17F794F6000FBCBB /* JSMediaSourceStatesCustom.cpp */; };
</span><span class="lines">@@ -7540,6 +7545,8 @@
</span><span class="cx">                 07846340145B151A00A58DF1 /* JSTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTrackEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 07846341145B151A00A58DF1 /* JSTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTrackEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 07846384145B1B8E00A58DF1 /* JSTrackCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTrackCustom.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0787C4671BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaTrackSupportedConstraints.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0787C4681BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaTrackSupportedConstraints.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 078E094817D1709600420AA1 /* MediaStreamAudioDestinationNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaStreamAudioDestinationNode.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 078E094917D1709600420AA1 /* MediaStreamAudioDestinationNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamAudioDestinationNode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 078E094A17D1709600420AA1 /* MediaStreamAudioDestinationNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaStreamAudioDestinationNode.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -7595,6 +7602,10 @@
</span><span class="cx">                 07B5A3061468537100A81ECE /* TextTrackList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TextTrackList.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 07B5A30A14687B8400A81ECE /* JSTrackEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTrackEventCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 07B5A30C14687D7100A81ECE /* JSTextTrackListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackListCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                07C1C0E01BFB600100BD2256 /* MediaTrackSupportedConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTrackSupportedConstraints.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                07C1C0E11BFB600100BD2256 /* MediaTrackSupportedConstraints.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaTrackSupportedConstraints.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                07C1C0E41BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RealtimeMediaSourceSupportedConstraints.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                07C1C0E61BFB90A700BD2256 /* JSMediaTrackSupportedConstraintsCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaTrackSupportedConstraintsCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 07C59B6517F784BA000FBCBB /* MediaSourceStates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSourceStates.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 07C59B6617F784BA000FBCBB /* MediaSourceStates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSourceStates.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 07C59B6717F784BA000FBCBB /* MediaSourceStates.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaSourceStates.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15173,6 +15184,8 @@
</span><span class="cx">                                 0705853717FE044F005F2BCB /* MediaTrackConstraintSet.cpp */,
</span><span class="cx">                                 0705852617FDE02B005F2BCB /* MediaTrackConstraintSet.h */,
</span><span class="cx">                                 0705852717FDE02B005F2BCB /* MediaTrackConstraintSet.idl */,
</span><ins>+                                07C1C0E01BFB600100BD2256 /* MediaTrackSupportedConstraints.h */,
+                                07C1C0E11BFB600100BD2256 /* MediaTrackSupportedConstraints.idl */,
</ins><span class="cx">                                 5EA725CA1ACABCB500EAD17B /* NavigatorMediaDevices.cpp */,
</span><span class="cx">                                 5EA725CB1ACABCB500EAD17B /* NavigatorMediaDevices.h */,
</span><span class="cx">                                 5EA725CC1ACABCB500EAD17B /* NavigatorMediaDevices.idl */,
</span><span class="lines">@@ -15256,6 +15269,7 @@
</span><span class="cx">                                 07221B9D17CF0AD400848E51 /* MediaStreamPrivate.h */,
</span><span class="cx">                                 07FFDE66181AED420072D409 /* MediaStreamTrackPrivate.cpp */,
</span><span class="cx">                                 07FFDE67181AED420072D409 /* MediaStreamTrackPrivate.h */,
</span><ins>+                                07C1C0E41BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h */,
</ins><span class="cx">                                 076306E217E22A43005A7C4E /* MediaStreamTrackSourcesRequestClient.h */,
</span><span class="cx">                                 4A4F656B1AA997F100E38CDD /* RealtimeMediaSource.cpp */,
</span><span class="cx">                                 4A4F656C1AA997F100E38CDD /* RealtimeMediaSource.h */,
</span><span class="lines">@@ -15381,6 +15395,8 @@
</span><span class="cx">                                 0705852E17FDE6D9005F2BCB /* JSMediaTrackConstraints.h */,
</span><span class="cx">                                 0705852F17FDE6D9005F2BCB /* JSMediaTrackConstraintSet.cpp */,
</span><span class="cx">                                 0705853017FDE6D9005F2BCB /* JSMediaTrackConstraintSet.h */,
</span><ins>+                                0787C4671BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.cpp */,
+                                0787C4681BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h */,
</ins><span class="cx">                                 073BE33E17D17E01002BD431 /* JSNavigatorUserMedia.cpp */,
</span><span class="cx">                                 073BE33F17D17E01002BD431 /* JSNavigatorUserMedia.h */,
</span><span class="cx">                                 073BE34217D17E7A002BD431 /* JSNavigatorUserMediaError.cpp */,
</span><span class="lines">@@ -22134,6 +22150,7 @@
</span><span class="cx">                                 07C59B6D17F794F6000FBCBB /* JSMediaSourceStatesCustom.cpp */,
</span><span class="cx">                                 0705851617FB40E9005F2BCB /* JSMediaStreamCapabilitiesCustom.cpp */,
</span><span class="cx">                                 E1A5F99A0E7EAA2500AF85EA /* JSMessageChannelCustom.cpp */,
</span><ins>+                                07C1C0E61BFB90A700BD2256 /* JSMediaTrackSupportedConstraintsCustom.cpp */,
</ins><span class="cx">                                 410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */,
</span><span class="cx">                                 E1ADED460E76B8DD004A1A5E /* JSMessagePortCustom.cpp */,
</span><span class="cx">                                 41F584C6104652CB009CAA64 /* JSMessagePortCustom.h */,
</span><span class="lines">@@ -25669,6 +25686,7 @@
</span><span class="cx">                                 499B3ED7128CD31400E726C2 /* GraphicsLayerCA.h in Headers */,
</span><span class="cx">                                 0F580B0E0F12A2690051D689 /* GraphicsLayerClient.h in Headers */,
</span><span class="cx">                                 1AC69593161A1E53003732CB /* GraphicsLayerFactory.h in Headers */,
</span><ins>+                                0787C46A1BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.h in Headers */,
</ins><span class="cx">                                 0FA24D7A162DF91900A3F4C0 /* GraphicsLayerUpdater.h in Headers */,
</span><span class="cx">                                 CEC337AF1A46086D009B8523 /* GraphicsServicesSPI.h in Headers */,
</span><span class="cx">                                 B2A015AB0AF6CD53006BCE0E /* GraphicsTypes.h in Headers */,
</span><span class="lines">@@ -26761,6 +26779,7 @@
</span><span class="cx">                                 0705852117FDC140005F2BCB /* MediaTrackConstraint.h in Headers */,
</span><span class="cx">                                 0705852417FDC140005F2BCB /* MediaTrackConstraints.h in Headers */,
</span><span class="cx">                                 0705852917FDE02C005F2BCB /* MediaTrackConstraintSet.h in Headers */,
</span><ins>+                                07C1C0E21BFB600100BD2256 /* MediaTrackSupportedConstraints.h in Headers */,
</ins><span class="cx">                                 99C7CCB318C663E40032E413 /* MemoizedDOMResult.h in Headers */,
</span><span class="cx">                                 51E1BAC31BD8064E0055D81F /* MemoryBackingStoreTransaction.h in Headers */,
</span><span class="cx">                                 BCB16C180979C3BD00467741 /* MemoryCache.h in Headers */,
</span><span class="lines">@@ -27063,6 +27082,7 @@
</span><span class="cx">                                 4A0FFAA21AAF5EA20062803B /* RealtimeMediaSourceCenter.h in Headers */,
</span><span class="cx">                                 4A0FFAA61AAF5EF60062803B /* RealtimeMediaSourceCenterMac.h in Headers */,
</span><span class="cx">                                 4A4F65741AA997F100E38CDD /* RealtimeMediaSourceStates.h in Headers */,
</span><ins>+                                07C1C0E51BFB60ED00BD2256 /* RealtimeMediaSourceSupportedConstraints.h in Headers */,
</ins><span class="cx">                                 BC4368E80C226E32005EFB5F /* Rect.h in Headers */,
</span><span class="cx">                                 FD45A958175D414C00C21EC8 /* RectangleShape.h in Headers */,
</span><span class="cx">                                 9831AE4A154225C900FE2644 /* ReferrerPolicy.h in Headers */,
</span><span class="lines">@@ -30596,7 +30616,6 @@
</span><span class="cx">                                 A80A38FE0E50CC8200A25EBC /* PatternCG.cpp in Sources */,
</span><span class="cx">                                 B27535640B053814002CE64F /* PDFDocumentImage.cpp in Sources */,
</span><span class="cx">                                 2D6E468417D660F500ECF8BB /* PDFDocumentImageMac.mm in Sources */,
</span><del>-                                5E2C43501BCEE2F60001E2BC /* PeerConnectionBackend.cpp in Sources */,
</del><span class="cx">                                 8A7CC97012076F8A001D4588 /* PendingScript.cpp in Sources */,
</span><span class="cx">                                 E526AF3F1727F8F200E41781 /* Performance.cpp in Sources */,
</span><span class="cx">                                 86BE340315058CB200CE0FD8 /* PerformanceEntryList.cpp in Sources */,
</span><span class="lines">@@ -31037,6 +31056,7 @@
</span><span class="cx">                                 BC5EB67D0E81D42000B25965 /* StyleBoxData.cpp in Sources */,
</span><span class="cx">                                 8386A97019F61E4F00E1EC4A /* StyleBuilder.cpp in Sources */,
</span><span class="cx">                                 BCEF447A0E6747D0001C1287 /* StyleCachedImage.cpp in Sources */,
</span><ins>+                                0787C4691BFBDF6F006DCD7F /* JSMediaTrackSupportedConstraints.cpp in Sources */,
</ins><span class="cx">                                 9393E604151A9A1800066F06 /* StyleCachedImageSet.cpp in Sources */,
</span><span class="cx">                                 A8C4A7FE09D563270003AC8D /* StyledElement.cpp in Sources */,
</span><span class="cx">                                 BC5EB8B80E8201BD00B25965 /* StyleDeprecatedFlexibleBoxData.cpp in Sources */,
</span><span class="lines">@@ -31359,6 +31379,7 @@
</span><span class="cx">                                 FD1762DF176686D900D836A8 /* UpSampler.cpp in Sources */,
</span><span class="cx">                                 6593923709AE4346002C531F /* URL.cpp in Sources */,
</span><span class="cx">                                 1A98956B0AA78F80005EF5EF /* URLCF.cpp in Sources */,
</span><ins>+                                072560FB1BFC2482004F9359 /* JSMediaTrackSupportedConstraintsCustom.cpp in Sources */,
</ins><span class="cx">                                 267726041A5DF6F2003C24DD /* URLFilterParser.cpp in Sources */,
</span><span class="cx">                                 F55B3DDD1251F12D003EF269 /* URLInputType.cpp in Sources */,
</span><span class="cx">                                 6593923A09AE435C002C531F /* URLMac.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMediaTrackSupportedConstraintsCustomcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp (0 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+/*
+ * Copyright (C) 2013 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. ``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
+ * 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 &quot;config.h&quot;
+#include &quot;JSMediaTrackSupportedConstraints.h&quot;
+
+#if ENABLE(MEDIA_STREAM)
+
+#include &quot;JSDOMBinding.h&quot;
+#include &quot;JSDOMWrapper.h&quot;
+#include &quot;RealtimeMediaSourceCenter.h&quot;
+
+using namespace JSC;
+
+namespace WebCore {
+
+#define FOR_EACH_CONSTRAINT_PROPERTY(macro) \
+    macro(width, Width) \
+    macro(height, Height) \
+    macro(aspectRatio, AspectRatio) \
+    macro(frameRate, FrameRate) \
+    macro(facingMode, FacingMode) \
+    macro(volume, Volume) \
+    macro(sampleRate, SampleRate) \
+    macro(sampleSize, SampleSize) \
+    macro(echoCancellation, EchoCancellation) \
+    macro(deviceId, DeviceId) \
+    macro(groupId, GroupId)
+
+bool JSMediaTrackSupportedConstraints::getOwnPropertySlotDelegate(ExecState*, PropertyName propertyName, PropertySlot&amp; slot)
+{
+#define CHECK_PROPERTY(lowerName, capitalName) \
+    if (AtomicString(#lowerName, AtomicString::ConstructFromLiteral) == propertyNameToAtomicString(propertyName)) { \
+        slot.setValue(this, DontDelete | ReadOnly, jsBoolean(wrapped().supports##capitalName())); \
+        return true; \
+    }
+
+    FOR_EACH_CONSTRAINT_PROPERTY(CHECK_PROPERTY)
+
+    return false;
+}
+
+void JSMediaTrackSupportedConstraints::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray&amp; propertyNames, EnumerationMode mode)
+{
+#define MAYBE_ADD_PROPERTY(lowerName, capitalName) \
+    if (supportedConstraints.supports##capitalName()) \
+        propertyNames.add(Identifier::fromString(state, AtomicString(#lowerName, AtomicString::ConstructFromLiteral)));
+
+    static const RealtimeMediaSourceSupportedConstraints&amp; supportedConstraints = RealtimeMediaSourceCenter::singleton().supportedConstraints();
+
+    FOR_EACH_CONSTRAINT_PROPERTY(MAYBE_ADD_PROPERTY)
+
+    auto* thisObject = jsCast&lt;JSMediaTrackSupportedConstraints*&gt;(object);
+    Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamRealtimeMediaSourceCenterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;RealtimeMediaSource.h&quot;
</span><ins>+#include &quot;RealtimeMediaSourceSupportedConstraints.h&quot;
</ins><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -42,8 +43,9 @@
</span><span class="cx"> 
</span><span class="cx"> class MediaConstraints;
</span><span class="cx"> class MediaStreamCreationClient;
</span><ins>+class MediaStreamTrackSourcesRequestClient;
</ins><span class="cx"> class RealtimeMediaSourceStates;
</span><del>-class MediaStreamTrackSourcesRequestClient;
</del><ins>+class RealtimeMediaSourceSupportedConstraints;
</ins><span class="cx"> class TrackSourceInfo;
</span><span class="cx"> 
</span><span class="cx"> class RealtimeMediaSourceCenter {
</span><span class="lines">@@ -63,10 +65,13 @@
</span><span class="cx">     
</span><span class="cx">     virtual RefPtr&lt;TrackSourceInfo&gt; sourceWithUID(const String&amp;, RealtimeMediaSource::Type, MediaConstraints*) = 0;
</span><span class="cx"> 
</span><ins>+    virtual const RealtimeMediaSourceSupportedConstraints&amp; supportedConstraints() { return m_supportedConstraints; }
+
</ins><span class="cx"> protected:
</span><span class="cx">     RealtimeMediaSourceCenter();
</span><span class="cx"> 
</span><span class="cx">     static RealtimeMediaSourceCenter&amp; platformCenter();
</span><ins>+    RealtimeMediaSourceSupportedConstraints m_supportedConstraints;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamRealtimeMediaSourceSupportedConstraintsh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceSupportedConstraints.h (0 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceSupportedConstraints.h                                (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceSupportedConstraints.h        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -0,0 +1,95 @@
</span><ins>+/*
+ * Copyright (C) 2015 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.
+ * 3. Neither the name of Google Inc. nor the names of its contributors
+ *    may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; 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 THE COPYRIGHT
+ * OWNER OR 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.
+ */
+
+#ifndef RealtimeMediaSourceSupportedConstraints_h
+#define RealtimeMediaSourceSupportedConstraints_h
+
+#if ENABLE(MEDIA_STREAM)
+
+namespace WebCore {
+
+class RealtimeMediaSourceSupportedConstraints {
+public:
+    RealtimeMediaSourceSupportedConstraints()
+    {
+    }
+
+    bool supportsWidth() const { return m_supportsWidth; }
+    void setSupportsWidth(bool value) { m_supportsWidth = value; }
+
+    bool supportsHeight() const { return m_supportsHeight; }
+    void setSupportsHeight(bool value) { m_supportsHeight = value; }
+
+    bool supportsAspectRatio() const { return m_supportsAspectRatio; }
+    void setSupportsAspectRatio(bool value) { m_supportsAspectRatio = value; }
+
+    bool supportsFrameRate() const { return m_supportsFrameRate; }
+    void setSupportsFrameRate(bool value) { m_supportsFrameRate = value; }
+
+    bool supportsFacingMode() const { return m_supportsFacingMode; }
+    void setSupportsFacingMode(bool value) { m_supportsFacingMode = value; }
+
+    bool supportsVolume() const { return m_supportsVolume; }
+    void setSupportsVolume(bool value) { m_supportsVolume = value; }
+
+    bool supportsSampleRate() const { return m_supportsSampleRate; }
+    void setSupportsSampleRate(bool value) { m_supportsSampleRate = value; }
+
+    bool supportsSampleSize() const { return m_supportsSampleSize; }
+    void setSupportsSampleSize(bool value) { m_supportsSampleSize = value; }
+
+    bool supportsEchoCancellation() const { return m_supportsEchoCancellation; }
+    void setSupportsEchoCancellation(bool value) { m_supportsEchoCancellation = value; }
+
+    bool supportsDeviceId() const { return m_supportsDeviceId; }
+    void setSupportsDeviceId(bool value) { m_supportsDeviceId = value; }
+
+    bool supportsGroupId() const { return m_supportsGroupId; }
+    void setSupportsGroupId(bool value) { m_supportsGroupId = value; }
+
+private:
+    bool m_supportsWidth { false };
+    bool m_supportsHeight { false };
+    bool m_supportsAspectRatio { false };
+    bool m_supportsFrameRate { false };
+    bool m_supportsFacingMode { false };
+    bool m_supportsVolume { false };
+    bool m_supportsSampleRate { false };
+    bool m_supportsSampleSize { false };
+    bool m_supportsEchoCancellation { false };
+    bool m_supportsDeviceId { false };
+    bool m_supportsGroupId { false };
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // RealtimeMediaSourceSupportedConstraints_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreammacRealtimeMediaSourceCenterMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -50,6 +50,17 @@
</span><span class="cx"> 
</span><span class="cx"> RealtimeMediaSourceCenterMac::RealtimeMediaSourceCenterMac()
</span><span class="cx"> {
</span><ins>+    m_supportedConstraints.setSupportsWidth(true);
+    m_supportedConstraints.setSupportsHeight(true);
+    m_supportedConstraints.setSupportsAspectRatio(true);
+    m_supportedConstraints.setSupportsFrameRate(true);
+    m_supportedConstraints.setSupportsFacingMode(true);
+    m_supportedConstraints.setSupportsVolume(true);
+    m_supportedConstraints.setSupportsSampleRate(false);
+    m_supportedConstraints.setSupportsSampleSize(false);
+    m_supportedConstraints.setSupportsEchoCancellation(false);
+    m_supportedConstraints.setSupportsDeviceId(true);
+    m_supportedConstraints.setSupportsGroupId(true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RealtimeMediaSourceCenterMac::~RealtimeMediaSourceCenterMac()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreammacRealtimeMediaSourceCenterMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.h (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.h        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.h        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -43,6 +43,8 @@
</span><span class="cx"> class RealtimeMediaSourceCenterMac final : public RealtimeMediaSourceCenter {
</span><span class="cx"> public:
</span><span class="cx">     RealtimeMediaSourceCenterMac();
</span><ins>+
+private:
</ins><span class="cx">     ~RealtimeMediaSourceCenterMac();
</span><span class="cx"> 
</span><span class="cx">     void validateRequestConstraints(MediaStreamCreationClient*, RefPtr&lt;MediaConstraints&gt;&amp; audioConstraints, RefPtr&lt;MediaConstraints&gt;&amp; videoConstraints) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmockMockRealtimeMediaSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mock/MockRealtimeMediaSource.cpp (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mock/MockRealtimeMediaSource.cpp        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/platform/mock/MockRealtimeMediaSource.cpp        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -81,10 +81,6 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if 0
-
-#endif
-
</del><span class="cx"> MockRealtimeMediaSource::MockRealtimeMediaSource(const String&amp; id, RealtimeMediaSource::Type type, const String&amp; name)
</span><span class="cx">     : RealtimeMediaSource(id, type, name)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmockMockRealtimeMediaSourceCentercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -56,6 +56,17 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+MockRealtimeMediaSourceCenter::MockRealtimeMediaSourceCenter()
+{
+    m_supportedConstraints.setSupportsWidth(true);
+    m_supportedConstraints.setSupportsHeight(true);
+    m_supportedConstraints.setSupportsAspectRatio(true);
+    m_supportedConstraints.setSupportsFrameRate(true);
+    m_supportedConstraints.setSupportsFacingMode(true);
+    m_supportedConstraints.setSupportsVolume(true);
+    m_supportedConstraints.setSupportsDeviceId(true);
+}
+
</ins><span class="cx"> void MockRealtimeMediaSourceCenter::validateRequestConstraints(MediaStreamCreationClient* client, RefPtr&lt;MediaConstraints&gt;&amp; audioConstraints, RefPtr&lt;MediaConstraints&gt;&amp; videoConstraints)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(client);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmockMockRealtimeMediaSourceCenterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.h (192601 => 192602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.h        2015-11-19 01:17:14 UTC (rev 192601)
+++ trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.h        2015-11-19 01:24:02 UTC (rev 192602)
</span><span class="lines">@@ -38,14 +38,13 @@
</span><span class="cx">     WEBCORE_EXPORT static void registerMockRealtimeMediaSourceCenter();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    MockRealtimeMediaSourceCenter();
</ins><span class="cx"> 
</span><span class="cx">     void validateRequestConstraints(MediaStreamCreationClient*, RefPtr&lt;MediaConstraints&gt;&amp; audioConstraints, RefPtr&lt;MediaConstraints&gt;&amp; videoConstraints) override;
</span><span class="cx">     void createMediaStream(PassRefPtr&lt;MediaStreamCreationClient&gt;, PassRefPtr&lt;MediaConstraints&gt; audioConstraints, PassRefPtr&lt;MediaConstraints&gt; videoConstraints) override;
</span><span class="cx">     bool getMediaStreamTrackSources(PassRefPtr&lt;MediaStreamTrackSourcesRequestClient&gt;) override;
</span><span class="cx">     void createMediaStream(MediaStreamCreationClient*, const String&amp; audioDeviceID, const String&amp; videoDeviceID) override;
</span><span class="cx">     RefPtr&lt;TrackSourceInfo&gt; sourceWithUID(const String&amp;, RealtimeMediaSource::Type, MediaConstraints*) override;
</span><del>-
-    MockRealtimeMediaSourceCenter() { }
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>