<!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>[169648] 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/169648">169648</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-06-06 09:33:42 -0700 (Fri, 06 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[MediaStream] 'get' prefix is missing for capabilities and constraints.
https://bugs.webkit.org/show_bug.cgi?id=133573

Patch by Kiran &lt;kiran.guduru@samsung.com&gt; on 2014-06-06
Reviewed by Eric Carlson.

Source/WebCore:
Modified the existing MediaStreamTrack.html to test the changes.

As per the Media Capture and Streams spec method names constreaints and
capabilities should be prefixed by 'get'. So updated the method names.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::getConstraints):
(WebCore::MediaStreamTrack::getCapabilities):
(WebCore::MediaStreamTrack::constraints): Deleted.
(WebCore::MediaStreamTrack::capabilities): Deleted.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:

LayoutTests:
* fast/mediastream/MediaStreamTrack-expected.txt:
* fast/mediastream/MediaStreamTrack.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastmediastreamMediaStreamTrackexpectedtxt">trunk/LayoutTests/fast/mediastream/MediaStreamTrack-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmediastreamMediaStreamTrackhtml">trunk/LayoutTests/fast/mediastream/MediaStreamTrack.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamTrackcpp">trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamTrackh">trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamTrackidl">trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (169647 => 169648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-06-06 16:20:31 UTC (rev 169647)
+++ trunk/LayoutTests/ChangeLog        2014-06-06 16:33:42 UTC (rev 169648)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-06-06  Kiran  &lt;kiran.guduru@samsung.com&gt;
+
+        [MediaStream] 'get' prefix is missing for capabilities and constraints.
+        https://bugs.webkit.org/show_bug.cgi?id=133573
+
+        Reviewed by Eric Carlson.
+
+        * fast/mediastream/MediaStreamTrack-expected.txt:
+        * fast/mediastream/MediaStreamTrack.html:
+
</ins><span class="cx"> 2014-06-06  Mario Sanchez Prada  &lt;mario.prada@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Layout Test accessibility/table-fallback-roles-expose-element-attributes.html is failing
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediastreamMediaStreamTrackexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/mediastream/MediaStreamTrack-expected.txt (169647 => 169648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediastream/MediaStreamTrack-expected.txt        2014-06-06 16:20:31 UTC (rev 169647)
+++ trunk/LayoutTests/fast/mediastream/MediaStreamTrack-expected.txt        2014-06-06 16:33:42 UTC (rev 169648)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> 
</span><span class="cx"> videoTrack = mediaStream.getVideoTracks()[0]
</span><span class="cx"> PASS track.readyState is &quot;live&quot;
</span><del>-checking track.capabilities()
</del><ins>+checking track.getCapabilities()
</ins><span class="cx">   sourceId
</span><span class="cx">     0 : 239c24b0-2b15-11e3-8224-0800200c9a66
</span><span class="cx">   sourceType
</span><span class="lines">@@ -43,10 +43,11 @@
</span><span class="cx">   states.volume = undefined
</span><span class="cx">   states.sourceType = camera
</span><span class="cx">   states.sourceId = 239c24b0-2b15-11e3-8224-0800200c9a66
</span><ins>+PASS track.getConstraints(); did not throw exception.
</ins><span class="cx"> 
</span><span class="cx"> audioTrack = mediaStream.getAudioTracks()[0]
</span><span class="cx"> PASS track.readyState is &quot;live&quot;
</span><del>-checking track.capabilities()
</del><ins>+checking track.getCapabilities()
</ins><span class="cx">   sourceId
</span><span class="cx">     0 : 239c24b1-2b15-11e3-8224-0800200c9a66
</span><span class="cx">   volume
</span><span class="lines">@@ -64,10 +65,11 @@
</span><span class="cx">   states.volume = 50
</span><span class="cx">   states.sourceType = microphone
</span><span class="cx">   states.sourceId = 239c24b1-2b15-11e3-8224-0800200c9a66
</span><ins>+PASS track.getConstraints(); did not throw exception.
</ins><span class="cx"> 
</span><span class="cx"> videoTrack2 = videoTrack.clone()
</span><span class="cx"> PASS track.readyState is &quot;live&quot;
</span><del>-checking track.capabilities()
</del><ins>+checking track.getCapabilities()
</ins><span class="cx">   sourceId
</span><span class="cx">     0 : 239c24b0-2b15-11e3-8224-0800200c9a66
</span><span class="cx">   sourceType
</span><span class="lines">@@ -103,6 +105,7 @@
</span><span class="cx">   states.volume = undefined
</span><span class="cx">   states.sourceType = camera
</span><span class="cx">   states.sourceId = 239c24b0-2b15-11e3-8224-0800200c9a66
</span><ins>+PASS track.getConstraints(); did not throw exception.
</ins><span class="cx"> PASS videoTrack.id is not videoTrack2.id
</span><span class="cx"> PASS videoTrack.kind is videoTrack2.kind
</span><span class="cx"> PASS videoTrack.label is videoTrack2.label
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediastreamMediaStreamTrackhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/mediastream/MediaStreamTrack.html (169647 => 169648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediastream/MediaStreamTrack.html        2014-06-06 16:20:31 UTC (rev 169647)
+++ trunk/LayoutTests/fast/mediastream/MediaStreamTrack.html        2014-06-06 16:33:42 UTC (rev 169648)
</span><span class="lines">@@ -83,8 +83,8 @@
</span><span class="cx"> 
</span><span class="cx">             function checkCapabilities(track)
</span><span class="cx">             {
</span><del>-                debug(&quot;checking track.capabilities()&quot;);
-                capabilities = track.capabilities();
</del><ins>+                debug(&quot;checking track.getCapabilities()&quot;);
+                capabilities = track.getCapabilities();
</ins><span class="cx">                 logCapabilityList(&quot;sourceId&quot;, capabilities.sourceId);
</span><span class="cx">                 if (track.kind == &quot;video&quot;) {
</span><span class="cx">                     logCapabilityList(&quot;sourceType&quot;, capabilities.sourceType);
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">             function checkStates(track)
</span><span class="cx">             {
</span><span class="cx">                 debug(&quot;checking track.states()&quot;);
</span><del>-                capabilities = track.capabilities();
</del><ins>+                capabilities = track.getCapabilities();
</ins><span class="cx">                 states = track.states();
</span><span class="cx">                 shouldBe('states.sourceId', 'capabilities.sourceId[0]');
</span><span class="cx">                 if (track.kind == &quot;video&quot;)
</span><span class="lines">@@ -122,6 +122,7 @@
</span><span class="cx">                 shouldBeEqualToString('track.readyState', 'live');
</span><span class="cx">                 checkCapabilities(track);
</span><span class="cx">                 checkStates(track);
</span><ins>+                shouldNotThrow('track.getConstraints();');
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             function gotStream(stream)
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (169647 => 169648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-06-06 16:20:31 UTC (rev 169647)
+++ trunk/Source/WebCore/ChangeLog        2014-06-06 16:33:42 UTC (rev 169648)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2014-06-06  Kiran  &lt;kiran.guduru@samsung.com&gt;
+
+        [MediaStream] 'get' prefix is missing for capabilities and constraints.
+        https://bugs.webkit.org/show_bug.cgi?id=133573
+
+        Reviewed by Eric Carlson.
+
+        Modified the existing MediaStreamTrack.html to test the changes.
+
+        As per the Media Capture and Streams spec method names constreaints and
+        capabilities should be prefixed by 'get'. So updated the method names.
+
+        * Modules/mediastream/MediaStreamTrack.cpp:
+        (WebCore::MediaStreamTrack::getConstraints):
+        (WebCore::MediaStreamTrack::getCapabilities):
+        (WebCore::MediaStreamTrack::constraints): Deleted.
+        (WebCore::MediaStreamTrack::capabilities): Deleted.
+        * Modules/mediastream/MediaStreamTrack.h:
+        * Modules/mediastream/MediaStreamTrack.idl:
+
</ins><span class="cx"> 2014-06-05  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(169440): Repro crash when playing a video with captions
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamTrackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (169647 => 169648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp        2014-06-06 16:20:31 UTC (rev 169647)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp        2014-06-06 16:33:42 UTC (rev 169648)
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx">         ec = NOT_SUPPORTED_ERR;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;MediaTrackConstraints&gt; MediaStreamTrack::constraints() const
</del><ins>+RefPtr&lt;MediaTrackConstraints&gt; MediaStreamTrack::getConstraints() const
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: https://bugs.webkit.org/show_bug.cgi?id=122428
</span><span class="cx">     notImplemented();
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx">     return MediaSourceStates::create(m_privateTrack-&gt;states());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;MediaStreamCapabilities&gt; MediaStreamTrack::capabilities() const
</del><ins>+RefPtr&lt;MediaStreamCapabilities&gt; MediaStreamTrack::getCapabilities() const
</ins><span class="cx"> {
</span><span class="cx">     // The source may be shared by multiple tracks, so its states is not necessarily
</span><span class="cx">     // in sync with the track state. A track that is new or has ended always has a source
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamTrackh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h (169647 => 169648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h        2014-06-06 16:20:31 UTC (rev 169647)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h        2014-06-06 16:33:42 UTC (rev 169648)
</span><span class="lines">@@ -75,9 +75,9 @@
</span><span class="cx"> 
</span><span class="cx">     static void getSources(ScriptExecutionContext*, PassRefPtr&lt;MediaStreamTrackSourcesCallback&gt;, ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;MediaTrackConstraints&gt; constraints() const;
</del><ins>+    RefPtr&lt;MediaTrackConstraints&gt; getConstraints() const;
</ins><span class="cx">     RefPtr&lt;MediaSourceStates&gt; states() const;
</span><del>-    RefPtr&lt;MediaStreamCapabilities&gt; capabilities() const;
</del><ins>+    RefPtr&lt;MediaStreamCapabilities&gt; getCapabilities() const;
</ins><span class="cx">     void applyConstraints(const Dictionary&amp;);
</span><span class="cx">     void applyConstraints(PassRefPtr&lt;MediaConstraints&gt;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamTrackidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.idl (169647 => 169648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.idl        2014-06-06 16:20:31 UTC (rev 169647)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.idl        2014-06-06 16:33:42 UTC (rev 169648)
</span><span class="lines">@@ -46,11 +46,11 @@
</span><span class="cx"> 
</span><span class="cx">     [CallWith=ScriptExecutionContext, RaisesException] static void getSources(MediaStreamTrackSourcesCallback callback);
</span><span class="cx"> 
</span><del>-    MediaTrackConstraints constraints();
</del><ins>+    MediaTrackConstraints getConstraints();
</ins><span class="cx"> 
</span><span class="cx">     MediaSourceStates states();
</span><span class="cx"> 
</span><del>-    MediaStreamCapabilities capabilities(); // returns either AllVideoCapabilities or AllAudioCapabilities
</del><ins>+    MediaStreamCapabilities getCapabilities(); // returns either AllVideoCapabilities or AllAudioCapabilities
</ins><span class="cx"> 
</span><span class="cx">     void applyConstraints(Dictionary constraints);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>