[html5] r5143 - [giow] (0) Captions - Stage 20.5: TimedTrackCue constructor and some fallout fro [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Jul 8 14:27:40 PDT 2010


Author: ianh
Date: 2010-07-08 14:27:39 -0700 (Thu, 08 Jul 2010)
New Revision: 5143

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Captions - Stage 20.5: TimedTrackCue constructor and some fallout from that.

Modified: complete.html
===================================================================
--- complete.html	2010-07-08 19:56:02 UTC (rev 5142)
+++ complete.html	2010-07-08 21:27:39 UTC (rev 5143)
@@ -26134,9 +26134,9 @@
    <dd>
 
     <p>A list of <a href=#timed-track-cue title="timed track cue">timed track
-    cues</a>, along with rules for their rendering (e.g., for
-    <a href=#websrt>WebSRT</a>, the <a href=#rules-for-updating-the-display-of-websrt-timed-tracks>rules for updating the display of
-    WebSRT timed tracks</a>).</p>
+    cues</a>, along with <dfn id=rules-for-updating-the-timed-track-rendering>rules for updating the timed track
+    rendering</dfn> (e.g., for <a href=#websrt>WebSRT</a>, the <a href=#rules-for-updating-the-display-of-websrt-timed-tracks>rules
+    for updating the display of WebSRT timed tracks</a>).</p>
 
     <p>The <a href=#timed-track-list-of-cues title="timed track list of cues">list of cues of a
     timed track</a> can change dynamically, either because the
@@ -26384,6 +26384,10 @@
    preferences and the requirements of the relevant specification for
    the data.</li>
 
+   <li><p>Leave the <a href=#timed-track-list-of-cues>timed track list of cues</a> empty, and
+   associate with it the <a href=#rules-for-updating-the-timed-track-rendering>rules for updating the timed track
+   rendering</a> appropriate for the format in question.</p>
+
    <li><p>Add the new <a href=#timed-track>timed track</a> to the <a href=#media-element>media
    element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>.</li>
 
@@ -26439,7 +26443,11 @@
   the algorithm below.</p>
 
   <p>The <a href=#timed-track-list-of-cues>timed track list of cues</a> is initially empty. It
-  is dynamically modified when the referenced file is parsed.</p>
+  is dynamically modified when the referenced file is parsed.
+  Associated with the list are the <a href=#rules-for-updating-the-timed-track-rendering>rules for updating the timed
+  track rendering</a> appropriate for the format in question; for
+  <a href=#websrt>WebSRT</a>, this is the <a href=#rules-for-updating-the-display-of-websrt-timed-tracks>rules for updating the
+  display of WebSRT timed tracks</a>.</p>
 
   <p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and
   the new parent is a <a href=#media-element>media element</a>, then the user agent
@@ -26881,8 +26889,9 @@
     the <a href=#timed-track-disabled>timed track disabled</a> mode.</p>
 
     <p>If the <a href=#timed-track-mode>timed track mode</a> was previously the
-    <a href=#timed-track-showing>timed track showing</a> mode, then <a href=#update-the-timed-track-rendering>update the timed
-    track rendering</a> of the <a href=#media-element>media element</a>.</p>
+    <a href=#timed-track-showing>timed track showing</a> mode, then apply the rules for
+    updating the timed track rendering of the <a href=#media-element>media
+    element</a> appropriate for the <a href=#timed-track>timed track</a>.</p>
 
    </dd>
 
@@ -26895,8 +26904,9 @@
     the <a href=#timed-track-hidden>timed track hidden</a> mode.</p>
 
     <p>If the <a href=#timed-track-mode>timed track mode</a> was previously the
-    <a href=#timed-track-showing>timed track showing</a> mode, then <a href=#update-the-timed-track-rendering>update the timed
-    track rendering</a> of the <a href=#media-element>media element</a>.</p>
+    <a href=#timed-track-showing>timed track showing</a> mode, then apply the rules for
+    updating the timed track rendering of the <a href=#media-element>media
+    element</a> appropriate for the <a href=#timed-track>timed track</a>.</p>
 
    </dd>
 
@@ -26908,8 +26918,9 @@
     track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object represents to
     the <a href=#timed-track-showing>timed track showing</a> mode.</p>
 
-    <p><a href=#update-the-timed-track-rendering>Update the timed track rendering</a> of the
-    <a href=#media-element>media element</a>.</p>
+    <p>Apply the rules for updating the timed track rendering of the
+    <a href=#media-element>media element</a> appropriate for the <a href=#timed-track>timed
+    track</a>.</p>
 
    </dd>
 
@@ -27001,10 +27012,10 @@
     <a href=#timed-track-readiness-state>timed track readiness state</a> to the <a href=#timed-track-loaded>timed track
     loaded</a> state, its <a href=#timed-track-mode>timed track mode</a> to the
     <a href=#timed-track-hidden>timed track hidden</a> mode, and its <a href=#timed-track-list-of-cues>timed track
-    list of cues</a> to an empty list, with the rules for its
-    interpretation being the <a href=#websrt-cue-text-parsing-rules>WebSRT cue text parsing
-    rules</a>, the <a href=#websrt-cue-text-rendering-rules>WebSRT cue text rendering rules</a>,
-    and the <a href=#websrt-cue-text-dom-construction-rules>WebSRT cue text DOM construction rules</a></p>
+    list of cues</a> to an empty list, associated with the
+    <a href=#rules-for-updating-the-display-of-websrt-timed-tracks>rules for updating the display of WebSRT timed tracks</a>
+    as its <a href=#rules-for-updating-the-timed-track-rendering>rules for updating the timed track
+    rendering</a>.</p>
 
    </li>
 
@@ -27119,7 +27130,7 @@
 
   </div>
 
-  <hr><pre class=idl>[<span title=dom-TimedTrackCue>Constructor</span>(in DOMString id, in float startTime, in float endTime, in DOMString text, in optional DOMString settings, in optional DOMString voice, in optional boolean pauseOnExit)]
+  <hr><pre class=idl>[<a href=#dom-timedtrackcue title=dom-TimedTrackCue>Constructor</a>(in DOMString id, in float startTime, in float endTime, in DOMString text, in optional DOMString settings, in optional DOMString voice, in optional boolean pauseOnExit)]
 interface <dfn id=timedtrackcue>TimedTrackCue</dfn> {
   readonly attribute <a href=#timedtrack>TimedTrack</a> <span title=dom-TimedTrackCue-track>track</span>;
   readonly attribute DOMString <span title=dom-TimedTrackCue-id>id</span>;
@@ -27143,7 +27154,7 @@
   readonly attribute <a href=#function>Function</a> <a href=#handler-timedtrackcue-onexit title=handler-TimedTrackCue-onexit>onexit</a>;
 };</pre>
 
-  <dl class=domintro><dt><var title="">cue</var> = new <code title=dom-TimedTrackCue>TimedTrackCue</code>( <var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> [, <var title="">settings</var> [, <var title="">voice</var> [, <var title="">pauseOnExit</var> ] ] ] )</dt>
+  <dl class=domintro><dt><var title="">cue</var> = new <code title=dom-TimedTrackCue><a href=#dom-timedtrackcue>TimedTrackCue</a></code>( <var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> [, <var title="">settings</var> [, <var title="">voice</var> [, <var title="">pauseOnExit</var> ] ] ] )</dt>
    <dd>
     <p>Returns a new <code><a href=#timedtrackcue>TimedTrackCue</a></code> object, for use with the <code title=dom-MutableTimedTrack-addCue><a href=#dom-mutabletimedtrack-addcue>addCue()</a></code> method.</p>
     <p>The <var title="">id</var> argument sets the <a href=#timed-track-cue-identifier>timed track cue identifier</a>.</p>
@@ -27243,11 +27254,96 @@
 
   </dl><div class=impl>
 
-  <p class=XXX>...</p>
+  <p>The <dfn id=dom-timedtrackcue title=dom-TimedTrackCue><code>TimedTrackCue(<var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var>, <var title="">settings</var>, <var title="">voice</var>, <var title="">pauseOnExit</var>)</code></dfn> constructor, when invoked,
+  must run the following steps:</p>
 
-  </div>
+  <ol><li><p>Create a new <a href=#timed-track-cue>timed track cue</a> that is not
+   associated with any <a href=#timed-track>timed track</a>. Let <var title="">cue</var> be that <a href=#timed-track-cue>timed track cue</a>.</li>
 
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-identifier>timed 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=#timed-track-cue-start-time>timed track cue start
+   time</a> be the value of the <var title="">startTime</var>
+   argument, interpreted as a time in seconds.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-end-time>timed track cue end
+   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=#timed-track-cue-pause-on-exit-flag>timed 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=#timed-track-cue-voice-identifier>timed track cue voice
+   identifier</a> be the value of the <var title="">voice</var>
+   argument, if it is present, or the empty string otherwise.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-text>timed 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=#websrt-cue-text-parsing-rules>WebSRT cue
+   text parsing rules</a>, the <a href=#websrt-cue-text-rendering-rules>WebSRT cue text rendering
+   rules</a>, and the <a href=#websrt-cue-text-dom-construction-rules>WebSRT cue text DOM construction
+   rules</a>.</li>
+
+   <!-- default settings -->
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-writing-direction>timed track cue
+   writing direction</a> be <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue
+   horizontal writing direction">horizontal</a>.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-snap-to-lines-flag>timed track cue
+   snap-to-lines flag</a> be true.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-line-position>timed track cue line
+   position</a> be <a href=#timed-track-cue-automatic-line-position title="timed track cue automatic line
+   position">auto</a>.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-text-position>timed track cue
+   text position</a> be 50.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-size>timed track cue
+   size</a> be 100.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-alignment>timed track cue
+   alignment</a> be <a href=#timed-track-cue-middle-alignment title="timed track cue middle
+   alignment">middle alignment</a>.</li>
+
+   <li><p>Let <var title="">input</var> be the string given by the
+   <var title="">settings</var> argument.</li>
+
+   <li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
+   string.</li>
+
+   <li><p><a href=#parse-the-websrt-settings>Parse the WebSRT settings</a> for <var title="">cue</var>.</li>
+
+   <li><p>Return the <code><a href=#timedtrackcue>TimedTrackCue</a></code> object representing
+   <var title="">cue</var>.</li>
+
+  </ol><!-- XXX
+
+  <dfn title="dom-TimedTrackCue-track"><code>track</code></dfn>
+  <dfn title="dom-TimedTrackCue-id"><code>id</code></dfn>
+
+  <dfn title="dom-TimedTrackCue-startTime"><code>startTime</code></dfn>
+  <dfn title="dom-TimedTrackCue-endTime"><code>endTime</code></dfn>
+  <dfn title="dom-TimedTrackCue-pauseOnExit"><code>pauseOnExit</code></dfn>
+
+  <dfn title="dom-TimedTrackCue-direction"><code>direction</code></dfn>
+  <dfn title="dom-TimedTrackCue-snapToLines"><code>snapToLines</code></dfn>
+  <dfn title="dom-TimedTrackCue-linePosition"><code>linePosition</code></dfn>
+  <dfn title="dom-TimedTrackCue-textPosition"><code>textPosition</code></dfn>
+  <dfn title="dom-TimedTrackCue-size"><code>size</code></dfn>
+  <dfn title="dom-TimedTrackCue-alignment"><code>alignment</code></dfn>
+
+  <dfn title="dom-TimedTrackCue-voice"><code>voice</code></dfn>
+  <dfn title="dom-TimedTrackCue-getCueAsSource()"><code>getCueAsSource()</code></dfn>
+  <dfn title="dom-TimedTrackCue-getCueAsHTML()"><code>getCueAsHTML()</code></dfn>
+
+--></div>
+
+
   <div class=impl>
 
   <h6 id=cue-events><span class=secno>4.8.10.10.6 </span>Event definitions</h6>
@@ -27565,7 +27661,8 @@
    U+000A LINE FEED (LF) characters.</li>
 
    <li><p>Let <var title="">cue</var> be a new <a href=#timed-track-cue>timed track
-   cue</a>.</li>
+   cue</a> associated with <var title="">output</var>'s <a href=#timed-track>timed
+   track</a>.</li>
 
    <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-identifier>timed track cue
    identifier</a> be the empty string.</li>
@@ -27755,6 +27852,15 @@
 
    <li><p><a href=#skip-whitespace>Skip whitespace</a>.</li>
 
+   <li><p><a href=#parse-the-websrt-settings>Parse the WebSRT settings</a> for <var title="">cue</var>.</li>
+
+  </ol><p>When the user agent is to <dfn id=parse-the-websrt-settings>parse the WebSRT settings</dfn>
+  for a <a href=#timed-track-cue>timed track cue</a> <var title="">cue</var>,, the
+  user agent must run the following steps:</p>
+
+  <ol><li><p>Let <var title="">input</var> and <var title="">position</var> be the same variables as those of the same
+   name in the algorithm that invoked these steps.</li>
+
    <li><p><i>Settings</i>: If <var title="">position</var> is beyond
    the end of <var title="">input</var> then abort these
    steps.</li>
@@ -86156,8 +86262,6 @@
 
   <p class=XXX>The <dfn id=rules-for-updating-the-display-of-websrt-timed-tracks>rules for updating the display of WebSRT timed tracks</dfn>
 
-  <p class=XXX><dfn id=update-the-timed-track-rendering>update the timed track rendering</dfn> of a <a href=#media-element>media element</a></p>
-
   <!--
 
    list of active WebSRT or WebSRT-compatible cues and their positions

Modified: index
===================================================================
--- index	2010-07-08 19:56:02 UTC (rev 5142)
+++ index	2010-07-08 21:27:39 UTC (rev 5143)
@@ -26061,9 +26061,9 @@
    <dd>
 
     <p>A list of <a href=#timed-track-cue title="timed track cue">timed track
-    cues</a>, along with rules for their rendering (e.g., for
-    <a href=#websrt>WebSRT</a>, the <a href=#rules-for-updating-the-display-of-websrt-timed-tracks>rules for updating the display of
-    WebSRT timed tracks</a>).</p>
+    cues</a>, along with <dfn id=rules-for-updating-the-timed-track-rendering>rules for updating the timed track
+    rendering</dfn> (e.g., for <a href=#websrt>WebSRT</a>, the <a href=#rules-for-updating-the-display-of-websrt-timed-tracks>rules
+    for updating the display of WebSRT timed tracks</a>).</p>
 
     <p>The <a href=#timed-track-list-of-cues title="timed track list of cues">list of cues of a
     timed track</a> can change dynamically, either because the
@@ -26311,6 +26311,10 @@
    preferences and the requirements of the relevant specification for
    the data.</li>
 
+   <li><p>Leave the <a href=#timed-track-list-of-cues>timed track list of cues</a> empty, and
+   associate with it the <a href=#rules-for-updating-the-timed-track-rendering>rules for updating the timed track
+   rendering</a> appropriate for the format in question.</p>
+
    <li><p>Add the new <a href=#timed-track>timed track</a> to the <a href=#media-element>media
    element</a>'s <a href=#list-of-timed-tracks>list of timed tracks</a>.</li>
 
@@ -26366,7 +26370,11 @@
   the algorithm below.</p>
 
   <p>The <a href=#timed-track-list-of-cues>timed track list of cues</a> is initially empty. It
-  is dynamically modified when the referenced file is parsed.</p>
+  is dynamically modified when the referenced file is parsed.
+  Associated with the list are the <a href=#rules-for-updating-the-timed-track-rendering>rules for updating the timed
+  track rendering</a> appropriate for the format in question; for
+  <a href=#websrt>WebSRT</a>, this is the <a href=#rules-for-updating-the-display-of-websrt-timed-tracks>rules for updating the
+  display of WebSRT timed tracks</a>.</p>
 
   <p>When a <code><a href=#the-track-element>track</a></code> element's parent element changes and
   the new parent is a <a href=#media-element>media element</a>, then the user agent
@@ -26808,8 +26816,9 @@
     the <a href=#timed-track-disabled>timed track disabled</a> mode.</p>
 
     <p>If the <a href=#timed-track-mode>timed track mode</a> was previously the
-    <a href=#timed-track-showing>timed track showing</a> mode, then <a href=#update-the-timed-track-rendering>update the timed
-    track rendering</a> of the <a href=#media-element>media element</a>.</p>
+    <a href=#timed-track-showing>timed track showing</a> mode, then apply the rules for
+    updating the timed track rendering of the <a href=#media-element>media
+    element</a> appropriate for the <a href=#timed-track>timed track</a>.</p>
 
    </dd>
 
@@ -26822,8 +26831,9 @@
     the <a href=#timed-track-hidden>timed track hidden</a> mode.</p>
 
     <p>If the <a href=#timed-track-mode>timed track mode</a> was previously the
-    <a href=#timed-track-showing>timed track showing</a> mode, then <a href=#update-the-timed-track-rendering>update the timed
-    track rendering</a> of the <a href=#media-element>media element</a>.</p>
+    <a href=#timed-track-showing>timed track showing</a> mode, then apply the rules for
+    updating the timed track rendering of the <a href=#media-element>media
+    element</a> appropriate for the <a href=#timed-track>timed track</a>.</p>
 
    </dd>
 
@@ -26835,8 +26845,9 @@
     track</a> that the <code><a href=#timedtrack>TimedTrack</a></code> object represents to
     the <a href=#timed-track-showing>timed track showing</a> mode.</p>
 
-    <p><a href=#update-the-timed-track-rendering>Update the timed track rendering</a> of the
-    <a href=#media-element>media element</a>.</p>
+    <p>Apply the rules for updating the timed track rendering of the
+    <a href=#media-element>media element</a> appropriate for the <a href=#timed-track>timed
+    track</a>.</p>
 
    </dd>
 
@@ -26928,10 +26939,10 @@
     <a href=#timed-track-readiness-state>timed track readiness state</a> to the <a href=#timed-track-loaded>timed track
     loaded</a> state, its <a href=#timed-track-mode>timed track mode</a> to the
     <a href=#timed-track-hidden>timed track hidden</a> mode, and its <a href=#timed-track-list-of-cues>timed track
-    list of cues</a> to an empty list, with the rules for its
-    interpretation being the <a href=#websrt-cue-text-parsing-rules>WebSRT cue text parsing
-    rules</a>, the <a href=#websrt-cue-text-rendering-rules>WebSRT cue text rendering rules</a>,
-    and the <a href=#websrt-cue-text-dom-construction-rules>WebSRT cue text DOM construction rules</a></p>
+    list of cues</a> to an empty list, associated with the
+    <a href=#rules-for-updating-the-display-of-websrt-timed-tracks>rules for updating the display of WebSRT timed tracks</a>
+    as its <a href=#rules-for-updating-the-timed-track-rendering>rules for updating the timed track
+    rendering</a>.</p>
 
    </li>
 
@@ -27046,7 +27057,7 @@
 
   </div>
 
-  <hr><pre class=idl>[<span title=dom-TimedTrackCue>Constructor</span>(in DOMString id, in float startTime, in float endTime, in DOMString text, in optional DOMString settings, in optional DOMString voice, in optional boolean pauseOnExit)]
+  <hr><pre class=idl>[<a href=#dom-timedtrackcue title=dom-TimedTrackCue>Constructor</a>(in DOMString id, in float startTime, in float endTime, in DOMString text, in optional DOMString settings, in optional DOMString voice, in optional boolean pauseOnExit)]
 interface <dfn id=timedtrackcue>TimedTrackCue</dfn> {
   readonly attribute <a href=#timedtrack>TimedTrack</a> <span title=dom-TimedTrackCue-track>track</span>;
   readonly attribute DOMString <span title=dom-TimedTrackCue-id>id</span>;
@@ -27070,7 +27081,7 @@
   readonly attribute <a href=#function>Function</a> <a href=#handler-timedtrackcue-onexit title=handler-TimedTrackCue-onexit>onexit</a>;
 };</pre>
 
-  <dl class=domintro><dt><var title="">cue</var> = new <code title=dom-TimedTrackCue>TimedTrackCue</code>( <var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> [, <var title="">settings</var> [, <var title="">voice</var> [, <var title="">pauseOnExit</var> ] ] ] )</dt>
+  <dl class=domintro><dt><var title="">cue</var> = new <code title=dom-TimedTrackCue><a href=#dom-timedtrackcue>TimedTrackCue</a></code>( <var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var> [, <var title="">settings</var> [, <var title="">voice</var> [, <var title="">pauseOnExit</var> ] ] ] )</dt>
    <dd>
     <p>Returns a new <code><a href=#timedtrackcue>TimedTrackCue</a></code> object, for use with the <code title=dom-MutableTimedTrack-addCue><a href=#dom-mutabletimedtrack-addcue>addCue()</a></code> method.</p>
     <p>The <var title="">id</var> argument sets the <a href=#timed-track-cue-identifier>timed track cue identifier</a>.</p>
@@ -27170,11 +27181,96 @@
 
   </dl><div class=impl>
 
-  <p class=XXX>...</p>
+  <p>The <dfn id=dom-timedtrackcue title=dom-TimedTrackCue><code>TimedTrackCue(<var title="">id</var>, <var title="">startTime</var>, <var title="">endTime</var>, <var title="">text</var>, <var title="">settings</var>, <var title="">voice</var>, <var title="">pauseOnExit</var>)</code></dfn> constructor, when invoked,
+  must run the following steps:</p>
 
-  </div>
+  <ol><li><p>Create a new <a href=#timed-track-cue>timed track cue</a> that is not
+   associated with any <a href=#timed-track>timed track</a>. Let <var title="">cue</var> be that <a href=#timed-track-cue>timed track cue</a>.</li>
 
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-identifier>timed 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=#timed-track-cue-start-time>timed track cue start
+   time</a> be the value of the <var title="">startTime</var>
+   argument, interpreted as a time in seconds.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-end-time>timed track cue end
+   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=#timed-track-cue-pause-on-exit-flag>timed 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=#timed-track-cue-voice-identifier>timed track cue voice
+   identifier</a> be the value of the <var title="">voice</var>
+   argument, if it is present, or the empty string otherwise.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-text>timed 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=#websrt-cue-text-parsing-rules>WebSRT cue
+   text parsing rules</a>, the <a href=#websrt-cue-text-rendering-rules>WebSRT cue text rendering
+   rules</a>, and the <a href=#websrt-cue-text-dom-construction-rules>WebSRT cue text DOM construction
+   rules</a>.</li>
+
+   <!-- default settings -->
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-writing-direction>timed track cue
+   writing direction</a> be <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue
+   horizontal writing direction">horizontal</a>.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-snap-to-lines-flag>timed track cue
+   snap-to-lines flag</a> be true.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-line-position>timed track cue line
+   position</a> be <a href=#timed-track-cue-automatic-line-position title="timed track cue automatic line
+   position">auto</a>.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-text-position>timed track cue
+   text position</a> be 50.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-size>timed track cue
+   size</a> be 100.</li>
+
+   <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-alignment>timed track cue
+   alignment</a> be <a href=#timed-track-cue-middle-alignment title="timed track cue middle
+   alignment">middle alignment</a>.</li>
+
+   <li><p>Let <var title="">input</var> be the string given by the
+   <var title="">settings</var> argument.</li>
+
+   <li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
+   string.</li>
+
+   <li><p><a href=#parse-the-websrt-settings>Parse the WebSRT settings</a> for <var title="">cue</var>.</li>
+
+   <li><p>Return the <code><a href=#timedtrackcue>TimedTrackCue</a></code> object representing
+   <var title="">cue</var>.</li>
+
+  </ol><!-- XXX
+
+  <dfn title="dom-TimedTrackCue-track"><code>track</code></dfn>
+  <dfn title="dom-TimedTrackCue-id"><code>id</code></dfn>
+
+  <dfn title="dom-TimedTrackCue-startTime"><code>startTime</code></dfn>
+  <dfn title="dom-TimedTrackCue-endTime"><code>endTime</code></dfn>
+  <dfn title="dom-TimedTrackCue-pauseOnExit"><code>pauseOnExit</code></dfn>
+
+  <dfn title="dom-TimedTrackCue-direction"><code>direction</code></dfn>
+  <dfn title="dom-TimedTrackCue-snapToLines"><code>snapToLines</code></dfn>
+  <dfn title="dom-TimedTrackCue-linePosition"><code>linePosition</code></dfn>
+  <dfn title="dom-TimedTrackCue-textPosition"><code>textPosition</code></dfn>
+  <dfn title="dom-TimedTrackCue-size"><code>size</code></dfn>
+  <dfn title="dom-TimedTrackCue-alignment"><code>alignment</code></dfn>
+
+  <dfn title="dom-TimedTrackCue-voice"><code>voice</code></dfn>
+  <dfn title="dom-TimedTrackCue-getCueAsSource()"><code>getCueAsSource()</code></dfn>
+  <dfn title="dom-TimedTrackCue-getCueAsHTML()"><code>getCueAsHTML()</code></dfn>
+
+--></div>
+
+
   <div class=impl>
 
   <h6 id=cue-events><span class=secno>4.8.10.10.6 </span>Event definitions</h6>
@@ -27492,7 +27588,8 @@
    U+000A LINE FEED (LF) characters.</li>
 
    <li><p>Let <var title="">cue</var> be a new <a href=#timed-track-cue>timed track
-   cue</a>.</li>
+   cue</a> associated with <var title="">output</var>'s <a href=#timed-track>timed
+   track</a>.</li>
 
    <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-identifier>timed track cue
    identifier</a> be the empty string.</li>
@@ -27682,6 +27779,15 @@
 
    <li><p><a href=#skip-whitespace>Skip whitespace</a>.</li>
 
+   <li><p><a href=#parse-the-websrt-settings>Parse the WebSRT settings</a> for <var title="">cue</var>.</li>
+
+  </ol><p>When the user agent is to <dfn id=parse-the-websrt-settings>parse the WebSRT settings</dfn>
+  for a <a href=#timed-track-cue>timed track cue</a> <var title="">cue</var>,, the
+  user agent must run the following steps:</p>
+
+  <ol><li><p>Let <var title="">input</var> and <var title="">position</var> be the same variables as those of the same
+   name in the algorithm that invoked these steps.</li>
+
    <li><p><i>Settings</i>: If <var title="">position</var> is beyond
    the end of <var title="">input</var> then abort these
    steps.</li>
@@ -79397,8 +79503,6 @@
 
   <p class=XXX>The <dfn id=rules-for-updating-the-display-of-websrt-timed-tracks>rules for updating the display of WebSRT timed tracks</dfn>
 
-  <p class=XXX><dfn id=update-the-timed-track-rendering>update the timed track rendering</dfn> of a <a href=#media-element>media element</a></p>
-
   <!--
 
    list of active WebSRT or WebSRT-compatible cues and their positions

Modified: source
===================================================================
--- source	2010-07-08 19:56:02 UTC (rev 5142)
+++ source	2010-07-08 21:27:39 UTC (rev 5143)
@@ -28285,9 +28285,9 @@
    <dd>
 
     <p>A list of <span title="timed track cue">timed track
-    cues</span>, along with rules for their rendering (e.g., for
-    <span>WebSRT</span>, the <span>rules for updating the display of
-    WebSRT timed tracks</span>).</p>
+    cues</span>, along with <dfn>rules for updating the timed track
+    rendering</dfn> (e.g., for <span>WebSRT</span>, the <span>rules
+    for updating the display of WebSRT timed tracks</span>).</p>
 
     <p>The <span title="timed track list of cues">list of cues of a
     timed track</span> can change dynamically, either because the
@@ -28555,6 +28555,10 @@
    preferences and the requirements of the relevant specification for
    the data.</p></li>
 
+   <li><p>Leave the <span>timed track list of cues</span> empty, and
+   associate with it the <span>rules for updating the timed track
+   rendering</span> appropriate for the format in question.</p>
+
    <li><p>Add the new <span>timed track</span> to the <span>media
    element</span>'s <span>list of timed tracks</span>.</p></li>
 
@@ -28625,7 +28629,11 @@
   the algorithm below.</p>
 
   <p>The <span>timed track list of cues</span> is initially empty. It
-  is dynamically modified when the referenced file is parsed.</p>
+  is dynamically modified when the referenced file is parsed.
+  Associated with the list are the <span>rules for updating the timed
+  track rendering</span> appropriate for the format in question; for
+  <span>WebSRT</span>, this is the <span>rules for updating the
+  display of WebSRT timed tracks</span>.</p>
 
   <p>When a <code>track</code> element's parent element changes and
   the new parent is a <span>media element</span>, then the user agent
@@ -29128,8 +29136,9 @@
     the <span>timed track disabled</span> mode.</p>
 
     <p>If the <span>timed track mode</span> was previously the
-    <span>timed track showing</span> mode, then <span>update the timed
-    track rendering</span> of the <span>media element</span>.</p>
+    <span>timed track showing</span> mode, then apply the rules for
+    updating the timed track rendering of the <span>media
+    element</span> appropriate for the <span>timed track</span>.</p>
 
    </dd>
 
@@ -29142,8 +29151,9 @@
     the <span>timed track hidden</span> mode.</p>
 
     <p>If the <span>timed track mode</span> was previously the
-    <span>timed track showing</span> mode, then <span>update the timed
-    track rendering</span> of the <span>media element</span>.</p>
+    <span>timed track showing</span> mode, then apply the rules for
+    updating the timed track rendering of the <span>media
+    element</span> appropriate for the <span>timed track</span>.</p>
 
    </dd>
 
@@ -29155,8 +29165,9 @@
     track</span> that the <code>TimedTrack</code> object represents to
     the <span>timed track showing</span> mode.</p>
 
-    <p><span>Update the timed track rendering</span> of the
-    <span>media element</span>.</p>
+    <p>Apply the rules for updating the timed track rendering of the
+    <span>media element</span> appropriate for the <span>timed
+    track</span>.</p>
 
    </dd>
 
@@ -29265,10 +29276,10 @@
     <span>timed track readiness state</span> to the <span>timed track
     loaded</span> state, its <span>timed track mode</span> to the
     <span>timed track hidden</span> mode, and its <span>timed track
-    list of cues</span> to an empty list, with the rules for its
-    interpretation being the <span>WebSRT cue text parsing
-    rules</span>, the <span>WebSRT cue text rendering rules</span>,
-    and the <span>WebSRT cue text DOM construction rules</span></p>
+    list of cues</span> to an empty list, associated with the
+    <span>rules for updating the display of WebSRT timed tracks</span>
+    as its <span>rules for updating the timed track
+    rendering</span>.</p>
 
    </li>
 
@@ -29539,8 +29550,107 @@
 
   <div class="impl">
 
-  <p class="XXX">...</p>
+  <p>The <dfn title="dom-TimedTrackCue"><code>TimedTrackCue(<var
+  title="">id</var>, <var title="">startTime</var>, <var
+  title="">endTime</var>, <var title="">text</var>, <var
+  title="">settings</var>, <var title="">voice</var>, <var
+  title="">pauseOnExit</var>)</code></dfn> constructor, when invoked,
+  must run the following steps:</p>
 
+  <ol>
+
+   <li><p>Create a new <span>timed track cue</span> that is not
+   associated with any <span>timed track</span>. Let <var
+   title="">cue</var> be that <span>timed track cue</span>.</p></li>
+
+   <li><p>Let <var title="">cue</var>'s <span>timed 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>timed track cue start
+   time</span> be the value of the <var title="">startTime</var>
+   argument, interpreted as a time in seconds.</p></li>
+
+   <li><p>Let <var title="">cue</var>'s <span>timed track cue end
+   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>timed 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>timed track cue voice
+   identifier</span> be the value of the <var title="">voice</var>
+   argument, if it is present, or the empty string otherwise.</p></li>
+
+   <li><p>Let <var title="">cue</var>'s <span>timed track cue
+   text</span> be the value of the <var title="">text</var> argument,
+   and let the rules for its interpretation be the <span>WebSRT cue
+   text parsing rules</span>, the <span>WebSRT cue text rendering
+   rules</span>, and the <span>WebSRT cue text DOM construction
+   rules</span>.</p></li>
+
+   <!-- default settings -->
+
+   <li><p>Let <var title="">cue</var>'s <span>timed track cue
+   writing direction</span> be <span title="timed track cue
+   horizontal writing direction">horizontal</span>.</p></li>
+
+   <li><p>Let <var title="">cue</var>'s <span>timed track cue
+   snap-to-lines flag</span> be true.</p></li>
+
+   <li><p>Let <var title="">cue</var>'s <span>timed track cue line
+   position</span> be <span title="timed track cue automatic line
+   position">auto</span>.</p></li>
+
+   <li><p>Let <var title="">cue</var>'s <span>timed track cue
+   text position</span> be 50.</p></li>
+
+   <li><p>Let <var title="">cue</var>'s <span>timed track cue
+   size</span> be 100.</p></li>
+
+   <li><p>Let <var title="">cue</var>'s <span>timed track cue
+   alignment</span> be <span title="timed track cue middle
+   alignment">middle alignment</span>.</p></li>
+
+   <li><p>Let <var title="">input</var> be the string given by the
+   <var title="">settings</var> argument.</p></li>
+
+   <li><p>Let <var title="">position</var> be a pointer into <var
+   title="">input</var>, initially pointing at the start of the
+   string.</p></li>
+
+   <li><p><span>Parse the WebSRT settings</span> for <var
+   title="">cue</var>.</p></li>
+
+   <li><p>Return the <code>TimedTrackCue</code> object representing
+   <var title="">cue</var>.</p></li>
+
+  </ol>
+
+<!-- XXX
+
+  <dfn title="dom-TimedTrackCue-track"><code>track</code></dfn>
+  <dfn title="dom-TimedTrackCue-id"><code>id</code></dfn>
+
+  <dfn title="dom-TimedTrackCue-startTime"><code>startTime</code></dfn>
+  <dfn title="dom-TimedTrackCue-endTime"><code>endTime</code></dfn>
+  <dfn title="dom-TimedTrackCue-pauseOnExit"><code>pauseOnExit</code></dfn>
+
+  <dfn title="dom-TimedTrackCue-direction"><code>direction</code></dfn>
+  <dfn title="dom-TimedTrackCue-snapToLines"><code>snapToLines</code></dfn>
+  <dfn title="dom-TimedTrackCue-linePosition"><code>linePosition</code></dfn>
+  <dfn title="dom-TimedTrackCue-textPosition"><code>textPosition</code></dfn>
+  <dfn title="dom-TimedTrackCue-size"><code>size</code></dfn>
+  <dfn title="dom-TimedTrackCue-alignment"><code>alignment</code></dfn>
+
+  <dfn title="dom-TimedTrackCue-voice"><code>voice</code></dfn>
+  <dfn title="dom-TimedTrackCue-getCueAsSource()"><code>getCueAsSource()</code></dfn>
+  <dfn title="dom-TimedTrackCue-getCueAsHTML()"><code>getCueAsHTML()</code></dfn>
+
+-->
+
   </div>
 
 
@@ -29960,7 +30070,8 @@
    U+000A LINE FEED (LF) characters.</p></li>
 
    <li><p>Let <var title="">cue</var> be a new <span>timed track
-   cue</span>.</p></li>
+   cue</span> associated with <var title="">output</var>'s <span>timed
+   track</span>.</p></li>
 
    <li><p>Let <var title="">cue</var>'s <span>timed track cue
    identifier</span> be the empty string.</p></li>
@@ -30173,6 +30284,21 @@
 
    <li><p><span>Skip whitespace</span>.</p></li>
 
+   <li><p><span>Parse the WebSRT settings</span> for <var
+   title="">cue</var>.</p></li>
+
+  </ol>
+
+  <p>When the user agent is to <dfn>parse the WebSRT settings</dfn>
+  for a <span>timed track cue</span> <var title="">cue</var>,, the
+  user agent must run the following steps:</p>
+
+  <ol>
+
+   <li><p>Let <var title="">input</var> and <var
+   title="">position</var> be the same variables as those of the same
+   name in the algorithm that invoked these steps.</p></li>
+
    <li><p><i>Settings</i>: If <var title="">position</var> is beyond
    the end of <var title="">input</var> then abort these
    steps.</p></li>
@@ -98272,8 +98398,6 @@
 
   <p class="XXX">The <dfn>rules for updating the display of WebSRT timed tracks</dfn>
 
-  <p class="XXX"><dfn>update the timed track rendering</dfn> of a <span>media element</span></p>
-
   <!--
 
    list of active WebSRT or WebSRT-compatible cues and their positions




More information about the Commit-Watchers mailing list