Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (0) Simplify the TextTrackCue constructor now that the object'…
…s properties are all mutable.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=16076
Affected topics: Video Text Tracks

git-svn-id: http://svn.whatwg.org/webapps@7120 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 5, 2012
1 parent b0f8278 commit 5b7ed6d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 57 deletions.
27 changes: 10 additions & 17 deletions complete.html
Expand Up @@ -33946,7 +33946,7 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
</div>

<hr><pre class=idl>
[<a href=#dom-texttrackcue title=dom-TextTrackCue>Constructor</a>(DOMString id, double startTime, double endTime, DOMString text, optional DOMString settings, optional boolean pauseOnExit)]
[<a href=#dom-texttrackcue title=dom-TextTrackCue>Constructor</a>(double startTime, double endTime, DOMString text)]
interface <dfn id=texttrackcue>TextTrackCue</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute <a href=#texttrack>TextTrack</a>? <a href=#dom-texttrackcue-track title=dom-TextTrackCue-track>track</a>;

Expand All @@ -33967,15 +33967,12 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
[TreatNonCallableAsNull] attribute <a href=#function>Function</a>? <a href=#handler-texttrackcue-onexit title=handler-TextTrackCue-onexit>onexit</a>;
};</pre>

<dl class=domintro><dt><var title="">cue</var> = new <code title=dom-TextTrackCue><a href=#dom-texttrackcue>TextTrackCue</a></code>( <var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> [, <var title="">settings</var> [, <var title="">pauseOnExit</var> ] ] )</dt>
<dl class=domintro><dt><var title="">cue</var> = new <code title=dom-TextTrackCue><a href=#dom-texttrackcue>TextTrackCue</a></code>( <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> )</dt>
<dd>
<p>Returns a new <code><a href=#texttrackcue>TextTrackCue</a></code> object, for use with the <code title=dom-TextTrack-addCue><a href=#dom-texttrack-addcue>addCue()</a></code> method.</p>
<p>The <var title="">id</var> argument sets the <a href=#text-track-cue-identifier>text track cue identifier</a>.</p>
<p>The <var title="">startTime</var> argument sets the <a href=#text-track-cue-start-time>text track cue start time</a>.</p>
<p>The <var title="">endTime</var> argument sets the <a href=#text-track-cue-end-time>text track cue end time</a>.</p>
<p>The <var title="">text</var> argument sets the <a href=#text-track-cue-text>text track cue text</a>.</p>
<p>The <var title="">settings</var> argument is a string in the format of <a href=#webvtt-cue-settings>WebVTT cue settings</a>. If omitted, the empty string is assumed.</p>
<p>The <var title="">pauseOnExit</var> argument sets the <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit flag</a>. If omitted, false is assumed.</p>
</dd>

<dt><var title="">cue</var> . <a href=#dom-texttrackcue-track title=dom-TextTrackCue-track>track</a></dt>
Expand Down Expand Up @@ -34072,16 +34069,12 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>

</dl><div class=impl>

<p>The <dfn id=dom-texttrackcue title=dom-TextTrackCue><code>TextTrackCue(<var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var>, <var title="">settings</var>, <var title="">pauseOnExit</var>)</code></dfn> constructor, when invoked,
must run the following steps:</p>
<p>The <dfn id=dom-texttrackcue title=dom-TextTrackCue><code>TextTrackCue(<var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var>)</code></dfn> constructor, when invoked, must
run the following steps:</p>

<ol><li><p>Create a new <a href=#text-track-cue>text track cue</a> that is not
associated with any <a href=#text-track>text track</a>. Let <var title="">cue</var> be that <a href=#text-track-cue>text track cue</a>.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-identifier>text track cue
identifier</a> be the value of the <var title="">id</var>
argument.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-start-time>text track cue start
time</a> be the value of the <var title="">startTime</var>
argument, interpreted as a time in seconds.</li>
Expand All @@ -34090,10 +34083,6 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
time</a> be the value of the <var title="">endTime</var>
argument, interpreted as a time in seconds.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-pause-on-exit-flag>text track cue
pause-on-exit flag</a> be true if the <var title="">pauseOnExit</var> is present and true. Otherwise, let it
be false.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-text>text track cue
text</a> be the value of the <var title="">text</var> argument,
and let the rules for its interpretation be the <a href=#webvtt-cue-text-parsing-rules>WebVTT cue
Expand All @@ -34103,6 +34092,12 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>

<!-- default settings -->

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-identifier>text track cue
identifier</a> be the empty string.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-pause-on-exit-flag>text track cue
pause-on-exit flag</a> be false.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-writing-direction>text track cue
writing direction</a> be <a href=#text-track-cue-horizontal-writing-direction title="text track cue
horizontal writing direction">horizontal</a>.</li>
Expand All @@ -34124,8 +34119,6 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
alignment</a> be <a href=#text-track-cue-middle-alignment title="text track cue middle
alignment">middle alignment</a>.</li>

<li><p><a href=#parse-the-webvtt-settings>Parse the WebVTT settings</a> given by the <var title="">settings</var> argument for <var title="">cue</var>. <a href=#refsWEBVTT>[WEBVTT]</a></li>

<li><p>Return the <code><a href=#texttrackcue>TextTrackCue</a></code> object representing
<var title="">cue</var>.</li>

Expand Down
27 changes: 10 additions & 17 deletions index
Expand Up @@ -33946,7 +33946,7 @@ window.onbeforeunload = function () {
</div>

<hr><pre class=idl>
[<a href=#dom-texttrackcue title=dom-TextTrackCue>Constructor</a>(DOMString id, double startTime, double endTime, DOMString text, optional DOMString settings, optional boolean pauseOnExit)]
[<a href=#dom-texttrackcue title=dom-TextTrackCue>Constructor</a>(double startTime, double endTime, DOMString text)]
interface <dfn id=texttrackcue>TextTrackCue</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute <a href=#texttrack>TextTrack</a>? <a href=#dom-texttrackcue-track title=dom-TextTrackCue-track>track</a>;

Expand All @@ -33967,15 +33967,12 @@ interface <dfn id=texttrackcue>TextTrackCue</dfn> : <a href=#eventtarget>EventTa
[TreatNonCallableAsNull] attribute <a href=#function>Function</a>? <a href=#handler-texttrackcue-onexit title=handler-TextTrackCue-onexit>onexit</a>;
};</pre>

<dl class=domintro><dt><var title="">cue</var> = new <code title=dom-TextTrackCue><a href=#dom-texttrackcue>TextTrackCue</a></code>( <var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> [, <var title="">settings</var> [, <var title="">pauseOnExit</var> ] ] )</dt>
<dl class=domintro><dt><var title="">cue</var> = new <code title=dom-TextTrackCue><a href=#dom-texttrackcue>TextTrackCue</a></code>( <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> )</dt>
<dd>
<p>Returns a new <code><a href=#texttrackcue>TextTrackCue</a></code> object, for use with the <code title=dom-TextTrack-addCue><a href=#dom-texttrack-addcue>addCue()</a></code> method.</p>
<p>The <var title="">id</var> argument sets the <a href=#text-track-cue-identifier>text track cue identifier</a>.</p>
<p>The <var title="">startTime</var> argument sets the <a href=#text-track-cue-start-time>text track cue start time</a>.</p>
<p>The <var title="">endTime</var> argument sets the <a href=#text-track-cue-end-time>text track cue end time</a>.</p>
<p>The <var title="">text</var> argument sets the <a href=#text-track-cue-text>text track cue text</a>.</p>
<p>The <var title="">settings</var> argument is a string in the format of <a href=#webvtt-cue-settings>WebVTT cue settings</a>. If omitted, the empty string is assumed.</p>
<p>The <var title="">pauseOnExit</var> argument sets the <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit flag</a>. If omitted, false is assumed.</p>
</dd>

<dt><var title="">cue</var> . <a href=#dom-texttrackcue-track title=dom-TextTrackCue-track>track</a></dt>
Expand Down Expand Up @@ -34072,16 +34069,12 @@ interface <dfn id=texttrackcue>TextTrackCue</dfn> : <a href=#eventtarget>EventTa

</dl><div class=impl>

<p>The <dfn id=dom-texttrackcue title=dom-TextTrackCue><code>TextTrackCue(<var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var>, <var title="">settings</var>, <var title="">pauseOnExit</var>)</code></dfn> constructor, when invoked,
must run the following steps:</p>
<p>The <dfn id=dom-texttrackcue title=dom-TextTrackCue><code>TextTrackCue(<var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var>)</code></dfn> constructor, when invoked, must
run the following steps:</p>

<ol><li><p>Create a new <a href=#text-track-cue>text track cue</a> that is not
associated with any <a href=#text-track>text track</a>. Let <var title="">cue</var> be that <a href=#text-track-cue>text track cue</a>.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-identifier>text track cue
identifier</a> be the value of the <var title="">id</var>
argument.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-start-time>text track cue start
time</a> be the value of the <var title="">startTime</var>
argument, interpreted as a time in seconds.</li>
Expand All @@ -34090,10 +34083,6 @@ interface <dfn id=texttrackcue>TextTrackCue</dfn> : <a href=#eventtarget>EventTa
time</a> be the value of the <var title="">endTime</var>
argument, interpreted as a time in seconds.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-pause-on-exit-flag>text track cue
pause-on-exit flag</a> be true if the <var title="">pauseOnExit</var> is present and true. Otherwise, let it
be false.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-text>text track cue
text</a> be the value of the <var title="">text</var> argument,
and let the rules for its interpretation be the <a href=#webvtt-cue-text-parsing-rules>WebVTT cue
Expand All @@ -34103,6 +34092,12 @@ interface <dfn id=texttrackcue>TextTrackCue</dfn> : <a href=#eventtarget>EventTa

<!-- default settings -->

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-identifier>text track cue
identifier</a> be the empty string.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-pause-on-exit-flag>text track cue
pause-on-exit flag</a> be false.</li>

<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-writing-direction>text track cue
writing direction</a> be <a href=#text-track-cue-horizontal-writing-direction title="text track cue
horizontal writing direction">horizontal</a>.</li>
Expand All @@ -34124,8 +34119,6 @@ interface <dfn id=texttrackcue>TextTrackCue</dfn> : <a href=#eventtarget>EventTa
alignment</a> be <a href=#text-track-cue-middle-alignment title="text track cue middle
alignment">middle alignment</a>.</li>

<li><p><a href=#parse-the-webvtt-settings>Parse the WebVTT settings</a> given by the <var title="">settings</var> argument for <var title="">cue</var>. <a href=#refsWEBVTT>[WEBVTT]</a></li>

<li><p>Return the <code><a href=#texttrackcue>TextTrackCue</a></code> object representing
<var title="">cue</var>.</li>

Expand Down
34 changes: 11 additions & 23 deletions source
Expand Up @@ -37190,7 +37190,7 @@ window.onbeforeunload = function () {
<hr>

<pre class="idl">
[<span title="dom-TextTrackCue">Constructor</span>(DOMString id, double startTime, double endTime, DOMString text, optional DOMString settings, optional boolean pauseOnExit)]
[<span title="dom-TextTrackCue">Constructor</span>(double startTime, double endTime, DOMString text)]
interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {
readonly attribute <span>TextTrack</span>? <span title="dom-TextTrackCue-track">track</span>;

Expand All @@ -37213,15 +37213,12 @@ interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {

<dl class="domintro">

<dt><var title="">cue</var> = new <code title="dom-TextTrackCue">TextTrackCue</code>( <var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> [, <var title="">settings</var> [, <var title="">pauseOnExit</var> ] ] )</dt>
<dt><var title="">cue</var> = new <code title="dom-TextTrackCue">TextTrackCue</code>( <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> )</dt>
<dd>
<p>Returns a new <code>TextTrackCue</code> object, for use with the <code title="dom-TextTrack-addCue">addCue()</code> method.</p>
<p>The <var title="">id</var> argument sets the <span>text track cue identifier</span>.</p>
<p>The <var title="">startTime</var> argument sets the <span>text track cue start time</span>.</p>
<p>The <var title="">endTime</var> argument sets the <span>text track cue end time</span>.</p>
<p>The <var title="">text</var> argument sets the <span>text track cue text</span>.</p>
<p>The <var title="">settings</var> argument is a string in the format of <span>WebVTT cue settings</span>. If omitted, the empty string is assumed.</p>
<p>The <var title="">pauseOnExit</var> argument sets the <span>text track cue pause-on-exit flag</span>. If omitted, false is assumed.</p>
</dd>

<dt><var title="">cue</var> . <span title="dom-TextTrackCue-track">track</span></dt>
Expand Down Expand Up @@ -37325,22 +37322,16 @@ interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {
<div class="impl">

<p>The <dfn title="dom-TextTrackCue"><code>TextTrackCue(<var
title="">id</var>, <var title="">startTime</var>, <var
title="">endTime</var>, <var title="">text</var>, <var
title="">settings</var>, <var
title="">pauseOnExit</var>)</code></dfn> constructor, when invoked,
must run the following steps:</p>
title="">startTime</var>, <var title="">endTime</var>, <var
title="">text</var>)</code></dfn> constructor, when invoked, must
run the following steps:</p>

<ol>

<li><p>Create a new <span>text track cue</span> that is not
associated with any <span>text track</span>. Let <var
title="">cue</var> be that <span>text track cue</span>.</p></li>

<li><p>Let <var title="">cue</var>'s <span>text track cue
identifier</span> be the value of the <var title="">id</var>
argument.</p></li>

<li><p>Let <var title="">cue</var>'s <span>text track cue start
time</span> be the value of the <var title="">startTime</var>
argument, interpreted as a time in seconds.</p></li>
Expand All @@ -37349,11 +37340,6 @@ interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {
time</span> be the value of the <var title="">endTime</var>
argument, interpreted as a time in seconds.</p></li>

<li><p>Let <var title="">cue</var>'s <span>text track cue
pause-on-exit flag</span> be true if the <var
title="">pauseOnExit</var> is present and true. Otherwise, let it
be false.</p></li>

<li><p>Let <var title="">cue</var>'s <span>text track cue
text</span> be the value of the <var title="">text</var> argument,
and let the rules for its interpretation be the <span>WebVTT cue
Expand All @@ -37363,6 +37349,12 @@ interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {

<!-- default settings -->

<li><p>Let <var title="">cue</var>'s <span>text track cue
identifier</span> be the empty string.</p></li>

<li><p>Let <var title="">cue</var>'s <span>text track cue
pause-on-exit flag</span> be false.</p></li>

<li><p>Let <var title="">cue</var>'s <span>text track cue
writing direction</span> be <span title="text track cue
horizontal writing direction">horizontal</span>.</p></li>
Expand All @@ -37384,10 +37376,6 @@ interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {
alignment</span> be <span title="text track cue middle
alignment">middle alignment</span>.</p></li>

<li><p><span>Parse the WebVTT settings</span> given by the <var
title="">settings</var> argument for <var title="">cue</var>. <a
href="#refsWEBVTT">[WEBVTT]</a></p></li>

<li><p>Return the <code>TextTrackCue</code> object representing
<var title="">cue</var>.</p></li>

Expand Down

0 comments on commit 5b7ed6d

Please sign in to comment.