hixie: Update the controller state when the current media controller changes. (whatwg r7115)

hixie: Update the controller state when the current media controller
changes. (whatwg r7115)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5667&r2=1.5668&f=h
http://html5.org/tools/web-apps-tracker?from=7114&to=7115

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5667
retrieving revision 1.5668
diff -u -d -r1.5667 -r1.5668
--- Overview.html 1 Jun 2012 02:07:01 -0000 1.5667
+++ Overview.html 4 Jun 2012 23:40:39 -0000 1.5668
@@ -321,7 +321,7 @@
 
    <h1>HTML5</h1>
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
-   <h2 class="no-num no-toc" id="editor-s-draft-1-june-2012">Editor's Draft 1 June 2012</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-4-june-2012">Editor's Draft 4 June 2012</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -514,7 +514,7 @@
   Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation
   track.
-  This specification is the 1 June 2012 Editor's Draft.
+  This specification is the 4 June 2012 Editor's Draft.
   </p>
 
 
@@ -27410,6 +27410,7 @@
        element</a> to the <a href="#media-controller-position">media controller position</a>,
        relative to the <a href="#media-element">media element</a>'s timeline.</li>
         
+       
 
       </ol><p>Once the <code title="dom-media-readyState"><a href="#dom-media-readystate">readyState</a></code> attribute
       reaches <code title="dom-media-HAVE_CURRENT_DATA"><a href="#dom-media-have_current_data">HAVE_CURRENT_DATA</a></code>,
@@ -29853,14 +29854,49 @@
   <hr><p>The <dfn id="dom-media-controller" title="dom-media-controller"><code>controller</code></dfn> attribute
   on a <a href="#media-element">media element</a>, on getting, must return the
   element's <a href="#current-media-controller">current media controller</a>, if any, or null
-  otherwise. On setting, it must first remove the element's <code title="attr-media-mediagroup"><a href="#attr-media-mediagroup">mediagroup</a></code> attribute, if any,
-  and then set the <a href="#current-media-controller">current media controller</a> to the given
-  value. If the given value is null, the element no longer has a
-  <a href="#current-media-controller">current media controller</a>; if it is not null, then the
-  user agent must <a href="#bring-the-media-element-up-to-speed-with-its-new-media-controller">bring the media element up to speed with its
-  new media controller</a>.</p>
+  otherwise. On setting, the user agent must run the following
+  steps:</p>
 
-  <hr><p>The <dfn id="dom-mediacontroller" title="dom-MediaController"><code>MediaController()</code></dfn>
+  <ol><li><p>Let <var title="">m</var> be the <a href="#media-element">media element</a>
+   in question.</li>
+
+   <li><p>Let <var title="">old controller</var> be <var title="">m</var>'s <a href="#current-media-controller">current media controller</a>, if it
+   currently has one, and null otherwise.</li>
+
+   <li><p>Let <var title="">new controller</var> be null.</li>
+
+   <li><p>Let <var title="">m</var> have no <a href="#current-media-controller">current
+   media controller</a>, if it currently has one.</li>
+
+   <li><p>Remove the element's <code title="attr-media-mediagroup"><a href="#attr-media-mediagroup">mediagroup</a></code> content attribute,
+   if any.</li>
+
+   <li><p>If the new value is null, then jump to the <i>update
+   controllers</i> step below.</li>
+
+   <li><p>Let <var title="">m</var>'s <a href="#current-media-controller">current media
+   controller</a> be the new value.</li>
+
+   <li><p>Let <var title="">new controller</var> be <var title="">m</var>'s <a href="#current-media-controller">current media controller</a>.</li>
+
+   <li><p><a href="#bring-the-media-element-up-to-speed-with-its-new-media-controller">Bring the media element up to speed with its new media
+   controller</a>.</li>
+
+   <li><p><i>Update controllers</i>: If <var title="">old
+   controller</var> and <var title="">new controller</var> are the
+   same (whether both null or both the same controller) then abort
+   these steps.</li>
+
+   <li><p>If <var title="">old controller</var> is not null and still
+   has one or more <a href="#slaved-media-elements">slaved media elements</a>, then
+   <a href="#report-the-controller-state">report the controller state</a> for <var title="">old
+   controller</var>.</li>
+
+   <li><p>If <var title="">new controller</var> is not null, then
+   <a href="#report-the-controller-state">report the controller state</a> for <var title="">new
+   controller</var>.</li>
+
+  </ol><hr><p>The <dfn id="dom-mediacontroller" title="dom-MediaController"><code>MediaController()</code></dfn>
   constructor, when invoked, must return a newly created
   <code><a href="#mediacontroller">MediaController</a></code> object.</p>
 
@@ -30294,11 +30330,17 @@
   <ol><li><p>Let <var title="">m</var> be the <a href="#media-element">media element</a>
    in question.</li>
 
+   <li><p>Let <var title="">old controller</var> be <var title="">m</var>'s <a href="#current-media-controller">current media controller</a>, if it
+   currently has one, and null otherwise.</li>
+
+   <li><p>Let <var title="">new controller</var> be null.</li>
+
    <li><p>Let <var title="">m</var> have no <a href="#current-media-controller">current
    media controller</a>, if it currently has one.</li>
 
    <li><p>If <var title="">m</var>'s <code title="attr-media-mediagroup"><a href="#attr-media-mediagroup">mediagroup</a></code> attribute is being
-   removed, then abort these steps.</li>
+   removed, then jump to the <i>update controllers</i> step
+   below.</li>
 
    <li>
 
@@ -30320,9 +30362,25 @@
    <li><p>Let <var title="">m</var>'s <a href="#current-media-controller">current media
    controller</a> be <var title="">controller</var>.</li>
 
+   <li><p>Let <var title="">new controller</var> be <var title="">m</var>'s <a href="#current-media-controller">current media controller</a>.</li>
+
    <li><p><a href="#bring-the-media-element-up-to-speed-with-its-new-media-controller">Bring the media element up to speed with its new media
    controller</a>.</li>
 
+   <li><p><i>Update controllers</i>: If <var title="">old
+   controller</var> and <var title="">new controller</var> are the
+   same (whether both null or both the same controller) then abort
+   these steps.</li>
+
+   <li><p>If <var title="">old controller</var> is not null and still
+   has one or more <a href="#slaved-media-elements">slaved media elements</a>, then
+   <a href="#report-the-controller-state">report the controller state</a> for <var title="">old
+   controller</var>.</li>
+
+   <li><p>If <var title="">new controller</var> is not null, then
+   <a href="#report-the-controller-state">report the controller state</a> for <var title="">new
+   controller</var>.</li>
+
   </ol><p>The <dfn id="dom-media-mediagroup" title="dom-media-mediaGroup"><code>mediaGroup</code></dfn> IDL
   attribute on <a href="#media-element" title="media element">media elements</a> must
   <a href="#reflect">reflect</a> the <code title="attr-media-mediagroup"><a href="#attr-media-mediagroup">mediagroup</a></code> content

Received on Monday, 4 June 2012 23:40:56 UTC