[html5] r7071 - [giow] (0) Transition this API to strings rather than numbers. Affected topics: [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Apr 25 13:58:39 PDT 2012


Author: ianh
Date: 2012-04-25 13:58:38 -0700 (Wed, 25 Apr 2012)
New Revision: 7071

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Transition this API to strings rather than numbers.
Affected topics: Video Text Tracks

Modified: complete.html
===================================================================
--- complete.html	2012-04-25 20:39:39 UTC (rev 7070)
+++ complete.html	2012-04-25 20:58:38 UTC (rev 7071)
@@ -32913,10 +32913,7 @@
   readonly attribute DOMString <a href=#dom-texttrack-label title=dom-TextTrack-label>label</a>;
   readonly attribute DOMString <a href=#dom-texttrack-language title=dom-TextTrack-language>language</a>;
 
-  const unsigned short <a href=#dom-texttrack-disabled title=dom-TextTrack-DISABLED>DISABLED</a> = 0;
-  const unsigned short <a href=#dom-texttrack-hidden title=dom-TextTrack-HIDDEN>HIDDEN</a> = 1;
-  const unsigned short <a href=#dom-texttrack-showing title=dom-TextTrack-SHOWING>SHOWING</a> = 2;
-           attribute unsigned short <a href=#dom-texttrack-mode title=dom-TextTrack-mode>mode</a>;
+           attribute DOMString <a href=#dom-texttrack-mode title=dom-TextTrack-mode>mode</a>;
 
   readonly attribute <a href=#texttrackcuelist>TextTrackCueList</a>? <a href=#dom-texttrack-cues title=dom-TextTrack-cues>cues</a>;
   readonly attribute <a href=#texttrackcuelist>TextTrackCueList</a>? <a href=#dom-texttrack-activecues title=dom-TextTrack-activeCues>activeCues</a>;
@@ -32945,16 +32942,16 @@
    <dt><var title="">textTrack</var> . <code title=dom-TextTrack-mode><a href=#dom-texttrack-mode>mode</a></code> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <a href=#text-track-mode>text track mode</a>, represented by a
-    number from the following list:</p>
-    <dl><dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-DISABLED><a href=#dom-texttrack-disabled>DISABLED</a></code> (0)</dt>
+    string from the following list:</p>
+    <dl><dt>"<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>"</dt>
      <dd>
       <p>The <a href=#text-track-disabled>text track disabled</a> mode.</p>
      </dd>
-     <dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-HIDDEN><a href=#dom-texttrack-hidden>HIDDEN</a></code> (1)</dt>
+     <dt>"<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>"</dt>
      <dd>
       <p>The <a href=#text-track-hidden>text track hidden</a> mode.</p>
      </dd>
-     <dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-SHOWING><a href=#dom-texttrack-showing>SHOWING</a></code> (2)</dt>
+     <dt>"<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>"</dt>
      <dd>
       <p>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</p>
      </dd>
@@ -33006,24 +33003,23 @@
   represents.</p>
 
   <p>The <dfn id=dom-texttrack-mode title=dom-TextTrack-mode><code>mode</code></dfn>
-  attribute, on getting, must return the numeric value corresponding
-  to the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a>
-  that the <code><a href=#texttrack>TextTrack</a></code> object represents, as defined by
-  the following list:</p>
+  attribute, on getting, must return the string corresponding to the
+  <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the
+  <code><a href=#texttrack>TextTrack</a></code> object represents, as defined by the
+  following list:</p>
 
-  <dl><dt><dfn id=dom-texttrack-disabled title=dom-TextTrack-DISABLED><code>DISABLED</code></dfn> (numeric value 0)</dt>
+  <dl><dt>"<dfn id=dom-texttrack-disabled title=dom-TextTrack-disabled><code>disabled</code></dfn>"</dt>
    <dd>The <a href=#text-track-disabled>text track disabled</a> mode.</dd>
-   <dt><dfn id=dom-texttrack-hidden title=dom-TextTrack-HIDDEN><code>HIDDEN</code></dfn> (numeric value 1)</dt>
+   <dt>"<dfn id=dom-texttrack-hidden title=dom-TextTrack-hidden><code>hidden</code></dfn>"</dt>
    <dd>The <a href=#text-track-hidden>text track hidden</a> mode.</dd>
-   <dt><dfn id=dom-texttrack-showing title=dom-TextTrack-SHOWING><code>SHOWING</code></dfn> (numeric value 2)</dt>
+   <dt>"<dfn id=dom-texttrack-showing title=dom-TextTrack-showing><code>showing</code></dfn>"</dt>
    <dd>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</dd>
-  </dl><p>On setting, if the new value is not either 0, 1, or 2, the user
-  agent must throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code>
-  exception. Otherwise, if the new value isn't equal to what the
-  attribute would currently return, the new value must be processed as
-  follows:</p>
+  </dl><p>On setting, if the new value is not either the string "<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>", "<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>", "<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>", the user agent must
+  throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception. Otherwise, if
+  the new value isn't equal to what the attribute would currently
+  return, the new value must be processed as follows:</p>
 
-  <dl class=switch><dt>If the new value is 0</dt>
+  <dl class=switch><dt>If the new value is "<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>"</dt>
 
    <dd>
 
@@ -33033,7 +33029,7 @@
 
    </dd>
 
-   <dt>If the new value is 1</dt>
+   <dt>If the new value is "<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>"</dt>
 
    <dd>
 
@@ -33043,7 +33039,7 @@
 
    </dd>
 
-   <dt>If the new value is 2</dt>
+   <dt>If the new value is "<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>"</dt>
 
    <dd>
 
@@ -33051,15 +33047,15 @@
     track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents to
     the <a href=#text-track-showing>text track showing</a> mode.</p>
 
-    <p class=note>If the mode had been <a href=#text-track-showing-by-default title="text track
-    showing by default">showing by default</a>, this will change it
-    to <a href=#text-track-showing title="text track showing">showing</a>, even though
-    the value of <code title=dom-TextTrack-mode><a href=#dom-texttrack-mode>mode</a></code> would
-    appear not to change.</p>
-
    </dd>
 
-  </dl><p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
+  </dl><p class=note>If the mode is <a href=#text-track-showing-by-default title="text track showing by
+  default">showing by default</a>, then there is no way to change
+  it to <a href=#text-track-showing title="text track showing">showing</a> without first
+  changing it to <a href=#text-track-disabled title="text track disabled">disabled</a> or
+  <a href=#text-track-hidden title="text track hidden">hidden</a>.</p>
+
+  <p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
   track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents is
   not the <a href=#text-track-disabled>text track disabled</a> mode, then the <dfn id=dom-texttrack-cues title=dom-TextTrack-cues><code>cues</code></dfn> attribute must
   return a <a href=#live>live</a> <code><a href=#texttrackcuelist>TextTrackCueList</a></code> object that

Modified: index
===================================================================
--- index	2012-04-25 20:39:39 UTC (rev 7070)
+++ index	2012-04-25 20:58:38 UTC (rev 7071)
@@ -32913,10 +32913,7 @@
   readonly attribute DOMString <a href=#dom-texttrack-label title=dom-TextTrack-label>label</a>;
   readonly attribute DOMString <a href=#dom-texttrack-language title=dom-TextTrack-language>language</a>;
 
-  const unsigned short <a href=#dom-texttrack-disabled title=dom-TextTrack-DISABLED>DISABLED</a> = 0;
-  const unsigned short <a href=#dom-texttrack-hidden title=dom-TextTrack-HIDDEN>HIDDEN</a> = 1;
-  const unsigned short <a href=#dom-texttrack-showing title=dom-TextTrack-SHOWING>SHOWING</a> = 2;
-           attribute unsigned short <a href=#dom-texttrack-mode title=dom-TextTrack-mode>mode</a>;
+           attribute DOMString <a href=#dom-texttrack-mode title=dom-TextTrack-mode>mode</a>;
 
   readonly attribute <a href=#texttrackcuelist>TextTrackCueList</a>? <a href=#dom-texttrack-cues title=dom-TextTrack-cues>cues</a>;
   readonly attribute <a href=#texttrackcuelist>TextTrackCueList</a>? <a href=#dom-texttrack-activecues title=dom-TextTrack-activeCues>activeCues</a>;
@@ -32945,16 +32942,16 @@
    <dt><var title="">textTrack</var> . <code title=dom-TextTrack-mode><a href=#dom-texttrack-mode>mode</a></code> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <a href=#text-track-mode>text track mode</a>, represented by a
-    number from the following list:</p>
-    <dl><dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-DISABLED><a href=#dom-texttrack-disabled>DISABLED</a></code> (0)</dt>
+    string from the following list:</p>
+    <dl><dt>"<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>"</dt>
      <dd>
       <p>The <a href=#text-track-disabled>text track disabled</a> mode.</p>
      </dd>
-     <dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-HIDDEN><a href=#dom-texttrack-hidden>HIDDEN</a></code> (1)</dt>
+     <dt>"<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>"</dt>
      <dd>
       <p>The <a href=#text-track-hidden>text track hidden</a> mode.</p>
      </dd>
-     <dt><code><a href=#texttrack>TextTrack</a></code> . <code title=dom-TextTrack-SHOWING><a href=#dom-texttrack-showing>SHOWING</a></code> (2)</dt>
+     <dt>"<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>"</dt>
      <dd>
       <p>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</p>
      </dd>
@@ -33006,24 +33003,23 @@
   represents.</p>
 
   <p>The <dfn id=dom-texttrack-mode title=dom-TextTrack-mode><code>mode</code></dfn>
-  attribute, on getting, must return the numeric value corresponding
-  to the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a>
-  that the <code><a href=#texttrack>TextTrack</a></code> object represents, as defined by
-  the following list:</p>
+  attribute, on getting, must return the string corresponding to the
+  <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the
+  <code><a href=#texttrack>TextTrack</a></code> object represents, as defined by the
+  following list:</p>
 
-  <dl><dt><dfn id=dom-texttrack-disabled title=dom-TextTrack-DISABLED><code>DISABLED</code></dfn> (numeric value 0)</dt>
+  <dl><dt>"<dfn id=dom-texttrack-disabled title=dom-TextTrack-disabled><code>disabled</code></dfn>"</dt>
    <dd>The <a href=#text-track-disabled>text track disabled</a> mode.</dd>
-   <dt><dfn id=dom-texttrack-hidden title=dom-TextTrack-HIDDEN><code>HIDDEN</code></dfn> (numeric value 1)</dt>
+   <dt>"<dfn id=dom-texttrack-hidden title=dom-TextTrack-hidden><code>hidden</code></dfn>"</dt>
    <dd>The <a href=#text-track-hidden>text track hidden</a> mode.</dd>
-   <dt><dfn id=dom-texttrack-showing title=dom-TextTrack-SHOWING><code>SHOWING</code></dfn> (numeric value 2)</dt>
+   <dt>"<dfn id=dom-texttrack-showing title=dom-TextTrack-showing><code>showing</code></dfn>"</dt>
    <dd>The <a href=#text-track-showing>text track showing</a> and <a href=#text-track-showing-by-default title="text track showing by default">showing by default</a> modes.</dd>
-  </dl><p>On setting, if the new value is not either 0, 1, or 2, the user
-  agent must throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code>
-  exception. Otherwise, if the new value isn't equal to what the
-  attribute would currently return, the new value must be processed as
-  follows:</p>
+  </dl><p>On setting, if the new value is not either the string "<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>", "<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>", "<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>", the user agent must
+  throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception. Otherwise, if
+  the new value isn't equal to what the attribute would currently
+  return, the new value must be processed as follows:</p>
 
-  <dl class=switch><dt>If the new value is 0</dt>
+  <dl class=switch><dt>If the new value is "<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>"</dt>
 
    <dd>
 
@@ -33033,7 +33029,7 @@
 
    </dd>
 
-   <dt>If the new value is 1</dt>
+   <dt>If the new value is "<code title=dom-TextTrack-hidden><a href=#dom-texttrack-hidden>hidden</a></code>"</dt>
 
    <dd>
 
@@ -33043,7 +33039,7 @@
 
    </dd>
 
-   <dt>If the new value is 2</dt>
+   <dt>If the new value is "<code title=dom-TextTrack-showing><a href=#dom-texttrack-showing>showing</a></code>"</dt>
 
    <dd>
 
@@ -33051,15 +33047,15 @@
     track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents to
     the <a href=#text-track-showing>text track showing</a> mode.</p>
 
-    <p class=note>If the mode had been <a href=#text-track-showing-by-default title="text track
-    showing by default">showing by default</a>, this will change it
-    to <a href=#text-track-showing title="text track showing">showing</a>, even though
-    the value of <code title=dom-TextTrack-mode><a href=#dom-texttrack-mode>mode</a></code> would
-    appear not to change.</p>
-
    </dd>
 
-  </dl><p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
+  </dl><p class=note>If the mode is <a href=#text-track-showing-by-default title="text track showing by
+  default">showing by default</a>, then there is no way to change
+  it to <a href=#text-track-showing title="text track showing">showing</a> without first
+  changing it to <a href=#text-track-disabled title="text track disabled">disabled</a> or
+  <a href=#text-track-hidden title="text track hidden">hidden</a>.</p>
+
+  <p>If the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
   track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents is
   not the <a href=#text-track-disabled>text track disabled</a> mode, then the <dfn id=dom-texttrack-cues title=dom-TextTrack-cues><code>cues</code></dfn> attribute must
   return a <a href=#live>live</a> <code><a href=#texttrackcuelist>TextTrackCueList</a></code> object that

Modified: source
===================================================================
--- source	2012-04-25 20:39:39 UTC (rev 7070)
+++ source	2012-04-25 20:58:38 UTC (rev 7071)
@@ -35983,10 +35983,7 @@
   readonly attribute DOMString <span title="dom-TextTrack-label">label</span>;
   readonly attribute DOMString <span title="dom-TextTrack-language">language</span>;
 
-  const unsigned short <span title="dom-TextTrack-DISABLED">DISABLED</span> = 0;
-  const unsigned short <span title="dom-TextTrack-HIDDEN">HIDDEN</span> = 1;
-  const unsigned short <span title="dom-TextTrack-SHOWING">SHOWING</span> = 2;
-           attribute unsigned short <span title="dom-TextTrack-mode">mode</span>;
+           attribute DOMString <span title="dom-TextTrack-mode">mode</span>;
 
   readonly attribute <span>TextTrackCueList</span>? <span title="dom-TextTrack-cues">cues</span>;
   readonly attribute <span>TextTrackCueList</span>? <span title="dom-TextTrack-activeCues">activeCues</span>;
@@ -36017,17 +36014,17 @@
    <dt><var title="">textTrack</var> . <code title="dom-TextTrack-mode">mode</code> [ = <var title="">value</var> ]</dt>
    <dd>
     <p>Returns the <span>text track mode</span>, represented by a
-    number from the following list:</p>
+    string from the following list:</p>
     <dl>
-     <dt><code>TextTrack</code> . <code title="dom-TextTrack-DISABLED">DISABLED</code> (0)</dt>
+     <dt>"<code title="dom-TextTrack-disabled">disabled</code>"</dt>
      <dd>
       <p>The <span>text track disabled</span> mode.</p>
      </dd>
-     <dt><code>TextTrack</code> . <code title="dom-TextTrack-HIDDEN">HIDDEN</code> (1)</dt>
+     <dt>"<code title="dom-TextTrack-hidden">hidden</code>"</dt>
      <dd>
       <p>The <span>text track hidden</span> mode.</p>
      </dd>
-     <dt><code>TextTrack</code> . <code title="dom-TextTrack-SHOWING">SHOWING</code> (2)</dt>
+     <dt>"<code title="dom-TextTrack-showing">showing</code>"</dt>
      <dd>
       <p>The <span>text track showing</span> and <span title="text track showing by default">showing by default</span> modes.</p>
      </dd>
@@ -36083,29 +36080,31 @@
   represents.</p>
 
   <p>The <dfn title="dom-TextTrack-mode"><code>mode</code></dfn>
-  attribute, on getting, must return the numeric value corresponding
-  to the <span>text track mode</span> of the <span>text track</span>
-  that the <code>TextTrack</code> object represents, as defined by
-  the following list:</p>
+  attribute, on getting, must return the string corresponding to the
+  <span>text track mode</span> of the <span>text track</span> that the
+  <code>TextTrack</code> object represents, as defined by the
+  following list:</p>
 
   <dl>
-   <dt><dfn title="dom-TextTrack-DISABLED"><code>DISABLED</code></dfn> (numeric value 0)</dt>
+   <dt>"<dfn title="dom-TextTrack-disabled"><code>disabled</code></dfn>"</dt>
    <dd>The <span>text track disabled</span> mode.</dd>
-   <dt><dfn title="dom-TextTrack-HIDDEN"><code>HIDDEN</code></dfn> (numeric value 1)</dt>
+   <dt>"<dfn title="dom-TextTrack-hidden"><code>hidden</code></dfn>"</dt>
    <dd>The <span>text track hidden</span> mode.</dd>
-   <dt><dfn title="dom-TextTrack-SHOWING"><code>SHOWING</code></dfn> (numeric value 2)</dt>
+   <dt>"<dfn title="dom-TextTrack-showing"><code>showing</code></dfn>"</dt>
    <dd>The <span>text track showing</span> and <span title="text track showing by default">showing by default</span> modes.</dd>
   </dl>
 
-  <p>On setting, if the new value is not either 0, 1, or 2, the user
-  agent must throw an <code>InvalidAccessError</code>
-  exception. Otherwise, if the new value isn't equal to what the
-  attribute would currently return, the new value must be processed as
-  follows:</p>
+  <p>On setting, if the new value is not either the string "<code
+  title="dom-TextTrack-disabled">disabled</code>", "<code
+  title="dom-TextTrack-hidden">hidden</code>", "<code
+  title="dom-TextTrack-showing">showing</code>", the user agent must
+  throw an <code>InvalidAccessError</code> exception. Otherwise, if
+  the new value isn't equal to what the attribute would currently
+  return, the new value must be processed as follows:</p>
 
   <dl class="switch">
 
-   <dt>If the new value is 0</dt>
+   <dt>If the new value is "<code title="dom-TextTrack-disabled">disabled</code>"</dt>
 
    <dd>
 
@@ -36115,7 +36114,7 @@
 
    </dd>
 
-   <dt>If the new value is 1</dt>
+   <dt>If the new value is "<code title="dom-TextTrack-hidden">hidden</code>"</dt>
 
    <dd>
 
@@ -36125,7 +36124,7 @@
 
    </dd>
 
-   <dt>If the new value is 2</dt>
+   <dt>If the new value is "<code title="dom-TextTrack-showing">showing</code>"</dt>
 
    <dd>
 
@@ -36133,16 +36132,16 @@
     track</span> that the <code>TextTrack</code> object represents to
     the <span>text track showing</span> mode.</p>
 
-    <p class="note">If the mode had been <span title="text track
-    showing by default">showing by default</span>, this will change it
-    to <span title="text track showing">showing</span>, even though
-    the value of <code title="dom-TextTrack-mode">mode</code> would
-    appear not to change.</p>
-
    </dd>
 
   </dl>
 
+  <p class="note">If the mode is <span title="text track showing by
+  default">showing by default</span>, then there is no way to change
+  it to <span title="text track showing">showing</span> without first
+  changing it to <span title="text track disabled">disabled</span> or
+  <span title="text track hidden">hidden</span>.</p>
+
   <p>If the <span>text track mode</span> of the <span>text
   track</span> that the <code>TextTrack</code> object represents is
   not the <span>text track disabled</span> mode, then the <dfn




More information about the Commit-Watchers mailing list