[EME] Bug 27123 - MediaKeyMessageEvent's type attribute conflicts with Event's type attribute
authorDavid Dorwin <ddorwin@google.com>
Wed, 22 Oct 2014 16:31:12 -0700
changeset 485 8b2f1cee7e87
parent 484 e1d077a277e6
child 486 42ac6086a28a
[EME] Bug 27123 - MediaKeyMessageEvent's type attribute conflicts with Event's type attribute
encrypted-media/encrypted-media-respec.html
encrypted-media/encrypted-media.html
encrypted-media/encrypted-media.js
--- a/encrypted-media/encrypted-media-respec.html	Wed Oct 22 16:30:38 2014 -0700
+++ b/encrypted-media/encrypted-media-respec.html	Wed Oct 22 16:31:12 2014 -0700
@@ -1030,7 +1030,7 @@
           </dt>
           <dd>
   
-          <dt>readonly attribute MediaKeyMessageType type</dt>
+          <dt>readonly attribute MediaKeyMessageType messageType</dt>
           <dd>
             The type of the message.
             <p>Applications MAY ignore this attribute and MUST NOT be required to handle message types.
@@ -1051,7 +1051,7 @@
         <section>
           <h4><a>MediaKeyMessageEventInit</a></h4>
           <dl title="dictionary MediaKeyMessageEventInit : EventInit" class="idl">
-            <dt>MediaKeyMessageType type = "licenserequest"</dt>
+            <dt>MediaKeyMessageType messageType = "licenserequest"</dt>
             <dd>
               The type of the message.
             </dd>
@@ -1106,7 +1106,7 @@
               <p><a def-id="Queue-a-task-to-fire-an-event-named"></a> <a def-id="message"></a> at the <var title="true">session</var>.</p>
               <p>The event is of type <a def-id="MediaKeyMessageEvent"></a> and has:</p>
               <ul style="list-style-type:none"><li>
-                <a def-id="message-event-type-attribute"></a> = the specified <var title="true">message type</var><br></br>
+                <a def-id="message-event-messagetype-attribute"></a> = the specified <var title="true">message type</var><br></br>
                 <a def-id="message-event-message-attribute"></a> = the specified <var title="true">message</var>
               </li></ul>
             </li>
@@ -1727,7 +1727,7 @@
       </p>
       <p>Implementations MUST NOT return active content or passive content that affects program control flow to the application.
       For example, it is not safe to expose URLs or other information that may have come from media data, such as is the case for the <a def-id="initialization-data"></a> passed to <a def-id="generateRequest"></a>.
-      Applications must determine the URLs to use. The <a def-id="message-event-type-attribute"></a> attribute of the <a def-id="message"></a> event can be used by the application to select among a set of URLs if applicable.
+      Applications must determine the URLs to use. The <a def-id="message-event-messagetype-attribute"></a> attribute of the <a def-id="message"></a> event can be used by the application to select among a set of URLs if applicable.
       </p>
       <p>User Agents are responsible for providing users with a secure way to browse the web. Since User Agents may integrate with third party CDM implementations, CDM implementers must provide sufficient information and controls to user agent implementers to enable them to properly asses the security implications of integrating with the Key System.</p>
       <p>Unsandboxed CDMs (or CDMs that use platform features) and UAs that use them must be especially careful in all areas of security, including parsing of key and media data, etc. due to the potential for compromises to provide access to OS/platform features, interact with or run as root, access drivers, kernel, firmware, hardware, etc., all of which may not be written to be robust against hostile software or web-based attacks. Additionally, CDMs may not be updated with security fixes as frequently, especially when part of the OS, platform or hardware.</p>
@@ -2145,7 +2145,7 @@
   }
 
   function handleMessage(event) {
-    sendMessage(event.<a def-id="message-event-type-attribute"></a>, event.<a def-id="message-event-message-attribute"></a>, event.target);
+    sendMessage(event.<a def-id="message-event-messagetype-attribute"></a>, event.<a def-id="message-event-message-attribute"></a>, event.target);
   }
 
   function handleKeysChange(event) {
--- a/encrypted-media/encrypted-media.html	Wed Oct 22 16:30:38 2014 -0700
+++ b/encrypted-media/encrypted-media.html	Wed Oct 22 16:31:12 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-22T23:25:15.000Z" id="w3c-editor-s-draft-22-october-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2014-10-22">22 October 2014</time></h2>
+  <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-10-22T23:29:47.000Z" id="w3c-editor-s-draft-22-october-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2014-10-22">22 October 2014</time></h2>
   <dl>
     
       <dt>This version:</dt>
@@ -1352,13 +1352,13 @@
   
         <pre class="idl"><span class="idlInterface" id="idl-def-MediaKeyMessageEvent">[<span class="idlCtor"> <span class="idlCtorKeyword"></span><span class="idlCtorName"><a href="#widl-ctor-MediaKeyMessageEvent--DOMString-type-MediaKeyMessageEventInit-eventInitDict">Constructor</a></span> (<span class="idlParam"><span class="idlParamType">DOMString</span> <span class="idlParamName">type</span></span>, <span class="idlParam">optional <span class="idlParamType"><a href="#idl-def-MediaKeyMessageEventInit" class="idlType"><code>MediaKeyMessageEventInit</code></a></span> <span class="idlParamName">eventInitDict</span></span>)</span>]
 interface <span class="idlInterfaceID">MediaKeyMessageEvent</span> : <span class="idlSuperclass">Event</span> {
-<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span> <span class="idlAttrName"><a href="#widl-MediaKeyMessageEvent-type">type</a></span>;</span>
+<span class="idlAttribute">    readonly    attribute <span class="idlAttrType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span> <span class="idlAttrName"><a href="#widl-MediaKeyMessageEvent-messageType">messageType</a></span>;</span>
 <span class="idlAttribute">    readonly    attribute <span class="idlAttrType">ArrayBuffer</span>         <span class="idlAttrName"><a href="#widl-MediaKeyMessageEvent-message">message</a></span>;</span>
 };</span></pre><section id="constructors"><h4 role="heading" id="h4_constructors"><span class="secno">5.3.1 </span>Constructors</h4><dl class="constructors"><dt id="widl-ctor-MediaKeyMessageEvent--DOMString-type-MediaKeyMessageEventInit-eventInitDict"><code>MediaKeyMessageEvent</code></dt><dd>
   
           <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">type</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">eventInitDict</td><td class="prmType"><code><a href="#idl-def-MediaKeyMessageEventInit" class="idlType"><code>MediaKeyMessageEventInit</code></a></code></td><td class="prmNullFalse"><span role="img" aria-label="False">✘</span></td><td class="prmOptTrue"><span role="img" aria-label="True">✔</span></td><td class="prmDesc"></td></tr></tbody></table></dd></dl></section><section id="attributes-2"><h4 role="heading" id="h4_attributes-2"><span class="secno">5.3.2 </span>Attributes</h4><dl class="attributes"><dt id="widl-MediaKeyMessageEvent-message"><code>message</code> of type <span class="idlAttrType">ArrayBuffer</span>, readonly   </dt><dd>
             The message from the CDM. Messages are Key System-specific.
-          </dd><dt id="widl-MediaKeyMessageEvent-type"><code>type</code> of type <span class="idlAttrType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span>, readonly   </dt><dd>
+          </dd><dt id="widl-MediaKeyMessageEvent-messageType"><code>messageType</code> of type <span class="idlAttrType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span>, readonly   </dt><dd>
             The type of the message.
             <p>Applications <em class="rfc2119" title="MAY">MAY</em> ignore this attribute and <em class="rfc2119" title="MUST NOT">MUST NOT</em> be required to handle message types.
               Implementations <em class="rfc2119" title="MUST">MUST</em> support applications that do not differentiate messages and <em class="rfc2119" title="MUST NOT">MUST NOT</em> require that applications handle message types.
@@ -1372,11 +1372,11 @@
         <section id="mediakeymessageeventinit">
           <h4 role="heading" id="h4_mediakeymessageeventinit"><span class="secno">5.3.3 </span><a href="#idl-def-MediaKeyMessageEventInit" class="idlType"><code>MediaKeyMessageEventInit</code></a></h4>
           <pre class="idl"><span class="idlDictionary" id="idl-def-MediaKeyMessageEventInit">dictionary <span class="idlDictionaryID">MediaKeyMessageEventInit</span> : <span class="idlSuperclass">EventInit</span> {
-<span class="idlMember">    <span class="idlMemberType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span> <span class="idlMemberName"><a href="#widl-MediaKeyMessageEventInit-type">type</a></span> = <span class="idlMemberValue">"licenserequest"</span>;</span>
+<span class="idlMember">    <span class="idlMemberType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span> <span class="idlMemberName"><a href="#widl-MediaKeyMessageEventInit-messageType">messageType</a></span> = <span class="idlMemberValue">"licenserequest"</span>;</span>
 <span class="idlMember">    <span class="idlMemberType">ArrayBuffer</span>         <span class="idlMemberName"><a href="#widl-MediaKeyMessageEventInit-message">message</a></span> = <span class="idlMemberValue">ArrayBuffer()</span>;</span>
 };</span></pre><section id="dictionary-mediakeymessageeventinit-members"><h5 role="heading" id="h5_dictionary-mediakeymessageeventinit-members"><span class="secno">5.3.3.1 </span>Dictionary <a class="idlType" href="#idl-def-MediaKeyMessageEventInit"><code>MediaKeyMessageEventInit</code></a> Members</h5><dl class="dictionary-members"><dt id="widl-MediaKeyMessageEventInit-message"><code>message</code> of type <span class="idlMemberType">ArrayBuffer</span>, defaulting to <code>ArrayBuffer()</code></dt><dd>
               The message.
-            </dd><dt id="widl-MediaKeyMessageEventInit-type"><code>type</code> of type <span class="idlMemberType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span>, defaulting to <code>"licenserequest"</code></dt><dd>
+            </dd><dt id="widl-MediaKeyMessageEventInit-messageType"><code>messageType</code> of type <span class="idlMemberType"><a href="#idl-def-MediaKeyMessageType" class="idlType"><code>MediaKeyMessageType</code></a></span>, defaulting to <code>"licenserequest"</code></dt><dd>
               The type of the message.
             </dd></dl></section>
         </section>
@@ -1425,7 +1425,7 @@
               <p><a href="http://www.w3.org/TR/html5/webappapis.html#queue-a-task">Queue a task</a> to <a href="http://www.w3.org/TR/html5/webappapis.html#fire-a-simple-event">fire a simple event</a> named <code><a href="#dom-evt-message">message</a></code> at the <var title="true">session</var>.</p>
               <p>The event is of type <code><a href="#idl-def-MediaKeyMessageEvent">MediaKeyMessageEvent</a></code> and has:</p>
               <ul style="list-style-type:none"><li>
-                <code><a href="#widl-MediaKeyMessageEvent-type">type</a></code> = the specified <var title="true">message type</var><br><br>
+                <code><a href="#widl-MediaKeyMessageEvent-messageType">messageType</a></code> = the specified <var title="true">message type</var><br><br>
                 <code><a href="#widl-MediaKeyMessageEvent-message">message</a></code> = the specified <var title="true">message</var>
               </li></ul>
             </li>
@@ -2023,7 +2023,7 @@
       </p>
       <p>Implementations <em class="rfc2119" title="MUST NOT">MUST NOT</em> return active content or passive content that affects program control flow to the application.
       For example, it is not safe to expose URLs or other information that may have come from media data, such as is the case for the <a href="#initialization-data">Initialization Data</a> passed to <code><a href="#widl-MediaKeySession-generateRequest-Promise-void--DOMString-initDataType-BufferSource-initData">generateRequest()</a></code>.
-      Applications must determine the URLs to use. The <code><a href="#widl-MediaKeyMessageEvent-type">type</a></code> attribute of the <code><a href="#dom-evt-message">message</a></code> event can be used by the application to select among a set of URLs if applicable.
+      Applications must determine the URLs to use. The <code><a href="#widl-MediaKeyMessageEvent-messageType">messageType</a></code> attribute of the <code><a href="#dom-evt-message">message</a></code> event can be used by the application to select among a set of URLs if applicable.
       </p>
       <p>User Agents are responsible for providing users with a secure way to browse the web. Since User Agents may integrate with third party CDM implementations, CDM implementers must provide sufficient information and controls to user agent implementers to enable them to properly asses the security implications of integrating with the Key System.</p>
       <p>Unsandboxed CDMs (or CDMs that use platform features) and UAs that use them must be especially careful in all areas of security, including parsing of key and media data, etc. due to the potential for compromises to provide access to OS/platform features, interact with or run as root, access drivers, kernel, firmware, hardware, etc., all of which may not be written to be robust against hostile software or web-based attacks. Additionally, CDMs may not be updated with security fixes as frequently, especially when part of the OS, platform or hardware.</p>
@@ -2434,7 +2434,7 @@
   </span><span class="pun">}</span><span class="pln">
 
   </span><span class="kwd">function</span><span class="pln"> handleMessage</span><span class="pun">(</span><span class="pln">event</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
-    sendMessage</span><span class="pun">(</span><span class="pln">event</span><span class="pun">.</span><code><a href="#widl-MediaKeyMessageEvent-type">type</a></code><span class="pun">,</span><span class="pln"> event</span><span class="pun">.</span><code><a href="#widl-MediaKeyMessageEvent-message">message</a></code><span class="pun">,</span><span class="pln"> event</span><span class="pun">.</span><span class="pln">target</span><span class="pun">);</span><span class="pln">
+    sendMessage</span><span class="pun">(</span><span class="pln">event</span><span class="pun">.</span><code><a href="#widl-MediaKeyMessageEvent-messageType">messageType</a></code><span class="pun">,</span><span class="pln"> event</span><span class="pun">.</span><code><a href="#widl-MediaKeyMessageEvent-message">message</a></code><span class="pun">,</span><span class="pln"> event</span><span class="pun">.</span><span class="pln">target</span><span class="pun">);</span><span class="pln">
   </span><span class="pun">}</span><span class="pln">
 
   </span><span class="kwd">function</span><span class="pln"> handleKeysChange</span><span class="pun">(</span><span class="pln">event</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
--- a/encrypted-media/encrypted-media.js	Wed Oct 22 16:30:38 2014 -0700
+++ b/encrypted-media/encrypted-media.js	Wed Oct 22 16:31:12 2014 -0700
@@ -241,7 +241,7 @@
 
     'MediaKeyMessageType': { func: idlref_helper, fragment: 'idl-def-MediaKeyMessageType', link_text: 'MediaKeyMessageType',  },
     'MediaKeyMessageEvent': { func: idlref_helper, fragment: 'idl-def-MediaKeyMessageEvent', link_text: 'MediaKeyMessageEvent',  },
-    'message-event-type-attribute': { func: idlref_helper, fragment: 'widl-MediaKeyMessageEvent-type', link_text: 'type',  },
+    'message-event-messagetype-attribute': { func: idlref_helper, fragment: 'widl-MediaKeyMessageEvent-messageType', link_text: 'messageType',  },
     'message-event-message-attribute': { func: idlref_helper, fragment: 'widl-MediaKeyMessageEvent-message', link_text: 'message',  },
     'MediaEncryptedEvent': { func: idlref_helper, fragment: 'idl-def-MediaEncryptedEvent', link_text: 'MediaEncryptedEvent',  },
     'encrypted-event-initdatatype-attribute': { func: idlref_helper, fragment: 'widl-MediaEncryptedEventInit-initDataType', link_text: 'initDataType',  },