[EME] Bug 25966 - Use the new BufferSource typedef in place of "(ArrayBuffer or ArrayBufferView)"
authorDavid Dorwin <ddorwin@google.com>
Mon, 20 Oct 2014 11:25:52 -0700
changeset 480 54693f404322
parent 479 6cae6df4babd
child 481 c755700f118a
[EME] Bug 25966 - Use the new BufferSource typedef in place of "(ArrayBuffer or ArrayBufferView)"
encrypted-media/encrypted-media-respec.html
encrypted-media/encrypted-media.html
--- a/encrypted-media/encrypted-media-respec.html	Mon Oct 20 10:58:19 2014 -0700
+++ b/encrypted-media/encrypted-media-respec.html	Mon Oct 20 11:25:52 2014 -0700
@@ -536,7 +536,7 @@
           </ol>
         </dd>
   
-        <dt>Promise&lt;void&gt; setServerCertificate((ArrayBuffer or ArrayBufferView) serverCertificate)</dt>
+        <dt>Promise&lt;void&gt; setServerCertificate(BufferSource serverCertificate)</dt>
         <dd>
           <p id="server-certificate">Provides a server certificate to be used to encrypt messages to the license server.</p>
           <p class="note">The contents of <var title="true">serverCertificate</var> are <a def-id="keysystem"></a>-specific.</p>
@@ -683,7 +683,7 @@
           This promise can only be fulfilled and is never rejected.</p>
         </dd>
       
-        <dt>Promise&lt;void&gt; generateRequest(DOMString initDataType, (ArrayBuffer or ArrayBufferView) initData)</dt>
+        <dt>Promise&lt;void&gt; generateRequest(DOMString initDataType, BufferSource initData)</dt>
         <dd>
           <p>Generates a request based on the <var title="true">initData</var>.</p>
           <p><var title="true">initData</var> is <a def-id="initialization-data"></a>, and
@@ -810,7 +810,7 @@
           </ol>
         </dd>
       
-        <dt>Promise&lt;void&gt; update((ArrayBuffer or ArrayBufferView) response)</dt>
+        <dt>Promise&lt;void&gt; update(BufferSource response)</dt>
         <dd>
           <p>Provides messages, including licenses, to the CDM.</p>
           <p class="note">The contents of <var title="true">response</var> are <a def-id="keysystem"></a>-specific.</p>
--- a/encrypted-media/encrypted-media.html	Mon Oct 20 10:58:19 2014 -0700
+++ b/encrypted-media/encrypted-media.html	Mon Oct 20 11:25:52 2014 -0700
@@ -445,7 +445,7 @@
   </p>
   <h1 class="title p-name" id="title" property="dcterms:title">Encrypted Media Extensions</h1>
   
-  <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-10-20T17:56:29.000Z" id="w3c-editor-s-draft-20-october-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2014-10-20">20 October 2014</time></h2>
+  <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-10-20T18:23:58.000Z" id="w3c-editor-s-draft-20-october-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2014-10-20">20 October 2014</time></h2>
   <dl>
     
       <dt>This version:</dt>
@@ -976,7 +976,7 @@
   
       <pre class="idl"><span class="idlInterface" id="idl-def-MediaKeys">interface <span class="idlInterfaceID">MediaKeys</span> {
 <span class="idlMethod">    <span class="idlMethType"><a href="#idl-def-MediaKeySession" class="idlType"><code>MediaKeySession</code></a></span> <span class="idlMethName"><a href="#widl-MediaKeys-createSession-MediaKeySession-SessionType-sessionType">createSession</a></span> (<span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-SessionType" class="idlType"><code>SessionType</code></a></span> <span class="idlParamName">sessionType</span> = <span class="idlDefaultValue">"temporary"</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>   <span class="idlMethName"><a href="#widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate">setServerCertificate</a></span> (<span class="idlParam"><span class="idlParamType">(ArrayBuffer or ArrayBufferView)</span> <span class="idlParamName">serverCertificate</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>   <span class="idlMethName"><a href="#widl-MediaKeys-setServerCertificate-Promise-void--BufferSource-serverCertificate">setServerCertificate</a></span> (<span class="idlParam"><span class="idlParamType">BufferSource</span> <span class="idlParamName">serverCertificate</span></span>);</span>
 };</span></pre><section id="methods-2"><h3 role="heading" id="h3_methods-2"><span class="secno">4.1 </span>Methods</h3><dl class="methods"><dt id="widl-MediaKeys-createSession-MediaKeySession-SessionType-sessionType"><code>createSession</code></dt><dd>
           <p>Returns a new <code><a href="#idl-def-MediaKeySession">MediaKeySession</a></code> object.</p>
       
@@ -997,13 +997,13 @@
               </ol>
             </li>
             <li><p>Return <var title="true">session</var>.</p></li>
-          </ol></dd><dt id="widl-MediaKeys-setServerCertificate-Promise-void--ArrayBuffer-ArrayBufferView-serverCertificate"><code>setServerCertificate</code></dt><dd>
+          </ol></dd><dt id="widl-MediaKeys-setServerCertificate-Promise-void--BufferSource-serverCertificate"><code>setServerCertificate</code></dt><dd>
           <p id="server-certificate">Provides a server certificate to be used to encrypt messages to the license server.</p>
           <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_12"><span>Note</span></div><p class="">The contents of <var title="true">serverCertificate</var> are <a href="#key-system">Key System</a>-specific.</p></div>
           <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_13"><span>Note</span></div><p class="">Key systems that use such certificates should also support requesting the certificate from the server via an  additional round trip. This simplifies interoperability for applications that are not designed to provide certificates to specific key systems.</p></div>
       
           
-        <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">serverCertificate</td><td class="prmType"><code>(ArrayBuffer or ArrayBufferView)</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;void&gt;</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+        <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">serverCertificate</td><td class="prmType"><code>BufferSource</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;void&gt;</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
             <li><p>If <var title="true">serverCertificate</var> is an empty array, return a promise rejected with a new a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
             <li><p>If the <a href="#cdm">CDM</a> corresponding to the <code><a href="#widl-MediaKeySystemAccess-keySystem">keySystem</a></code> attribute does not support server certificates, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-NotSupportedError">NotSupportedError</a></code>.</p></li>
             <li><p>Let <var>certificate</var> be a copy of the contents of the <var title="true">serverCertificate</var> parameter.</p></li>
@@ -1033,9 +1033,9 @@
 <span class="idlAttribute">    readonly    attribute <span class="idlAttrType">DOMString</span>           <span class="idlAttrName"><a href="#widl-MediaKeySession-sessionId">sessionId</a></span>;</span>
 <span class="idlAttribute">    readonly    attribute <span class="idlAttrType">unrestricted double</span> <span class="idlAttrName"><a href="#widl-MediaKeySession-expiration">expiration</a></span>;</span>
 <span class="idlAttribute">    readonly    attribute <span class="idlAttrType">Promise&lt;void&gt;</span>       <span class="idlAttrName"><a href="#widl-MediaKeySession-closed">closed</a></span>;</span>
-<span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>                  <span class="idlMethName"><a href="#widl-MediaKeySession-generateRequest-Promise-void--DOMString-initDataType-ArrayBuffer-ArrayBufferView-initData">generateRequest</a></span> (<span class="idlParam"><span class="idlParamType">DOMString</span> <span class="idlParamName">initDataType</span></span>, <span class="idlParam"><span class="idlParamType">(ArrayBuffer or ArrayBufferView)</span> <span class="idlParamName">initData</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>                  <span class="idlMethName"><a href="#widl-MediaKeySession-generateRequest-Promise-void--DOMString-initDataType-BufferSource-initData">generateRequest</a></span> (<span class="idlParam"><span class="idlParamType">DOMString</span> <span class="idlParamName">initDataType</span></span>, <span class="idlParam"><span class="idlParamType">BufferSource</span> <span class="idlParamName">initData</span></span>);</span>
 <span class="idlMethod">    <span class="idlMethType">Promise&lt;boolean&gt;</span>               <span class="idlMethName"><a href="#widl-MediaKeySession-load-Promise-boolean--DOMString-sessionId">load</a></span> (<span class="idlParam"><span class="idlParamType">DOMString</span> <span class="idlParamName">sessionId</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>                  <span class="idlMethName"><a href="#widl-MediaKeySession-update-Promise-void--ArrayBuffer-ArrayBufferView-response">update</a></span> (<span class="idlParam"><span class="idlParamType">(ArrayBuffer or ArrayBufferView)</span> <span class="idlParamName">response</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>                  <span class="idlMethName"><a href="#widl-MediaKeySession-update-Promise-void--BufferSource-response">update</a></span> (<span class="idlParam"><span class="idlParamType">BufferSource</span> <span class="idlParamName">response</span></span>);</span>
 <span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>                  <span class="idlMethName"><a href="#widl-MediaKeySession-close-Promise-void">close</a></span> ();</span>
 <span class="idlMethod">    <span class="idlMethType">Promise&lt;void&gt;</span>                  <span class="idlMethName"><a href="#widl-MediaKeySession-remove-Promise-void">remove</a></span> ();</span>
 <span class="idlMethod">    <span class="idlMethType">Promise&lt;sequence&lt;ArrayBuffer&gt;&gt;</span> <span class="idlMethName"><a href="#widl-MediaKeySession-getUsableKeyIds-Promise-sequence-ArrayBuffer">getUsableKeyIds</a></span> ();</span>
@@ -1071,14 +1071,14 @@
               </ol>
             </li>
             <li><p>Return <var>promise</var>.</p></li>
-          </ol></dd><dt id="widl-MediaKeySession-generateRequest-Promise-void--DOMString-initDataType-ArrayBuffer-ArrayBufferView-initData"><code>generateRequest</code></dt><dd>
+          </ol></dd><dt id="widl-MediaKeySession-generateRequest-Promise-void--DOMString-initDataType-BufferSource-initData"><code>generateRequest</code></dt><dd>
           <p>Generates a request based on the <var title="true">initData</var>.</p>
           <p><var title="true">initData</var> is <a href="#initialization-data">Initialization Data</a>, and
           <var title="true">initDataType</var> is an <a href="#initialization-data-type">Initialization Data Type</a> that indicates how to interpret <var title="true">initData</var>.
           </p>
       
           
-        <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">initDataType</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr><tr><td class="prmName">initData</td><td class="prmType"><code>(ArrayBuffer or ArrayBufferView)</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;void&gt;</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+        <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">initDataType</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr><tr><td class="prmName">initData</td><td class="prmType"><code>BufferSource</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;void&gt;</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
             <li><p>If this object's <var title="true">uninitialized</var> value is false, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidStateError">InvalidStateError</a></code>.</p></li>
             <li><p>Let this object's <var title="true">uninitialized</var> be false.</p></li><!-- For simplicity and consistency, this object cannot be reused after any failure. -->
             <li><p>If <var title="true">initDataType</var> is an empty string, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
@@ -1248,12 +1248,12 @@
               </ol>
             </li>
             <li><p>Return <var>promise</var>.</p></li>
-          </ol></dd><dt id="widl-MediaKeySession-update-Promise-void--ArrayBuffer-ArrayBufferView-response"><code>update</code></dt><dd>
+          </ol></dd><dt id="widl-MediaKeySession-update-Promise-void--BufferSource-response"><code>update</code></dt><dd>
           <p>Provides messages, including licenses, to the CDM.</p>
           <div class="note"><div class="note-title" aria-level="2" role="heading" id="h_note_22"><span>Note</span></div><p class="">The contents of <var title="true">response</var> are <a href="#key-system">Key System</a>-specific.</p></div>
       
           
-        <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">response</td><td class="prmType"><code>(ArrayBuffer or ArrayBufferView)</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;void&gt;</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
+        <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">response</td><td class="prmType"><code>BufferSource</code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptFalse"><span role="img" aria-label="False">✘</span></td><td class="prmDesc"></td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;void&gt;</code></div><p>When this method is invoked, the user agent must run the following steps:</p><ol class="method-algorithm">
             <li><p>If this object's <var title="true">callable</var> value is false, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidStateError">InvalidStateError</a></code>.</p></li>
             <li><p>If <var title="true">response</var> is an empty array, return a promise rejected with a new <code><a href="http://heycam.github.io/webidl/#dfn-DOMException">DOMException</a></code> whose name is <code><a href="#dfn-InvalidAccessError">InvalidAccessError</a></code>.</p></li>
             <li><p>Let <var>response copy</var> be a copy of the contents of the <var title="true">response</var> parameter.</p></li>