HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
671114105[Gecko] [Internet Explorer] [Opera] [Webkit] Make TextTrackCue more mutable.2011-10-20 05:50
@@ -34993,36 +34993,32 @@ window.onbeforeunload = function () {
   return null.</p>
 
   </div>
 
   <hr>
 
   <pre class="idl">
 [<span title="dom-TextTrackCue">Constructor</span>(DOMString id, double startTime, double endTime, DOMString text, optional DOMString settings, optional boolean pauseOnExit)]
 interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {
   readonly attribute <span>TextTrack</span>? <span title="dom-TextTrackCue-track">track</span>;
-  readonly attribute DOMString <span title="dom-TextTrackCue-id">id</span>;
 
-  readonly attribute double <span title="dom-TextTrackCue-startTime">startTime</span>;
-  readonly attribute double <span title="dom-TextTrackCue-endTime">endTime</span>;
-  readonly attribute boolean <span title="dom-TextTrackCue-pauseOnExit">pauseOnExit</span>;
-
-<!--END w3c-html--><!--TTVTT-->
-  readonly attribute DOMString <span title="dom-TextTrackCue-direction">direction</span>;
-  readonly attribute boolean <span title="dom-TextTrackCue-snapToLines">snapToLines</span>;
-  readonly attribute long <span title="dom-TextTrackCue-linePosition">linePosition</span>;
-  readonly attribute long <span title="dom-TextTrackCue-textPosition">textPosition</span>;
-  readonly attribute long <span title="dom-TextTrackCue-size">size</span>;
-  readonly attribute DOMString <span title="dom-TextTrackCue-alignment">alignment</span>;
-<!--START w3c-html--><!--TTVTT-->
-
-  DOMString <span title="dom-TextTrackCue-getCueAsSource">getCueAsSource</span>();
+           attribute DOMString <span title="dom-TextTrackCue-id">id</span>;
+           attribute double <span title="dom-TextTrackCue-startTime">startTime</span>;
+           attribute double <span title="dom-TextTrackCue-endTime">endTime</span>;
+           attribute boolean <span title="dom-TextTrackCue-pauseOnExit">pauseOnExit</span>;
+           attribute DOMString <span title="dom-TextTrackCue-direction">direction</span>;
+           attribute boolean <span title="dom-TextTrackCue-snapToLines">snapToLines</span>;
+           attribute long <span title="dom-TextTrackCue-linePosition">linePosition</span>;
+           attribute long <span title="dom-TextTrackCue-textPosition">textPosition</span>;
+           attribute long <span title="dom-TextTrackCue-size">size</span>;
+           attribute DOMString <span title="dom-TextTrackCue-alignment">alignment</span>;
+           attribute DOMString <span title="dom-TextTrackCue-cueAsSource">cueAsSource</span>();
   <span>DocumentFragment</span> <span title="dom-TextTrackCue-getCueAsHTML">getCueAsHTML</span>();
 
   [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-TextTrackCue-onenter">onenter</span>;
   [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-TextTrackCue-onexit">onexit</span>;
 };</pre>
 
   <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>
    <dd>
@@ -35035,105 +35031,114 @@ interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {
     <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>
    <dd>
     <p>Returns the <code>TextTrack</code> object to which this
     <span>text track cue</span> belongs, if any, or null
     otherwise.</p>
    </dd>
 
-   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-id">id</span></dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-id">id</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <span>text track cue identifier</span>.</p>
+    <p>Can be set.</p>
    </dd>
 
-   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-startTime">startTime</span></dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-startTime">startTime</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <span>text track cue start time</span>, in seconds.</p>
+    <p>Can be set.</p>
    </dd>
 
-   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-endTime">endTime</span></dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-endTime">endTime</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <span>text track cue end time</span>, in seconds.</p>
+    <p>Can be set.</p>
    </dd>
 
-   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-pauseOnExit">pauseOnExit</span></dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-pauseOnExit">pauseOnExit</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns true if the <span>text track cue pause-on-exit flag</span> is set, false otherwise.</p>
+    <p>Can be set.</p>
    </dd>
 
-<!--END w3c-html--><!--TTVTT-->
-   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-direction">direction</span></dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-direction">direction</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns a string representing the <span>text track cue writing direction</span>, as follows:</p>
     <dl class="switch">
      <dt>If it is <span title="text track cue horizontal writing direction">horizontal</span></dt>
      <dd><p>The string "<code title="">horizontal</code>".</p></dd>
      <dt>If it is <span title="text track cue vertical growing left writing direction">vertical growing left</span></dt>
      <dd><p>The string "<code title="">vertical</code>".</p></dd>
      <dt>If it is <span title="text track cue vertical growing right writing direction">vertical growing right</span></dt>
      <dd><p>The string "<code title="">vertical-lr</code>".</p></dd>
     </dl>
+    <p>Can be set.</p>
    </dd>
 
-   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-snapToLines">snapToLines</span></dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-snapToLines">snapToLines</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns true if the <span>text track cue snap-to-lines flag</span> is set, false otherwise.</p>
+    <p>Can be set.</p>
    </dd>
 
-   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-linePosition">linePosition</span></dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-linePosition">linePosition</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <span>text track cue line position</span>. In the
     case of the value being <span title="text track cue automatic
     line position">auto</span>, the appropriate default is returned.</p>
+    <p>Can be set.</p>
    </dd>
 
-   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-textPosition">textPosition</span></dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-textPosition">textPosition</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <span>text track cue text position</span>.</p>
+    <p>Can be set.</p>
    </dd>
 
-   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-size">size</span></dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-size">size</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <span>text track cue size</span>.</p>
+    <p>Can be set.</p>
    </dd>
 
-   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-alignment">alignment</span></dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-alignment">alignment</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns a string representing the <span>text track cue alignment</span>, as follows:</p>
     <dl class="switch">
      <dt>If it is <span title="text track cue start alignment">start alignment</span></dt>
      <dd><p>The string "<code title="">start</code>".</p></dd>
      <dt>If it is <span title="text track cue middle alignment">middle alignment</span></dt>
      <dd><p>The string "<code title="">middle</code>".</p></dd>
      <dt>If it is <span title="text track cue end alignment">end alignment</span></dt>
      <dd><p>The string "<code title="">end</code>".</p></dd>
     </dl>
+    <p>Can be set.</p>
    </dd>
-<!--START w3c-html--><!--TTVTT-->
 
-   <dt><var title="">source</var> = <var title="">cue</var> . <span title="dom-TextTrackCue-getCueAsSource">getCueAsSource</span>()</dt>
+   <dt><var title="">cue</var> . <span title="dom-TextTrackCue-cueAsSource">cueAsSource</span> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <span>text track cue text</span> in raw unparsed form.</p>
+    <p>Can be set.</p>
    </dd>
 
    <dt><var title="">fragment</var> = <var title="">cue</var> . <span title="dom-TextTrackCue-getCueAsHTML">getCueAsHTML</span>()</dt>
    <dd>
     <p>Returns the <span>text track cue text</span> as a <code>DocumentFragment</code> of <span>HTML elements</span> and other DOM nodes.</p>
+    <p>Can be set.</p>
    </dd>
 
   </dl>
 
   <div class="impl">
 
-<!--END w3c-html--><!--TTVTT-->
   <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>
 
   <ol>
 
    <li><p>Create a new <span>text track cue</span> that is not
@@ -35194,150 +35199,183 @@ interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {
    title="">input</var>, initially pointing at the start of the
    string.</p></li>
 
    <li><p><span>Parse the WebVTT settings</span> for <var
    title="">cue</var>.</p></li>
 
    <li><p>Return the <code>TextTrackCue</code> object representing
    <var title="">cue</var>.</p></li>
 
   </ol>
-<!--START w3c-html--><!--TTVTT-->
 
   <p>The <dfn title="dom-TextTrackCue-track"><code>track</code></dfn>
-  attribute 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>
+  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>
 
   <p>The <dfn title="dom-TextTrackCue-id"><code>id</code></dfn>
-  attribute must return the <span>text track cue identifier</span> of
-  the <span>text track cue</span> that the <code>TextTrackCue</code>
-  object represents.</p>
+  attribute, on getting, must return the <span>text track cue
+  identifier</span> of the <span>text track cue</span> that the
+  <code>TextTrackCue</code> object represents. On setting, the <span>text track cue
+  identifier</span> must be set to the new value.</p>
 
   <p>The <dfn
   title="dom-TextTrackCue-startTime"><code>startTime</code></dfn>
-  attribute must return the <span>text track cue start time</span> of
-  the <span>text track cue</span> that the <code>TextTrackCue</code>
-  object represents, in seconds.</p>
+  attribute, on getting, must return the <span>text track cue start
+  time</span> of the <span>text track cue</span> that the
+  <code>TextTrackCue</code> object represents, in seconds. On setting, the <span>text track cue start
+  time</span> must be set to the new value, interpreted in seconds.</p>
 
   <p>The <dfn
   title="dom-TextTrackCue-endTime"><code>endTime</code></dfn>
-  attribute must return the <span>text track cue end time</span> of
-  the <span>text track cue</span> that the <code>TextTrackCue</code>
-  object represents, in seconds.</p>
+  attribute, on getting, must return the <span>text track cue end
+  time</span> of the <span>text track cue</span> that the
+  <code>TextTrackCue</code> object represents, in seconds. On setting, the <span>text track cue end
+  time</span> must be set to the new value, interpreted in seconds.</p>
 
   <p>The <dfn
   title="dom-TextTrackCue-pauseOnExit"><code>pauseOnExit</code></dfn>
-  attribute must return true if the <span>text track cue
+  attribute, on getting, must return true if the <span>text track cue
   pause-on-exit flag</span> of the <span>text track cue</span> that
   the <code>TextTrackCue</code> object represents is set; or false
+  otherwise. On setting, the <span>text track cue pause-on-exit
+  flag</span> must be set if the new value is true, and must be unset
   otherwise.</p>
 
   <p>The <dfn
   title="dom-TextTrackCue-direction"><code>direction</code></dfn>
-  attribute must return the string from the second cell of the row in
-  the table below whose first cell is the <span>text track cue
-  writing direction</span> of the <span>text track cue</span> that the
-  <code>TextTrackCue</code> object represents:</p>
+  attribute, on getting, must return the string from the second cell
+  of the row in the table below whose first cell is the <span>text
+  track cue writing direction</span> of the <span>text track
+  cue</span> that the <code>TextTrackCue</code> object represents:</p>
 
   <table>
    <thead>
     <tr> <th> <span>Text track cue writing direction</span>
          <th> <code title="dom-TextTrackCue-direction">direction</code> value
    <tbody>
     <tr> <td> <span title="text track cue horizontal writing direction">Horizontal</span>
          <td> "<code title="">horizontal</code>"
     <tr> <td> <span title="text track cue vertical growing left writing direction">Vertical growing left</span>
          <td> "<code title="">vertical</code>"
     <tr> <td> <span title="text track cue vertical growing right writing direction">Vertical growing right</span>
          <td> "<code title="">vertical-lr</code>"
   </table>
 
-<!--END w3c-html--><!--TTVTT-->
+  <p>On setting, the <span>text track cue writing direction</span>
+  must be set to the value given in the first cell of the row in the
+  table above whose second cell is a <span>case-sensitive</span> match
+  for the new value, if any. If none of the values match, then the
+  user agent must instead throw a <code>SyntaxError</code>
+  exception.</p>
+
   <p>The <dfn
   title="dom-TextTrackCue-snapToLines"><code>snapToLines</code></dfn>
-  attribute must return true if the <span>text track cue
+  attribute, on getting, must return true if the <span>text track cue
   snap-to-lines flag</span> of the <span>text track cue</span> that
   the <code>TextTrackCue</code> object represents is set; or false
+  otherwise. On setting, the <span>text track cue snap-to-lines
+  flag</span> must be set if the new value is true, and must be unset
   otherwise.</p>
 
   <p>The <dfn
   title="dom-TextTrackCue-linePosition"><code>linePosition</code></dfn>
-  attribute must return the <span>text track cue line position</span>
-  of the <span>text track cue</span> that the
+  attribute, on getting, must return the <span>text track cue line
+  position</span> of the <span>text track cue</span> that the
   <code>TextTrackCue</code> object represents, if that value is
-  numeric. Otherwise, the value 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> that the <code>TextTrackCue</code> object
-  represents is not set, the attribute must return the value 100;
-  otherwise, it must return the value returned by the following
-  algorithm:</p>
+  numeric. Otherwise, the value 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> that the <code>TextTrackCue</code> object represents is
+  not set, the attribute must return the value 100; otherwise, it must
+  return the value returned by the following algorithm:</p>
 
   <ol>
 
    <li><p>Let <var title="">cue</var> be the <span>text track
    cue</span> that the <code>TextTrackCue</code> object
    represents.</p></li>
 
    <li><p>If <var title="">cue</var> is not associated with a
    <span>text track</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>
+   <li><p>Let <var title="">track</var> be the <span>text track</span>
+   that the <var title="">cue</var> is associated with.</p></li>
 
-   <li><p>Let <var title="">n</var> be the number of <span
-   title="text track">text tracks</span> whose <span>text track
-   mode</span> is <span title="text track showing">showing</span> or
-   <span title="text track showing by default">showing by
-   default</span> and that are in the <span>media element</span>'s
-   <span>list of text tracks</span> before <var
-   title="">track</var>.</p></li>
+   <li><p>Let <var title="">n</var> be the number of <span title="text
+   track">text tracks</span> whose <span>text track mode</span> is
+   <span title="text track showing">showing</span> or <span
+   title="text track showing by default">showing by default</span> and
+   that are in the <span>media element</span>'s <span>list of text
+   tracks</span> before <var title="">track</var>.</p></li>
 
    <li><p>Return <var title="">n</var>.</p></li>
 
   </ol>
 
+  <p>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>
+
+  <p class="note">There is no way to explicitly set the <span>text
+  track cue line position</span> to the special default <span
+  title="text track cue automatic line position">auto</span>
+  value.</p>
+
   <p>The <dfn
   title="dom-TextTrackCue-textPosition"><code>textPosition</code></dfn>
-  attribute must return the <span>text track cue text position</span>
-  of the <span>text track cue</span> that the
-  <code>TextTrackCue</code> object represents.</p>
+  attribute, on getting, must return the <span>text track cue text
+  position</span> of the <span>text track cue</span> that the
+  <code>TextTrackCue</code> object represents. On setting, if the new
+  value is negative or greater than 100, then throw an
+  <code>IndexSizeError</code> exception. Otherwise, set the <span>text
+  track cue text position</span> to the new value.</p>
 
   <p>The <dfn title="dom-TextTrackCue-size"><code>size</code></dfn>
-  attribute must return the <span>text track cue size</span> of the
-  <span>text track cue</span> that the <code>TextTrackCue</code>
-  object represents.</p>
+  attribute, on getting, must return the <span>text track cue
+  size</span> of the <span>text track cue</span> that the
+  <code>TextTrackCue</code> object represents. On setting, if the new
+  value is negative or greater than 100, then throw an
+  <code>IndexSizeError</code> exception. Otherwise, set the <span>text
+  track cue size</span> to the new value.</p>
 
   <p>The <dfn
   title="dom-TextTrackCue-alignment"><code>alignment</code></dfn>
-  attribute must return the string from the second cell of the row in
-  the table below whose first cell is the <span>text track cue
-  alignment</span> of the <span>text track cue</span> that the
-  <code>TextTrackCue</code> object represents:</p>
+  attribute, on getting, must return the string from the second cell
+  of the row in the table below whose first cell is the <span>text
+  track cue alignment</span> of the <span>text track cue</span> that
+  the <code>TextTrackCue</code> object represents:</p>
 
   <table>
    <thead>
     <tr> <th><span>Text track cue alignment</span> <th> <code title="dom-TextTrackCue-alignment">alignment</code> value
    <tbody>
     <tr> <td><span title="text track cue start alignment">Start alignment</span> <td> "<code title="">start</code>"
     <tr> <td><span title="text track cue middle alignment">Middle alignment</span> <td> "<code title="">middle</code>"
     <tr> <td><span title="text track cue end alignment">End alignment</span> <td> "<code title="">end</code>"
   </table>
-<!--START w3c-html--><!--TTVTT-->
+
+  <p>On setting, the <span>text track cue alignment</span> must be set
+  to the value given in the first cell of the row in the table above
+  whose second cell is a <span>case-sensitive</span> match for the new
+  value, if any. If none of the values match, then the user agent must
+  instead throw a <code>SyntaxError</code> exception.</p>
 
   <p>The <dfn
-  title="dom-TextTrackCue-getCueAsSource"><code>getCueAsSource()</code></dfn>
-  method must return the raw <span>text track cue text</span>.</p>
+  title="dom-TextTrackCue-cueAsSource"><code>cueAsSource</code></dfn>
+  attribute, on getting, must return the raw <span>text track cue
+  text</span> of the <span>text track cue</span> that the
+  <code>TextTrackCue</code> object represents. On setting, the
+  <span>text track cue text</span> must be set to the new value.</p>
 
   <p>The <dfn
   title="dom-TextTrackCue-getCueAsHTML"><code>getCueAsHTML()</code></dfn>
   method must convert the <span>text track cue text</span> to a
   <code>DocumentFragment</code> for the <span>media element</span>'s
   <code>Document</code>, using the appropriate rules for doing
   so.
 <!--END w3c-html--><!--TTVTT-->
   For example, for <span>WebVTT</span>, those rules are the
   <span>WebVTT cue text parsing rules</span> and the <span>WebVTT cue

|