[html5] r7328 - [giow] (1) Make text track cues more forgiving: drop the concept of cues being ' [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Sep 11 15:49:49 PDT 2012


Author: ianh
Date: 2012-09-11 15:49:47 -0700 (Tue, 11 Sep 2012)
New Revision: 7328

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Make text track cues more forgiving: drop the concept of cues being 'associated' with something, and make .snapToLines and .line allow invalid values and just have those be ignored in the rendering.
Affected topics: Video Text Tracks

Modified: complete.html
===================================================================
--- complete.html	2012-09-11 21:59:07 UTC (rev 7327)
+++ complete.html	2012-09-11 22:49:47 UTC (rev 7328)
@@ -33879,28 +33879,41 @@
     the other active tracks.</p>
 
     <p>A <a href=#text-track-cue>text track cue</a> has a <dfn id=text-track-cue-computed-line-position>text track cue
-    computed line position</dfn> whose value is defined in terms of
-    the other aspects of the cue. If the <a href=#text-track-cue-line-position>text track cue line
-    position</a> is numeric, then that is the <a href=#text-track-cue-computed-line-position>text track cue
-    computed line position</a>. Otherwise, the <a href=#text-track-cue-line-position>text track cue
-    line position</a> is the special value <a href=#text-track-cue-automatic-line-position title="text track
-    cue automatic line position">auto</a>; if the <a href=#text-track-cue-snap-to-lines-flag>text track
-    cue snap-to-lines flag</a> of the <a href=#text-track-cue>text track cue</a>
-    is not set, the <a href=#text-track-cue-computed-line-position>text track cue computed line position</a>
-    is the value 100; otherwise, it is the value returned by the
-    following algorithm:</p>
+    computed line position</dfn> whose value is that returned by the
+    following algorithm, which is defined in terms of the other
+    aspects of the cue:</p>
 
-    <ol><li><p>Let <var title="">cue</var> be the <a href=#text-track-cue>text track
+    <ol><li><p>If the <a href=#text-track-cue-line-position>text track cue line position</a> is
+     numeric, the <a href=#text-track-cue-snap-to-lines-flag>text track cue snap-to-lines flag</a> of
+     the <a href=#text-track-cue>text track cue</a> is not set, and the <a href=#text-track-cue-line-position>text
+     track cue line position</a> is negative or greater than 100,
+     then return 100 and abort these steps.</li>
+
+     <li><p>If the <a href=#text-track-cue-line-position>text track cue line position</a> is numeric,
+     return the value of the <a href=#text-track-cue-line-position>text track cue line position</a>
+     and abort these steps. (Either the <a href=#text-track-cue-snap-to-lines-flag>text track cue
+     snap-to-lines flag</a> is set, so any value, not just those in
+     the range 0..100, is valid, or the value is in the range 0..100
+     and is thus valid regardless of the value of that flag.)</li>
+
+     <li><p>If the <a href=#text-track-cue-snap-to-lines-flag>text track cue snap-to-lines flag</a> of
+     the <a href=#text-track-cue>text track cue</a> is not set, return the value 100
+     and abort these steps. (The <a href=#text-track-cue-line-position>text track cue line
+     position</a> is the special value <a href=#text-track-cue-automatic-line-position title="text track cue
+     automatic line position">auto</a>.)</li>
+
+     <li><p>Let <var title="">cue</var> be the <a href=#text-track-cue>text track
      cue</a>.</li>
 
-     <li><p>If <var title="">cue</var> is not associated with a
-     <a href=#text-track>text track</a>, or if that <a href=#text-track>text track</a> is
-     not in the <a href=#list-of-text-tracks>list of text tracks</a> of a <a href=#media-element>media
-     element</a>, return −1 and abort these steps.</li>
+     <li><p>If <var title="">cue</var> is not in a <a href=#text-track-list-of-cues title="text
+     track list of cues">list of cues</a> of a <a href=#text-track>text
+     track</a>, or if that <a href=#text-track>text track</a> is not in the
+     <a href=#list-of-text-tracks>list of text tracks</a> of a <a href=#media-element>media element</a>,
+     return −1 and abort these steps.</li>
 
      <li><p>Let <var title="">track</var> be the <a href=#text-track>text
-     track</a> that the <var title="">cue</var> is associated
-     with.</li>
+     track</a> whose <a href=#text-track-list-of-cues title="text track list of cues">list of
+     cues</a> the <var title="">cue</var> is in.</li>
 
      <li><p>Let <var title="">n</var> be the number of <a href=#text-track title="text track">text tracks</a> whose <a href=#text-track-mode>text track
      mode</a> is <a href=#text-track-showing title="text track showing">showing</a>
@@ -33950,10 +33963,7 @@
    </dd>
 
   </dl><p>Each <a href=#text-track-cue>text track cue</a> has a corresponding
-  <code><a href=#texttrackcue>TextTrackCue</a></code> object, and can be associated with a
-  particular <a href=#text-track>text track</a>. Once a <a href=#text-track-cue>text track
-  cue</a> is associated with a particular <a href=#text-track>text track</a>,
-  the association is permanent. A <a href=#text-track-cue>text track cue</a>'s
+  <code><a href=#texttrackcue>TextTrackCue</a></code> object. A <a href=#text-track-cue>text track cue</a>'s
   in-memory representation can be dynamically changed through this
   <code><a href=#texttrackcue>TextTrackCue</a></code> API.</p>
 
@@ -34723,13 +34733,11 @@
    <dt><var title="">textTrack</var> . <code title=dom-TextTrack-addCue><a href=#dom-texttrack-addcue>addCue</a></code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Adds the given cue to <var title="">textTrack</var>'s <a href=#text-track-list-of-cues>text track list of cues</a>.</p>
-    <p>Throws an exception if the argument is associated with another <a href=#text-track>text track</a> or already in the list of cues.</p>
    </dd>
 
    <dt><var title="">textTrack</var> . <code title=dom-TextTrack-removeCue><a href=#dom-texttrack-removecue>removeCue</a></code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Removes the given cue from <var title="">textTrack</var>'s <a href=#text-track-list-of-cues>text track list of cues</a>.</p>
-    <p>Throws an exception if the argument is associated with another <a href=#text-track>text track</a> or not in the list of cues.</p>
    </dd>
 
   </dl><div class=impl>
@@ -34912,21 +34920,10 @@
   <hr><p>The <dfn id=dom-texttrack-addcue title=dom-TextTrack-addCue><code>addCue(<var title="">cue</var>)</code></dfn> method of <code><a href=#texttrack>TextTrack</a></code>
   objects, when invoked, must run the following steps:</p>
 
-  <ol><li><p>If the given <var title="">cue</var> is already associated
-   with a <a href=#text-track>text track</a> other than the method's
-   <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text track</a>, then throw
-   an <code><a href=#invalidstateerror>InvalidStateError</a></code> exception and abort these
-   steps.</li>
+  <ol><li><p>If the given <var title="">cue</var> is in a <a href=#text-track-list-of-cues>text
+   track list of cues</a>, then remove <var title="">cue</var> from
+   that <a href=#text-track-list-of-cues>text track list of cues</a>.</li>
 
-   <li><p>If the given <var title="">cue</var> is already listed in
-   the method's <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text
-   track</a>'s <a href=#text-track-list-of-cues>text track list of cues</a>, then throw an
-   <code><a href=#invalidstateerror>InvalidStateError</a></code> exception.</li>
-
-   <li><p>Associate <var title="">cue</var> with the method's
-   <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text track</a>, if it is
-   not currently associated with a <a href=#text-track>text track</a>.</li>
-
    <li><p>Add <var title="">cue</var> to the method's
    <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text track</a>'s
    <a href=#text-track-list-of-cues>text track list of cues</a>.</li>
@@ -34935,12 +34932,7 @@
   <code><a href=#texttrack>TextTrack</a></code> objects, when invoked, must run the
   following steps:</p>
 
-  <ol><li><p>If the given <var title="">cue</var> is not associated with
-   the method's <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text
-   track</a>, then throw an <code><a href=#invalidstateerror>InvalidStateError</a></code>
-   exception.</li>
-
-   <li><p>If the given <var title="">cue</var> is not currently listed
+  <ol><li><p>If the given <var title="">cue</var> is not currently listed
    in the method's <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text
    track</a>'s <a href=#text-track-list-of-cues>text track list of cues</a>, then throw a
    <code><a href=#notfounderror>NotFoundError</a></code> exception.</li>
@@ -35166,8 +35158,7 @@
   <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>
+  <ol><li><p>Create a new <a href=#text-track-cue>text track cue</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-start-time>text track cue start
    time</a> be the value of the <var title="">startTime</var>
@@ -35218,9 +35209,10 @@
 
   </ol><p>The <dfn id=dom-texttrackcue-track title=dom-TextTrackCue-track><code>track</code></dfn>
   attribute, on getting, must return the <code><a href=#texttrack>TextTrack</a></code> object
-  of the <a href=#text-track>text track</a> with which the <a href=#text-track-cue>text track
-  cue</a> that the <code><a href=#texttrackcue>TextTrackCue</a></code> object represents is
-  associated, if any; or null otherwise.</p>
+  of the <a href=#text-track>text track</a> in whose <a href=#text-track-list-of-cues title="text track list
+  of cues">list of cues</a> the <a href=#text-track-cue>text track cue</a> that
+  the <code><a href=#texttrackcue>TextTrackCue</a></code> object represents finds itself, if
+  any; or null otherwise.</p>
 
   <p>The <dfn id=dom-texttrackcue-id title=dom-TextTrackCue-id><code>id</code></dfn>
   attribute, on getting, must return the <a href=#text-track-cue-identifier>text track cue
@@ -35280,11 +35272,8 @@
   <p>The <dfn id=dom-texttrackcue-line title=dom-TextTrackCue-line><code>line</code></dfn>
   attribute, on getting, must return the <a href=#text-track-cue-computed-line-position>text track cue computed
   line position</a> of the <a href=#text-track-cue>text track cue</a> that the
-  <code><a href=#texttrackcue>TextTrackCue</a></code> object represents. On setting, if the
-  <a href=#text-track-cue-snap-to-lines-flag>text track cue snap-to-lines flag</a> is not set, and the
-  new value is negative or greater than 100, then throw an
-  <code><a href=#indexsizeerror>IndexSizeError</a></code> exception. Otherwise, set the <a href=#text-track-cue-line-position>text
-  track cue line position</a> to the new value.</p>
+  <code><a href=#texttrackcue>TextTrackCue</a></code> object represents. On setting, set the
+  <a href=#text-track-cue-line-position>text track cue line position</a> to the new value.</p>
 
   <p class=note>There is no way to explicitly set the <a href=#text-track-cue-line-position>text
   track cue line position</a> to the special default <a href=#text-track-cue-automatic-line-position title="text track cue automatic line position">auto</a>

Modified: index
===================================================================
--- index	2012-09-11 21:59:07 UTC (rev 7327)
+++ index	2012-09-11 22:49:47 UTC (rev 7328)
@@ -33879,28 +33879,41 @@
     the other active tracks.</p>
 
     <p>A <a href=#text-track-cue>text track cue</a> has a <dfn id=text-track-cue-computed-line-position>text track cue
-    computed line position</dfn> whose value is defined in terms of
-    the other aspects of the cue. If the <a href=#text-track-cue-line-position>text track cue line
-    position</a> is numeric, then that is the <a href=#text-track-cue-computed-line-position>text track cue
-    computed line position</a>. Otherwise, the <a href=#text-track-cue-line-position>text track cue
-    line position</a> is the special value <a href=#text-track-cue-automatic-line-position title="text track
-    cue automatic line position">auto</a>; if the <a href=#text-track-cue-snap-to-lines-flag>text track
-    cue snap-to-lines flag</a> of the <a href=#text-track-cue>text track cue</a>
-    is not set, the <a href=#text-track-cue-computed-line-position>text track cue computed line position</a>
-    is the value 100; otherwise, it is the value returned by the
-    following algorithm:</p>
+    computed line position</dfn> whose value is that returned by the
+    following algorithm, which is defined in terms of the other
+    aspects of the cue:</p>
 
-    <ol><li><p>Let <var title="">cue</var> be the <a href=#text-track-cue>text track
+    <ol><li><p>If the <a href=#text-track-cue-line-position>text track cue line position</a> is
+     numeric, the <a href=#text-track-cue-snap-to-lines-flag>text track cue snap-to-lines flag</a> of
+     the <a href=#text-track-cue>text track cue</a> is not set, and the <a href=#text-track-cue-line-position>text
+     track cue line position</a> is negative or greater than 100,
+     then return 100 and abort these steps.</li>
+
+     <li><p>If the <a href=#text-track-cue-line-position>text track cue line position</a> is numeric,
+     return the value of the <a href=#text-track-cue-line-position>text track cue line position</a>
+     and abort these steps. (Either the <a href=#text-track-cue-snap-to-lines-flag>text track cue
+     snap-to-lines flag</a> is set, so any value, not just those in
+     the range 0..100, is valid, or the value is in the range 0..100
+     and is thus valid regardless of the value of that flag.)</li>
+
+     <li><p>If the <a href=#text-track-cue-snap-to-lines-flag>text track cue snap-to-lines flag</a> of
+     the <a href=#text-track-cue>text track cue</a> is not set, return the value 100
+     and abort these steps. (The <a href=#text-track-cue-line-position>text track cue line
+     position</a> is the special value <a href=#text-track-cue-automatic-line-position title="text track cue
+     automatic line position">auto</a>.)</li>
+
+     <li><p>Let <var title="">cue</var> be the <a href=#text-track-cue>text track
      cue</a>.</li>
 
-     <li><p>If <var title="">cue</var> is not associated with a
-     <a href=#text-track>text track</a>, or if that <a href=#text-track>text track</a> is
-     not in the <a href=#list-of-text-tracks>list of text tracks</a> of a <a href=#media-element>media
-     element</a>, return −1 and abort these steps.</li>
+     <li><p>If <var title="">cue</var> is not in a <a href=#text-track-list-of-cues title="text
+     track list of cues">list of cues</a> of a <a href=#text-track>text
+     track</a>, or if that <a href=#text-track>text track</a> is not in the
+     <a href=#list-of-text-tracks>list of text tracks</a> of a <a href=#media-element>media element</a>,
+     return −1 and abort these steps.</li>
 
      <li><p>Let <var title="">track</var> be the <a href=#text-track>text
-     track</a> that the <var title="">cue</var> is associated
-     with.</li>
+     track</a> whose <a href=#text-track-list-of-cues title="text track list of cues">list of
+     cues</a> the <var title="">cue</var> is in.</li>
 
      <li><p>Let <var title="">n</var> be the number of <a href=#text-track title="text track">text tracks</a> whose <a href=#text-track-mode>text track
      mode</a> is <a href=#text-track-showing title="text track showing">showing</a>
@@ -33950,10 +33963,7 @@
    </dd>
 
   </dl><p>Each <a href=#text-track-cue>text track cue</a> has a corresponding
-  <code><a href=#texttrackcue>TextTrackCue</a></code> object, and can be associated with a
-  particular <a href=#text-track>text track</a>. Once a <a href=#text-track-cue>text track
-  cue</a> is associated with a particular <a href=#text-track>text track</a>,
-  the association is permanent. A <a href=#text-track-cue>text track cue</a>'s
+  <code><a href=#texttrackcue>TextTrackCue</a></code> object. A <a href=#text-track-cue>text track cue</a>'s
   in-memory representation can be dynamically changed through this
   <code><a href=#texttrackcue>TextTrackCue</a></code> API.</p>
 
@@ -34723,13 +34733,11 @@
    <dt><var title="">textTrack</var> . <code title=dom-TextTrack-addCue><a href=#dom-texttrack-addcue>addCue</a></code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Adds the given cue to <var title="">textTrack</var>'s <a href=#text-track-list-of-cues>text track list of cues</a>.</p>
-    <p>Throws an exception if the argument is associated with another <a href=#text-track>text track</a> or already in the list of cues.</p>
    </dd>
 
    <dt><var title="">textTrack</var> . <code title=dom-TextTrack-removeCue><a href=#dom-texttrack-removecue>removeCue</a></code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Removes the given cue from <var title="">textTrack</var>'s <a href=#text-track-list-of-cues>text track list of cues</a>.</p>
-    <p>Throws an exception if the argument is associated with another <a href=#text-track>text track</a> or not in the list of cues.</p>
    </dd>
 
   </dl><div class=impl>
@@ -34912,21 +34920,10 @@
   <hr><p>The <dfn id=dom-texttrack-addcue title=dom-TextTrack-addCue><code>addCue(<var title="">cue</var>)</code></dfn> method of <code><a href=#texttrack>TextTrack</a></code>
   objects, when invoked, must run the following steps:</p>
 
-  <ol><li><p>If the given <var title="">cue</var> is already associated
-   with a <a href=#text-track>text track</a> other than the method's
-   <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text track</a>, then throw
-   an <code><a href=#invalidstateerror>InvalidStateError</a></code> exception and abort these
-   steps.</li>
+  <ol><li><p>If the given <var title="">cue</var> is in a <a href=#text-track-list-of-cues>text
+   track list of cues</a>, then remove <var title="">cue</var> from
+   that <a href=#text-track-list-of-cues>text track list of cues</a>.</li>
 
-   <li><p>If the given <var title="">cue</var> is already listed in
-   the method's <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text
-   track</a>'s <a href=#text-track-list-of-cues>text track list of cues</a>, then throw an
-   <code><a href=#invalidstateerror>InvalidStateError</a></code> exception.</li>
-
-   <li><p>Associate <var title="">cue</var> with the method's
-   <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text track</a>, if it is
-   not currently associated with a <a href=#text-track>text track</a>.</li>
-
    <li><p>Add <var title="">cue</var> to the method's
    <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text track</a>'s
    <a href=#text-track-list-of-cues>text track list of cues</a>.</li>
@@ -34935,12 +34932,7 @@
   <code><a href=#texttrack>TextTrack</a></code> objects, when invoked, must run the
   following steps:</p>
 
-  <ol><li><p>If the given <var title="">cue</var> is not associated with
-   the method's <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text
-   track</a>, then throw an <code><a href=#invalidstateerror>InvalidStateError</a></code>
-   exception.</li>
-
-   <li><p>If the given <var title="">cue</var> is not currently listed
+  <ol><li><p>If the given <var title="">cue</var> is not currently listed
    in the method's <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text
    track</a>'s <a href=#text-track-list-of-cues>text track list of cues</a>, then throw a
    <code><a href=#notfounderror>NotFoundError</a></code> exception.</li>
@@ -35166,8 +35158,7 @@
   <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>
+  <ol><li><p>Create a new <a href=#text-track-cue>text track cue</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-start-time>text track cue start
    time</a> be the value of the <var title="">startTime</var>
@@ -35218,9 +35209,10 @@
 
   </ol><p>The <dfn id=dom-texttrackcue-track title=dom-TextTrackCue-track><code>track</code></dfn>
   attribute, on getting, must return the <code><a href=#texttrack>TextTrack</a></code> object
-  of the <a href=#text-track>text track</a> with which the <a href=#text-track-cue>text track
-  cue</a> that the <code><a href=#texttrackcue>TextTrackCue</a></code> object represents is
-  associated, if any; or null otherwise.</p>
+  of the <a href=#text-track>text track</a> in whose <a href=#text-track-list-of-cues title="text track list
+  of cues">list of cues</a> the <a href=#text-track-cue>text track cue</a> that
+  the <code><a href=#texttrackcue>TextTrackCue</a></code> object represents finds itself, if
+  any; or null otherwise.</p>
 
   <p>The <dfn id=dom-texttrackcue-id title=dom-TextTrackCue-id><code>id</code></dfn>
   attribute, on getting, must return the <a href=#text-track-cue-identifier>text track cue
@@ -35280,11 +35272,8 @@
   <p>The <dfn id=dom-texttrackcue-line title=dom-TextTrackCue-line><code>line</code></dfn>
   attribute, on getting, must return the <a href=#text-track-cue-computed-line-position>text track cue computed
   line position</a> of the <a href=#text-track-cue>text track cue</a> that the
-  <code><a href=#texttrackcue>TextTrackCue</a></code> object represents. On setting, if the
-  <a href=#text-track-cue-snap-to-lines-flag>text track cue snap-to-lines flag</a> is not set, and the
-  new value is negative or greater than 100, then throw an
-  <code><a href=#indexsizeerror>IndexSizeError</a></code> exception. Otherwise, set the <a href=#text-track-cue-line-position>text
-  track cue line position</a> to the new value.</p>
+  <code><a href=#texttrackcue>TextTrackCue</a></code> object represents. On setting, set the
+  <a href=#text-track-cue-line-position>text track cue line position</a> to the new value.</p>
 
   <p class=note>There is no way to explicitly set the <a href=#text-track-cue-line-position>text
   track cue line position</a> to the special default <a href=#text-track-cue-automatic-line-position title="text track cue automatic line position">auto</a>

Modified: source
===================================================================
--- source	2012-09-11 21:59:07 UTC (rev 7327)
+++ source	2012-09-11 22:49:47 UTC (rev 7328)
@@ -37094,30 +37094,43 @@
     the other active tracks.</p>
 
     <p>A <span>text track cue</span> has a <dfn>text track cue
-    computed line position</dfn> whose value is defined in terms of
-    the other aspects of the cue. If the <span>text track cue line
-    position</span> is numeric, then that is the <span>text track cue
-    computed line position</span>. Otherwise, the <span>text track cue
-    line position</span> is the special value <span title="text track
-    cue automatic line position">auto</span>; if the <span>text track
-    cue snap-to-lines flag</span> of the <span>text track cue</span>
-    is not set, the <span>text track cue computed line position</span>
-    is the value 100; otherwise, it is the value returned by the
-    following algorithm:</p>
+    computed line position</dfn> whose value is that returned by the
+    following algorithm, which is defined in terms of the other
+    aspects of the cue:</p>
 
     <ol>
 
+     <li><p>If the <span>text track cue line position</span> is
+     numeric, the <span>text track cue snap-to-lines flag</span> of
+     the <span>text track cue</span> is not set, and the <span>text
+     track cue line position</span> is negative or greater than 100,
+     then return 100 and abort these steps.</p></li>
+
+     <li><p>If the <span>text track cue line position</span> is numeric,
+     return the value of the <span>text track cue line position</span>
+     and abort these steps. (Either the <span>text track cue
+     snap-to-lines flag</span> is set, so any value, not just those in
+     the range 0..100, is valid, or the value is in the range 0..100
+     and is thus valid regardless of the value of that flag.)</p></li>
+
+     <li><p>If the <span>text track cue snap-to-lines flag</span> of
+     the <span>text track cue</span> is not set, return the value 100
+     and abort these steps. (The <span>text track cue line
+     position</span> is the special value <span title="text track cue
+     automatic line position">auto</span>.)</p></li>
+
      <li><p>Let <var title="">cue</var> be the <span>text track
      cue</span>.</p></li>
 
-     <li><p>If <var title="">cue</var> is not associated with a
-     <span>text track</span>, or if that <span>text track</span> is
-     not in the <span>list of text tracks</span> of a <span>media
-     element</span>, return &#x2212;1 and abort these steps.</p></li>
+     <li><p>If <var title="">cue</var> is not in a <span title="text
+     track list of cues">list of cues</span> of a <span>text
+     track</span>, or if that <span>text track</span> is not in the
+     <span>list of text tracks</span> of a <span>media element</span>,
+     return &#x2212;1 and abort these steps.</p></li>
 
      <li><p>Let <var title="">track</var> be the <span>text
-     track</span> that the <var title="">cue</var> is associated
-     with.</p></li>
+     track</span> whose <span title="text track list of cues">list of
+     cues</span> the <var title="">cue</var> is in.</p></li>
 
      <li><p>Let <var title="">n</var> be the number of <span
      title="text track">text tracks</span> whose <span>text track
@@ -37174,10 +37187,7 @@
   </dl>
 
   <p>Each <span>text track cue</span> has a corresponding
-  <code>TextTrackCue</code> object, and can be associated with a
-  particular <span>text track</span>. Once a <span>text track
-  cue</span> is associated with a particular <span>text track</span>,
-  the association is permanent. A <span>text track cue</span>'s
+  <code>TextTrackCue</code> object. A <span>text track cue</span>'s
   in-memory representation can be dynamically changed through this
   <code>TextTrackCue</code> API.</p>
 
@@ -38063,13 +38073,11 @@
    <dt><var title="">textTrack</var> . <code title="dom-TextTrack-addCue">addCue</code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Adds the given cue to <var title="">textTrack</var>'s <span>text track list of cues</span>.</p>
-    <p>Throws an exception if the argument is associated with another <span>text track</span> or already in the list of cues.</p>
    </dd>
 
    <dt><var title="">textTrack</var> . <code title="dom-TextTrack-removeCue">removeCue</code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Removes the given cue from <var title="">textTrack</var>'s <span>text track list of cues</span>.</p>
-    <p>Throws an exception if the argument is associated with another <span>text track</span> or not in the list of cues.</p>
    </dd>
 
   </dl>
@@ -38288,21 +38296,10 @@
 
   <ol>
 
-   <li><p>If the given <var title="">cue</var> is already associated
-   with a <span>text track</span> other than the method's
-   <code>TextTrack</code> object's <span>text track</span>, then throw
-   an <code>InvalidStateError</code> exception and abort these
-   steps.</p></li>
+   <li><p>If the given <var title="">cue</var> is in a <span>text
+   track list of cues</span>, then remove <var title="">cue</var> from
+   that <span>text track list of cues</span>.</p></li>
 
-   <li><p>If the given <var title="">cue</var> is already listed in
-   the method's <code>TextTrack</code> object's <span>text
-   track</span>'s <span>text track list of cues</span>, then throw an
-   <code>InvalidStateError</code> exception.</p></li>
-
-   <li><p>Associate <var title="">cue</var> with the method's
-   <code>TextTrack</code> object's <span>text track</span>, if it is
-   not currently associated with a <span>text track</span>.</p></li>
-
    <li><p>Add <var title="">cue</var> to the method's
    <code>TextTrack</code> object's <span>text track</span>'s
    <span>text track list of cues</span>.</p></li>
@@ -38317,11 +38314,6 @@
 
   <ol>
 
-   <li><p>If the given <var title="">cue</var> is not associated with
-   the method's <code>TextTrack</code> object's <span>text
-   track</span>, then throw an <code>InvalidStateError</code>
-   exception.</p></li>
-
    <li><p>If the given <var title="">cue</var> is not currently listed
    in the method's <code>TextTrack</code> object's <span>text
    track</span>'s <span>text track list of cues</span>, then throw a
@@ -38573,8 +38565,7 @@
 
   <ol>
 
-   <li><p>Create a new <span>text track cue</span> that is not
-   associated with any <span>text track</span>. Let <var
+   <li><p>Create a new <span>text track cue</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 start
@@ -38628,9 +38619,10 @@
 
   <p>The <dfn title="dom-TextTrackCue-track"><code>track</code></dfn>
   attribute, on getting, must return the <code>TextTrack</code> object
-  of the <span>text track</span> with which the <span>text track
-  cue</span> that the <code>TextTrackCue</code> object represents is
-  associated, if any; or null otherwise.</p>
+  of the <span>text track</span> in whose <span title="text track list
+  of cues">list of cues</span> the <span>text track cue</span> that
+  the <code>TextTrackCue</code> object represents finds itself, if
+  any; or null otherwise.</p>
 
   <p>The <dfn title="dom-TextTrackCue-id"><code>id</code></dfn>
   attribute, on getting, must return the <span>text track cue
@@ -38697,15 +38689,11 @@
   flag</span> must be set if the new value is true, and must be unset
   otherwise.</p>
 
-  <p>The <dfn
-  title="dom-TextTrackCue-line"><code>line</code></dfn>
+  <p>The <dfn title="dom-TextTrackCue-line"><code>line</code></dfn>
   attribute, on getting, must return the <span>text track cue computed
   line position</span> of the <span>text track cue</span> that the
-  <code>TextTrackCue</code> object represents. On setting, if the
-  <span>text track cue snap-to-lines flag</span> is not set, and the
-  new value is negative or greater than 100, then throw an
-  <code>IndexSizeError</code> exception. Otherwise, set the <span>text
-  track cue line position</span> to the new value.</p>
+  <code>TextTrackCue</code> object represents. On setting, set the
+  <span>text track cue line position</span> to the new value.</p>
 
   <p class="note">There is no way to explicitly set the <span>text
   track cue line position</span> to the special default <span
@@ -39865,8 +39853,7 @@
    -->.)</p></li>
 
    <li><p><i>Cue creation</i>: Let <var title="">cue</var> be a new
-   <span>text track cue</span> associated with <var
-   title="">output</var>'s <span>text track</span>.</p></li>
+   <span>text track cue</span>.</p></li>
 
    <li><p>Let <var title="">cue</var>'s <span>text track cue
    identifier</span> be the empty string.</p></li>




More information about the Commit-Watchers mailing list