[EME] Fixed swapped invalid-access-err and invalid-state-err templates.
authorDavid Dorwin <ddorwin@google.com>
Mon, 28 Oct 2013 15:31:06 -0700
changeset 179 2788ef8dc5dc
parent 178 bed8606bd0a7
child 180 6fdb875ccac0
[EME] Fixed swapped invalid-access-err and invalid-state-err templates.

In changeset 83629aec22e1, an extra invalid-state-err template was introduced
incorrectly, resulting in invalid-access-err instances generating
invalid-state-err HTML and vice versa. This changeset reverts those changes.
encrypted-media/encrypted-media.html
encrypted-media/spec-html.xsl
--- a/encrypted-media/encrypted-media.html	Mon Oct 28 13:00:39 2013 -0700
+++ b/encrypted-media/encrypted-media.html	Mon Oct 28 15:31:06 2013 -0700
@@ -290,7 +290,7 @@
     
     <ol>
       <li>
-<p>If loading has not started, throw an <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception and abort these steps.</p>
+<p>If loading has not started, throw an <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code> exception and abort these steps.</p>
       <p class="non-normative">In general, applications should wait for an event named <code><a href="#dom-needkey">needkey</a></code> or <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#event-media-loadstart">loadstart</a></code> (per the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#concept-media-load-resource">resource fetch algorithm</a>) before calling this method.</p>
       </li>
       <li><p>If the <code><a href="#dom-mediakeys">MediaKeys</a></code> object is already in use and the user agent is unable to re-use it with this element, throw a <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-quota_exceeded_err">QUOTA_EXCEEDED_ERR</a></code> exception and abort these steps.</p></li>
@@ -304,7 +304,7 @@
     <p>The <dfn id="dom-media-keys-constructor"><code>MediaKeys(<var title="true">keySystem</var>)</code></dfn> constructor must run the following steps:</p>
 
     <ol>
-      <li><p>If <var title="true">keySystem</var> is null or an empty string, throw an <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code> exception and abort these steps.</p></li>
+      <li><p>If <var title="true">keySystem</var> is null or an empty string, throw an <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code> exception and abort these steps.</p></li>
 
       <li><p>If <var title="true">keySystem</var> is not one of the user agent's supported <a href="#key-system">Key Systems</a>, throw a <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-not_supported_err">NOT_SUPPORTED_ERR</a></code> and abort these steps. Key system string comparison is case-sensitive.</p></li>
 
@@ -479,8 +479,8 @@
     The contents may also vary depending on the container, key length, etc.</p>
 
     <ol>
-      <li><p>If the argument is null or an empty array, throw an <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code>.</p></li>
-      <li><p>If the session is not in the <code><a href="#dom-pending">PENDING</a></code> state, throw an <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code>.</p></li>
+      <li><p>If the argument is null or an empty array, throw an <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_access_err">INVALID_ACCESS_ERR</a></code>.</p></li>
+      <li><p>If the session is not in the <code><a href="#dom-pending">PENDING</a></code> state, throw an <code><a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err">INVALID_STATE_ERR</a></code>.</p></li>
 
       <li>
 <p>Schedule a task to handle the call, providing <var title="true">key</var>.</p>
--- a/encrypted-media/spec-html.xsl	Mon Oct 28 13:00:39 2013 -0700
+++ b/encrypted-media/spec-html.xsl	Mon Oct 28 15:31:06 2013 -0700
@@ -89,10 +89,6 @@
   </xsl:template>
 
   <xsl:template match="//invalid-access-err">
-    <code><a><xsl:attribute name="href">https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err</xsl:attribute>INVALID_STATE_ERR</a></code>
-  </xsl:template>
-
-  <xsl:template match="//invalid-state-err">
     <code><a><xsl:attribute name="href">https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_access_err</xsl:attribute>INVALID_ACCESS_ERR</a></code>
   </xsl:template>