HTML5 Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/7148

SVNBugCommentTime (UTC)
714814260[Gecko] [Internet Explorer] [Opera] [Webkit] Try to make the text track pending thing work better.2012-06-26 22:12
Index: source
===================================================================
--- source	(revision 7147)
+++ source	(revision 7148)
@@ -31262,6 +31262,14 @@
 
    <li>
 
+    <p>&#x231B; If the <span>media element</span>'s
+    <span>blocked-on-parser</span> flag is false, then <span>populate
+    the list of pending text tracks</span>.</p>
+
+   </li>
+
+   <li>
+
     <p>&#x231B; If the <span>media element</span> has a <code
     title="attr-media-src">src</code> attribute, then let <var
     title="">mode</var> be <i title="">attribute</i>.</p>
@@ -31573,6 +31581,11 @@
    algorithm. This is now the element's <span>media
    resource</span>.</p></li>
 
+   <li><p>Remove all <span title="media-resource-specific text
+   track">media-resource-specific text tracks</span> from the
+   <span>media element</span>'s <span>list of pending text
+   tracks</span>, if any.</p>
+
    <li><p>Optionally, run the following substeps. This is the expected
    behavior if the user agent intends to not attempt to fetch the
    resource until the use requests it explicitly (e.g. as a way to
@@ -35927,17 +35940,47 @@
   <p>Each <span>text track</span> has a corresponding
   <code>TextTrack</code> object.</p>
 
-  <p>The <span title="text track">text tracks</span> of a
-  <span>media element</span> are <dfn title="the text tracks are
-  ready">ready</dfn> if all the <span title="text track">text
-  tracks</span> whose <span title="text track mode">mode</span> was
-  not in the <span title="text track disabled">disabled</span> state
-  when the element's <span
-  title="concept-media-load-algorithm">resource selection
-  algorithm</span> last started now have a <span>text track readiness
-  state</span> of <span title="text track loaded">loaded</span> or
-  <span title="text track failed to load">failed to load</span>.</p>
+  <hr>
 
+  <p>Each <span>media element</span> has a <dfn>list of pending text
+  tracks</dfn>, which must initially be empty, and a
+  <dfn>blocked-on-parser</dfn> flag, which must initially be false.
+  When the user agent is required to <dfn>populate the list of pending
+  text tracks</dfn> of a <span>media element</span>, the user agent
+  must add to the element's <span>list of pending text tracks</span>
+  each <span>text track</span> in the element's <span>list of text
+  tracks</span> whose <span>text track mode</span> is not <span
+  title="text track disabled">disabled</span> and whose <span>text
+  track readiness state</span> is <!--either <span title="text track
+  not loaded">not loaded</span> or [there can't be any in the 'not
+  loaded' state that are not 'disabled']--> <span title="text track
+  loading">loading</span>.</p>
+
+  <p>Whenever a <code>track</code> element's parent node changes, the
+  user agent must remove the corresponding <span>text track</span>
+  from any <span>list of pending text tracks</span> that it is in.</p>
+
+  <p>Whenever a <span>text track</span>'s <span>text track readiness
+  state</span> changes to either <span title="text track
+  loaded">loaded</span> or <span title="text track failed to
+  load">failed to load</span>, the user agent must remove it from any
+  <span>list of pending text tracks</span> that it is in.</p>
+
+  <p>When a <span>media element</span> is created by an <span>HTML
+  parser</span> or <span>XML parser</span>, the user agent must set
+  the element's <span>blocked-on-parser</span> flag to true. When a
+  <span>media element</span> is popped off the <span>stack of open
+  elements</span> of an <span>HTML parser</span> or <span>XML
+  parser</span>, the user agent must <span>populate the list of
+  pending text tracks</span> and set the element's
+  <span>blocked-on-parser</span> flag to false.</p>
+
+  <p>The <span title="text track">text tracks</span> of a <span>media
+  element</span> are <dfn title="the text tracks are
+  ready">ready</dfn> when both the element's <span>list of pending
+  text tracks</span> is empty and the element's
+  <span>blocked-on-parser</span> flag is false.</p>
+
   <hr>
 
   <p>A <dfn>text track cue</dfn> is the unit of time-sensitive data

|