[EME] Bug 24322 - Add subsections for each object and move attributes to their sections.
authorDavid Dorwin <ddorwin@google.com>
Wed, 03 Sep 2014 17:02:42 -0700
changeset 416 ebef3677efce
parent 415 95f9041ca521
child 417 47d3c7f7d622
[EME] Bug 24322 - Add subsections for each object and move attributes to their sections.
encrypted-media/encrypted-media.html
encrypted-media/encrypted-media.xml
--- a/encrypted-media/encrypted-media.html	Wed Sep 03 17:02:05 2014 -0700
+++ b/encrypted-media/encrypted-media.html	Wed Sep 03 17:02:42 2014 -0700
@@ -313,6 +313,11 @@
 };
 </pre>
 
+    <h3 id="mediakeys-attributes">Attributes</h3>
+
+    <p>The <dfn id="dom-keysystem"><code>keySystem</code></dfn> attribute identifies the <a href="#key-system">Key System</a> being used.</p>
+
+    <h3 id="mediakeys-methods">Methods</h3>
     <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
     <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
 
@@ -342,8 +347,6 @@
       <li><p>Return <var>promise</var>.</p></li>
     </ol>
 
-    <p>The <dfn id="dom-keysystem"><code>keySystem</code></dfn> attribute identifies the <a href="#key-system">Key System</a> being used.</p>
-
     <p>The <dfn id="dom-createsession"><code>createSession(sessionType)</code></dfn> method returns a new <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object. It must run the following steps:</p>
 
     <ol>
@@ -502,8 +505,7 @@
 };
 </pre>
 
-    <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
-    <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
+    <h3 id="mediakeysession-attributes">Attributes</h3>
 
     <p>The <dfn id="dom-sessionid"><code>sessionId</code></dfn> attribute is the <a href="#session-id">Session ID</a> for this object and the associated key(s) or license(s).</p>
 
@@ -513,6 +515,10 @@
     <p>The <dfn id="dom-closed"><code>closed</code></dfn> attribute signals when object becomes closed as a result of the <a href="#algorithms-session-close">Session Close</a> algorithm being run.
     This promise can only be fulfilled and is never rejected.</p>
 
+    <h3 id="mediakeysession-methods">Methods</h3>
+    <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
+    <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
+
     <p>The <dfn id="dom-generaterequest"><code>generateRequest(initDataType, initData)</code></dfn> method creates a new <code><a href="#dom-mediakeysession">MediaKeySession</a></code> object for the <var title="true">initData</var>. It must run the following steps:</p>
     <p class="non-normative">The contents of <var title="true">initData</var> are container-specific <a href="#initialization-data">Initialization Data</a>.
     <var title="true">initDataType</var> is the <a href="#initialization-data-type">initialization data type</a> that indicates how to interpret <var title="true">initData</var>.
@@ -766,6 +772,7 @@
       </li>
     </ol>
 
+    
     <h3 id="exceptions">2.1. Exceptions</h3>
     <p id="error-names">The methods report errors by rejecting the returned promise with a <code><a href="http://www.w3.org/TR/dom/#exception-domexception">DOMException</a></code>.
     The following <a href="http://www.w3.org/TR/dom/#error-names">DOMException names from DOM4</a> are used in the algorithms.
@@ -826,9 +833,7 @@
     <p>Where media rendering is not performed by the UA, for example in the case of a hardware protected media pipeline, then the full set of HTML rendering capabilities, for example CSS Transforms, may not be available. One likely restriction is that
     video media may be constrained to appear only in rectangular regions with sides parallel to the edges of the window and with normal orientation.</p>
 
-    <h2 id="events">3. Events</h2>
-
-    <h3 id="event-definitions">3.1. Event Definitions</h3>
+    <h3 id="mediakeysession-event-definitions">Event Definitions</h3>
     <pre class="idl">
 [Constructor(DOMString type, optional <a href="#dom-mediaencryptedeventinit">MediaEncryptedEventInit</a> eventInitDict)]
 interface <dfn id="dom-mediaencryptedevent">MediaEncryptedEvent</dfn> : <a href="http://www.w3.org/TR/dom/#event">Event</a> {
@@ -897,7 +902,7 @@
     <p>Events are constructed as defined in <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#constructing-events">Constructing events</a>, in [DOM4].</p>
     </div>
 
-    <h3 id="event-summary">3.2. Event Summary</h3>
+    <h3 id="mediakeysession-events">Event Summary</h3>
     <p><i>This section is non-normative.</i></p>
 
     <p>The following event is fired at <code><a href="#dom-htmlmediaelement">HTMLMediaElement</a></code>.</p>
@@ -949,6 +954,8 @@
       </tbody>
     </table>
 
+    <h3 id="mediakeysession-algorithms">Algorithms</h3>
+
 
     <h2 id="htmlmediaelement-extensions">HTMLMediaElement Extensions</h2>
     <p>This section specifies additions to and modifications of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a> when the Encrypted Media Extensions are supported.</p>
@@ -966,11 +973,18 @@
 };
 </pre>
 
-    <div class="note">
+    <h3 id="htmlmediaelement-attributes">Attributes</h3>
+
+    <p>The <dfn id="dom-attrmediakeys"><code>mediaKeys</code></dfn> attribute is the <code><a href="#dom-mediakeys">MediaKeys</a></code> being used when decrypting encrypted <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> for this <a href="#media-element">media element</a>.</p>
+
+    <p>The <dfn id="dom-waitingfor"><code>waitingFor</code></dfn> attribute indicates what the media element is waiting for, if anything (indicated by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-waiting">waiting</a></code> and <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-canplay">canplay</a></code> events). This is described in the <a href="#algorithms-encrypted-block">Encrypted Block Encountered</a> algorithm.</p>
+
+    <p>The <dfn id="dom-onencrypted"><code>onencrypted</code></dfn> event handler for the <code><a href="#dom-encrypted">encrypted</a></code> event must be supported by all HTMLMediaElements as both a content attribute and an IDL attribute.</p>
+
+    <h3 id="htmlmediaelement-methods">Methods</h3>
     <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
     <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
 
-    <p>The <dfn id="dom-attrmediakeys"><code>mediaKeys</code></dfn> attribute is the <code><a href="#dom-mediakeys">MediaKeys</a></code> being used when decrypting encrypted <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> for this <a href="#media-element">media element</a>.</p>
     <p>The <dfn id="dom-setmediakeys"><code>setMediaKeys(mediaKeys</code></dfn>) method provides the <code><a href="#dom-mediakeys">MediaKeys</a></code> to use when decrypting media data during playback. It must run the following steps:</p>
     
     <ol>
@@ -1023,9 +1037,7 @@
     
     <p class="non-normative">Note: In some implementations, <code><a href="#dom-mediakeysession">MediaKeySession</a></code> objects may not fire any events until the <code><a href="#dom-mediakeys">MediaKeys</a></code> object is associated with a media element using <code><a href="#dom-setmediakeys">setMediaKeys()</a></code>.</p>
 
-    <p>The <dfn id="dom-onencrypted"><code>onencrypted</code></dfn> event handler for the <code><a href="#dom-encrypted">encrypted</a></code> event must be supported by all HTMLMediaElements as both a content attribute and an IDL attribute.</p>
-
-    <p>The <dfn id="dom-waitingfor"><code>waitingFor</code></dfn> attribute indicates what the media element is waiting for, if anything (indicated by the <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-waiting">waiting</a></code> and <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-canplay">canplay</a></code> events). This is described in the <a href="#algorithms-encrypted-block">Encrypted Block Encountered</a> algorithm.</p>
+    <h3 id="htmlmediaelement-algorithms">Algorithms</h3>
 
 
     <h2 id="algorithms">4. Algorithms</h2>
--- a/encrypted-media/encrypted-media.xml	Wed Sep 03 17:02:05 2014 -0700
+++ b/encrypted-media/encrypted-media.xml	Wed Sep 03 17:02:42 2014 -0700
@@ -349,6 +349,11 @@
 };
 </pre>
 
+    <h3 id="mediakeys-attributes">Attributes</h3>
+
+    <p>The <codedfn>keySystem</codedfn> attribute identifies the <a href="#key-system">Key System</a> being used.</p>
+
+    <h3 id="mediakeys-methods">Methods</h3>
     <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
     <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
 
@@ -377,8 +382,6 @@
       <li><p>Return <var>promise</var>.</p></li>
     </ol>
 
-    <p>The <codedfn>keySystem</codedfn> attribute identifies the <a href="#key-system">Key System</a> being used.</p>
-
     <p>The <methoddfn name="createSession">createSession(<var title="true">sessionType</var>)</methoddfn> method returns a new <coderef>MediaKeySession</coderef> object. It must run the following steps:</p>
 
     <ol>
@@ -521,8 +524,7 @@
 };
 </pre>
 
-    <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
-    <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
+    <h3 id="mediakeysession-attributes">Attributes</h3>
 
     <p>The <codedfn>sessionId</codedfn> attribute is the <a href="#session-id">Session ID</a> for this object and the associated key(s) or license(s).</p>
 
@@ -532,6 +534,10 @@
     <p>The <codedfn>closed</codedfn> attribute signals when object becomes closed as a result of the <a href="#algorithms-session-close">Session Close</a> algorithm being run.
     This promise can only be fulfilled and is never rejected.</p>
 
+    <h3 id="mediakeysession-methods">Methods</h3>
+    <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
+    <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
+
     <p>The <methoddfn name="generateRequest">generateRequest(<var title="true">initDataType</var>, <var title="true">initData</var>)</methoddfn> method creates a new <coderef>MediaKeySession</coderef> object for the <var title="true">initData</var>. It must run the following steps:</p>
     <p class="non-normative">The contents of <var title="true">initData</var> are container-specific <a href="#initialization-data">Initialization Data</a>.
     <var title="true">initDataType</var> is the <a href="#initialization-data-type">initialization data type</a> that indicates how to interpret <var title="true">initData</var>.
@@ -765,6 +771,7 @@
       </li>
     </ol>
 
+    <!-- TODO: Move after algorithms. -->
     <h3 id="exceptions">2.1. Exceptions</h3>
     <p id="error-names">The methods report errors by rejecting the returned promise with a <code><dom4ref name="exception-domexception">DOMException</dom4ref></code>.
     The following <dom4ref name="error-names">DOMException names from DOM4</dom4ref> are used in the algorithms.
@@ -825,9 +832,7 @@
     <p>Where media rendering is not performed by the UA, for example in the case of a hardware protected media pipeline, then the full set of HTML rendering capabilities, for example CSS Transforms, may not be available. One likely restriction is that
     video media may be constrained to appear only in rectangular regions with sides parallel to the edges of the window and with normal orientation.</p>
 
-    <h2 id="events">3. Events</h2>
-
-    <h3 id="event-definitions">3.1. Event Definitions</h3>
+    <h3 id="mediakeysession-event-definitions">Event Definitions</h3>
     <pre class="idl">
 [Constructor(DOMString type, optional <precoderef>MediaEncryptedEventInit</precoderef> eventInitDict)]
 interface <precodedfn>MediaEncryptedEvent</precodedfn> : <dom4ref name="event">Event</dom4ref> {
@@ -885,7 +890,7 @@
     <p>Events are constructed as defined in <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#constructing-events">Constructing events</a>, in [DOM4].</p>
     </div>
 
-    <h3 id="event-summary">3.2. Event Summary</h3>
+    <h3 id="mediakeysession-events">Event Summary</h3>
     <non-normative-section/>
 
     <p>The following event is fired at <coderef>HTMLMediaElement</coderef>.</p>
@@ -936,6 +941,8 @@
       </tbody>
     </table>
 
+    <h3 id="mediakeysession-algorithms">Algorithms</h3>
+
 
     <h2 id="htmlmediaelement-extensions">HTMLMediaElement Extensions</h2>
     <p>This section specifies additions to and modifications of the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a> when the Encrypted Media Extensions are supported.</p>
@@ -953,10 +960,18 @@
 };
 </pre>
 
+    <h3 id="htmlmediaelement-attributes">Attributes</h3>
+
+    <p>The <codedfn prefix="attr">mediaKeys</codedfn> attribute is the <coderef>MediaKeys</coderef> being used when decrypting encrypted <videoanchor name="media-data">media data</videoanchor> for this <a href="#media-element">media element</a>.</p>
+
+    <p>The <codedfn>waitingFor</codedfn> attribute indicates what the media element is waiting for, if anything (indicated by the <videoref name="event-media-waiting">waiting</videoref> and <videoref name="event-media-canplay">canplay</videoref> events). This is described in the <a href="#algorithms-encrypted-block">Encrypted Block Encountered</a> algorithm.</p>
+
+    <p>The <codedfn>onencrypted</codedfn> event handler for the <coderef>encrypted</coderef> event must be supported by all HTMLMediaElements as both a content attribute and an IDL attribute.</p>
+
+    <h3 id="htmlmediaelement-methods">Methods</h3>
     <p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes WebIDL type mapping errors.</p>
     <p>The steps of an algorithm are always aborted when resolving or rejecting a promise.</p>
 
-    <p>The <codedfn prefix="attr">mediaKeys</codedfn> attribute is the <coderef>MediaKeys</coderef> being used when decrypting encrypted <videoanchor name="media-data">media data</videoanchor> for this <a href="#media-element">media element</a>.</p>
     <p>The <methoddfn name="setMediaKeys">setMediaKeys(<var title="true">mediaKeys</var></methoddfn>) method provides the <coderef>MediaKeys</coderef> to use when decrypting media data during playback. It must run the following steps:</p>
     
     <ol>
@@ -1004,9 +1019,7 @@
     <!-- TODO: Move to the MediaKeySession section when refactoring. -->
     <p class="non-normative">Note: In some implementations, <coderef>MediaKeySession</coderef> objects may not fire any events until the <coderef>MediaKeys</coderef> object is associated with a media element using <methodref>setMediaKeys</methodref>.</p>
 
-    <p>The <codedfn>onencrypted</codedfn> event handler for the <coderef>encrypted</coderef> event must be supported by all HTMLMediaElements as both a content attribute and an IDL attribute.</p>
-
-    <p>The <codedfn>waitingFor</codedfn> attribute indicates what the media element is waiting for, if anything (indicated by the <videoref name="event-media-waiting">waiting</videoref> and <videoref name="event-media-canplay">canplay</videoref> events). This is described in the <a href="#algorithms-encrypted-block">Encrypted Block Encountered</a> algorithm.</p>
+    <h3 id="htmlmediaelement-algorithms">Algorithms</h3>
 
 
     <h2 id="algorithms">4. Algorithms</h2>