<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[208539] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/208539">208539</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2016-11-10 09:08:41 -0800 (Thu, 10 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[EME] Add no-op Web-facing APIs
https://bugs.webkit.org/show_bug.cgi?id=164028

Reviewed by Jer Noble.

LayoutTests/imported/w3c:

Add the text baseline for the web-platform-tests/encrypted-media/idlharness.html
test. It's the only meaningful test we can run at the moment, and all but one of
the subtests pass.

* web-platform-tests/encrypted-media/idlharness-expected.txt: Added.

Source/WebCore:

Add no-op implementation of the Web-facing APIs as defined in
the EME specification. This will be the basis for implementing
the various algorithms the same specification defines, and for
implementing the relevant platform abstractions.

Dictionaries and enumerations defined by the specification are
defined in separate headers, and not in the implementation files
for the class where they are used. This will ease their use
across different implementation files.

BufferSource now exposes the Variant object it holds. This is
needed to support the iterable property on the MediaKeyStatusMap
class.

CodeGeneratorJS is fixed to support JS-to-native conversion of
sequences of dictionaries.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Added.
(WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent):
(WebCore::MediaKeyMessageEvent::eventInterface):
* Modules/encryptedmedia/MediaKeyMessageEvent.h: Added.
* Modules/encryptedmedia/MediaKeyMessageEvent.idl: Added.
* Modules/encryptedmedia/MediaKeyMessageEventInit.h: Added.
(WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit):
* Modules/encryptedmedia/MediaKeyMessageType.h: Added.
* Modules/encryptedmedia/MediaKeySession.cpp: Added.
(WebCore::MediaKeySession::create):
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::sessionId):
(WebCore::MediaKeySession::expiration):
(WebCore::MediaKeySession::keyStatuses):
(WebCore::MediaKeySession::generateRequest):
(WebCore::MediaKeySession::load):
(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::close):
(WebCore::MediaKeySession::remove):
(WebCore::MediaKeySession::hasPendingActivity):
(WebCore::MediaKeySession::activeDOMObjectName):
(WebCore::MediaKeySession::canSuspendForDocumentSuspension):
(WebCore::MediaKeySession::stop):
* Modules/encryptedmedia/MediaKeySession.h: Added.
* Modules/encryptedmedia/MediaKeySession.idl: Added.
* Modules/encryptedmedia/MediaKeySessionType.h: Added.
* Modules/encryptedmedia/MediaKeyStatus.h: Added.
* Modules/encryptedmedia/MediaKeyStatusMap.cpp: Added.
(WebCore::MediaKeyStatusMap::size):
(WebCore::MediaKeyStatusMap::has):
(WebCore::MediaKeyStatusMap::get):
(WebCore::MediaKeyStatusMap::Iterator::Iterator):
(WebCore::MediaKeyStatusMap::Iterator::next):
* Modules/encryptedmedia/MediaKeyStatusMap.h: Added.
(WebCore::MediaKeyStatusMap::create):
(WebCore::MediaKeyStatusMap::createIterator):
* Modules/encryptedmedia/MediaKeyStatusMap.idl: Added.
* Modules/encryptedmedia/MediaKeySystemAccess.cpp: Added.
(WebCore::MediaKeySystemAccess::keySystem):
(WebCore::MediaKeySystemAccess::getConfiguration):
(WebCore::MediaKeySystemAccess::createMediaKeys):
* Modules/encryptedmedia/MediaKeySystemAccess.h: Added.
(WebCore::MediaKeySystemAccess::create):
* Modules/encryptedmedia/MediaKeySystemAccess.idl: Added.
* Modules/encryptedmedia/MediaKeySystemConfiguration.h: Added.
* Modules/encryptedmedia/MediaKeySystemConfiguration.idl: Added.
* Modules/encryptedmedia/MediaKeySystemMediaCapability.h: Added.
* Modules/encryptedmedia/MediaKeySystemMediaCapability.idl: Added.
* Modules/encryptedmedia/MediaKeys.cpp: Added.
(WebCore::MediaKeys::createSession):
(WebCore::MediaKeys::setServerCertificate):
* Modules/encryptedmedia/MediaKeys.h: Added.
(WebCore::MediaKeys::create):
* Modules/encryptedmedia/MediaKeys.idl: Added.
* Modules/encryptedmedia/MediaKeysRequirement.h: Added.
* Modules/encryptedmedia/NavigatorEME.cpp: Added.
(WebCore::NavigatorEME::requestMediaKeySystemAccess):
* Modules/encryptedmedia/NavigatorEME.h: Added.
* Modules/encryptedmedia/NavigatorEME.idl: Added.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/BufferSource.h:
(WebCore::BufferSource::BufferSource):
(WebCore::BufferSource::variant):
* bindings/js/JSMediaKeySessionCustom.cpp: Added.
(WebCore::JSMediaKeySession::closed):
* bindings/js/JSMediaKeySystemAccessCustom.cpp: Added.
(WebCore::JSMediaKeySystemAccess::getConfiguration):
* bindings/scripts/CodeGeneratorJS.pm:
(GetNativeVectorInnerType):
* dom/EventNames.h:
* dom/EventNames.in:
* dom/EventTargetFactory.in:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaKeys):
(WebCore::HTMLMediaElement::setMediaKeys):
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:
* html/MediaEncryptedEvent.cpp: Added.
(WebCore::MediaEncryptedEvent::MediaEncryptedEvent):
(WebCore::MediaEncryptedEvent::eventInterface):
(WebCore::MediaEncryptedEvent::initDataType):
(WebCore::MediaEncryptedEvent::initData):
* html/MediaEncryptedEvent.h: Added.
* html/MediaEncryptedEvent.idl: Added.
* html/MediaEncryptedEventInit.h: Added.
(WebCore::MediaEncryptedEventInit::MediaEncryptedEventInit):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcescpp">trunk/Source/WebCore/DerivedSources.cpp</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsBufferSourceh">trunk/Source/WebCore/bindings/js/BufferSource.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCoredomEventNamesh">trunk/Source/WebCore/dom/EventNames.h</a></li>
<li><a href="#trunkSourceWebCoredomEventNamesin">trunk/Source/WebCore/dom/EventNames.in</a></li>
<li><a href="#trunkSourceWebCoredomEventTargetFactoryin">trunk/Source/WebCore/dom/EventTargetFactory.in</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementh">trunk/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementidl">trunk/Source/WebCore/html/HTMLMediaElement.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsencryptedmediaidlharnessexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/encrypted-media/idlharness-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyMessageEventcpp">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyMessageEventh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyMessageEventidl">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyMessageEventInith">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEventInit.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyMessageTypeh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageType.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySessioncpp">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySessionh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySessionidl">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySessionTypeh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySessionType.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyStatush">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatus.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyStatusMapcpp">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyStatusMaph">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyStatusMapidl">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySystemAccesscpp">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySystemAccessh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySystemAccessidl">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySystemConfigurationh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySystemConfigurationidl">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySystemMediaCapabilityh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySystemMediaCapabilityidl">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyscpp">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeysh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeysidl">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeysRequirementh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeysRequirement.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaNavigatorEMEcpp">trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaNavigatorEMEh">trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaNavigatorEMEidl">trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMediaKeySessionCustomcpp">trunk/Source/WebCore/bindings/js/JSMediaKeySessionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMediaKeySystemAccessCustomcpp">trunk/Source/WebCore/bindings/js/JSMediaKeySystemAccessCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlMediaEncryptedEventcpp">trunk/Source/WebCore/html/MediaEncryptedEvent.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlMediaEncryptedEventh">trunk/Source/WebCore/html/MediaEncryptedEvent.h</a></li>
<li><a href="#trunkSourceWebCorehtmlMediaEncryptedEventidl">trunk/Source/WebCore/html/MediaEncryptedEvent.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlMediaEncryptedEventInith">trunk/Source/WebCore/html/MediaEncryptedEventInit.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-11-10  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        [EME] Add no-op Web-facing APIs
+        https://bugs.webkit.org/show_bug.cgi?id=164028
+
+        Reviewed by Jer Noble.
+
+        Add the text baseline for the web-platform-tests/encrypted-media/idlharness.html
+        test. It's the only meaningful test we can run at the moment, and all but one of
+        the subtests pass.
+
+        * web-platform-tests/encrypted-media/idlharness-expected.txt: Added.
+
</ins><span class="cx"> 2016-11-08  Philippe Normand  &lt;pnormand@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebRTC] white-list turns urls from the RTCConfiguration
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsencryptedmediaidlharnessexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/encrypted-media/idlharness-expected.txt (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/encrypted-media/idlharness-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/encrypted-media/idlharness-expected.txt        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+Description
+
+This test verifies that implementations of the Encrypted Media Extensions API match its WebIDL definition.
+
+
+PASS Navigator interface: operation requestMediaKeySystemAccess(DOMString,[object Object]) 
+PASS HTMLMediaElement interface: attribute mediaKeys 
+PASS HTMLMediaElement interface: attribute onencrypted 
+PASS HTMLMediaElement interface: attribute onwaitingforkey 
+PASS HTMLMediaElement interface: operation setMediaKeys(MediaKeys) 
+PASS MediaKeySystemAccess interface: existence and properties of interface object 
+PASS MediaKeySystemAccess interface object length 
+PASS MediaKeySystemAccess interface object name 
+PASS MediaKeySystemAccess interface: existence and properties of interface prototype object 
+PASS MediaKeySystemAccess interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
+PASS MediaKeySystemAccess interface: attribute keySystem 
+PASS MediaKeySystemAccess interface: operation getConfiguration() 
+PASS MediaKeySystemAccess interface: operation createMediaKeys() 
+PASS MediaKeys interface: existence and properties of interface object 
+PASS MediaKeys interface object length 
+PASS MediaKeys interface object name 
+PASS MediaKeys interface: existence and properties of interface prototype object 
+PASS MediaKeys interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
+PASS MediaKeys interface: operation createSession(MediaKeySessionType) 
+PASS MediaKeys interface: operation setServerCertificate(BufferSource) 
+PASS MediaKeySession interface: existence and properties of interface object 
+PASS MediaKeySession interface object length 
+PASS MediaKeySession interface object name 
+PASS MediaKeySession interface: existence and properties of interface prototype object 
+PASS MediaKeySession interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
+PASS MediaKeySession interface: attribute sessionId 
+PASS MediaKeySession interface: attribute expiration 
+FAIL MediaKeySession interface: attribute closed assert_throws: getting property on prototype object must throw TypeError function &quot;function () {
+    [native code]
+}&quot; did not throw
+PASS MediaKeySession interface: attribute keyStatuses 
+PASS MediaKeySession interface: attribute onkeystatuseschange 
+PASS MediaKeySession interface: attribute onmessage 
+PASS MediaKeySession interface: operation generateRequest(DOMString,BufferSource) 
+PASS MediaKeySession interface: operation load(DOMString) 
+PASS MediaKeySession interface: operation update(BufferSource) 
+PASS MediaKeySession interface: operation close() 
+PASS MediaKeySession interface: operation remove() 
+PASS MediaKeyStatusMap interface: existence and properties of interface object 
+PASS MediaKeyStatusMap interface object length 
+PASS MediaKeyStatusMap interface object name 
+PASS MediaKeyStatusMap interface: existence and properties of interface prototype object 
+PASS MediaKeyStatusMap interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
+PASS MediaKeyStatusMap interface: attribute size 
+PASS MediaKeyStatusMap interface: operation has(BufferSource) 
+PASS MediaKeyStatusMap interface: operation get(BufferSource) 
+PASS MediaKeyMessageEvent interface: existence and properties of interface object 
+PASS MediaKeyMessageEvent interface object length 
+PASS MediaKeyMessageEvent interface object name 
+PASS MediaKeyMessageEvent interface: existence and properties of interface prototype object 
+PASS MediaKeyMessageEvent interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
+PASS MediaKeyMessageEvent interface: attribute messageType 
+PASS MediaKeyMessageEvent interface: attribute message 
+PASS MediaEncryptedEvent interface: existence and properties of interface object 
+PASS MediaEncryptedEvent interface object length 
+PASS MediaEncryptedEvent interface object name 
+PASS MediaEncryptedEvent interface: existence and properties of interface prototype object 
+PASS MediaEncryptedEvent interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
+PASS MediaEncryptedEvent interface: attribute initDataType 
+PASS MediaEncryptedEvent interface: attribute initData 
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -1161,6 +1161,8 @@
</span><span class="cx">     bindings/js/JSLocationCustom.cpp
</span><span class="cx">     bindings/js/JSMainThreadExecState.cpp
</span><span class="cx">     bindings/js/JSMediaDevicesCustom.cpp
</span><ins>+    bindings/js/JSMediaKeySessionCustom.cpp
+    bindings/js/JSMediaKeySystemAccessCustom.cpp
</ins><span class="cx">     bindings/js/JSMediaStreamTrackCustom.cpp
</span><span class="cx">     bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp
</span><span class="cx">     bindings/js/JSMessageChannelCustom.cpp
</span><span class="lines">@@ -3042,6 +3044,33 @@
</span><span class="cx">     )
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><ins>+if (ENABLE_ENCRYPTED_MEDIA)
+    list(APPEND WebCore_SOURCES
+        Modules/encryptedmedia/MediaKeyMessageEvent.cpp
+        Modules/encryptedmedia/MediaKeySession.cpp
+        Modules/encryptedmedia/MediaKeyStatusMap.cpp
+        Modules/encryptedmedia/MediaKeySystemAccess.cpp
+        Modules/encryptedmedia/MediaKeys.cpp
+        Modules/encryptedmedia/NavigatorEME.cpp
+
+        html/MediaEncryptedEvent.cpp
+    )
+    list(APPEND WebCore_IDL_FILES
+    )
+    list(APPEND WebCore_IDL_FILES
+        Modules/encryptedmedia/MediaKeyMessageEvent.idl
+        Modules/encryptedmedia/MediaKeySession.idl
+        Modules/encryptedmedia/MediaKeyStatusMap.idl
+        Modules/encryptedmedia/MediaKeySystemAccess.idl
+        Modules/encryptedmedia/MediaKeySystemConfiguration.idl
+        Modules/encryptedmedia/MediaKeySystemMediaCapability.idl
+        Modules/encryptedmedia/MediaKeys.idl
+        Modules/encryptedmedia/NavigatorEME.idl
+
+        html/MediaEncryptedEvent.idl
+    )
+endif ()
+
</ins><span class="cx"> list(APPEND WebCore_CSS_VALUE_KEYWORDS
</span><span class="cx">     ${WEBCORE_DIR}/css/SVGCSSValueKeywords.in
</span><span class="cx"> )
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/ChangeLog        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -1,3 +1,117 @@
</span><ins>+2016-11-10  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        [EME] Add no-op Web-facing APIs
+        https://bugs.webkit.org/show_bug.cgi?id=164028
+
+        Reviewed by Jer Noble.
+
+        Add no-op implementation of the Web-facing APIs as defined in
+        the EME specification. This will be the basis for implementing
+        the various algorithms the same specification defines, and for
+        implementing the relevant platform abstractions.
+
+        Dictionaries and enumerations defined by the specification are
+        defined in separate headers, and not in the implementation files
+        for the class where they are used. This will ease their use
+        across different implementation files.
+
+        BufferSource now exposes the Variant object it holds. This is
+        needed to support the iterable property on the MediaKeyStatusMap
+        class.
+
+        CodeGeneratorJS is fixed to support JS-to-native conversion of
+        sequences of dictionaries.
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Added.
+        (WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent):
+        (WebCore::MediaKeyMessageEvent::eventInterface):
+        * Modules/encryptedmedia/MediaKeyMessageEvent.h: Added.
+        * Modules/encryptedmedia/MediaKeyMessageEvent.idl: Added.
+        * Modules/encryptedmedia/MediaKeyMessageEventInit.h: Added.
+        (WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit):
+        * Modules/encryptedmedia/MediaKeyMessageType.h: Added.
+        * Modules/encryptedmedia/MediaKeySession.cpp: Added.
+        (WebCore::MediaKeySession::create):
+        (WebCore::MediaKeySession::MediaKeySession):
+        (WebCore::MediaKeySession::sessionId):
+        (WebCore::MediaKeySession::expiration):
+        (WebCore::MediaKeySession::keyStatuses):
+        (WebCore::MediaKeySession::generateRequest):
+        (WebCore::MediaKeySession::load):
+        (WebCore::MediaKeySession::update):
+        (WebCore::MediaKeySession::close):
+        (WebCore::MediaKeySession::remove):
+        (WebCore::MediaKeySession::hasPendingActivity):
+        (WebCore::MediaKeySession::activeDOMObjectName):
+        (WebCore::MediaKeySession::canSuspendForDocumentSuspension):
+        (WebCore::MediaKeySession::stop):
+        * Modules/encryptedmedia/MediaKeySession.h: Added.
+        * Modules/encryptedmedia/MediaKeySession.idl: Added.
+        * Modules/encryptedmedia/MediaKeySessionType.h: Added.
+        * Modules/encryptedmedia/MediaKeyStatus.h: Added.
+        * Modules/encryptedmedia/MediaKeyStatusMap.cpp: Added.
+        (WebCore::MediaKeyStatusMap::size):
+        (WebCore::MediaKeyStatusMap::has):
+        (WebCore::MediaKeyStatusMap::get):
+        (WebCore::MediaKeyStatusMap::Iterator::Iterator):
+        (WebCore::MediaKeyStatusMap::Iterator::next):
+        * Modules/encryptedmedia/MediaKeyStatusMap.h: Added.
+        (WebCore::MediaKeyStatusMap::create):
+        (WebCore::MediaKeyStatusMap::createIterator):
+        * Modules/encryptedmedia/MediaKeyStatusMap.idl: Added.
+        * Modules/encryptedmedia/MediaKeySystemAccess.cpp: Added.
+        (WebCore::MediaKeySystemAccess::keySystem):
+        (WebCore::MediaKeySystemAccess::getConfiguration):
+        (WebCore::MediaKeySystemAccess::createMediaKeys):
+        * Modules/encryptedmedia/MediaKeySystemAccess.h: Added.
+        (WebCore::MediaKeySystemAccess::create):
+        * Modules/encryptedmedia/MediaKeySystemAccess.idl: Added.
+        * Modules/encryptedmedia/MediaKeySystemConfiguration.h: Added.
+        * Modules/encryptedmedia/MediaKeySystemConfiguration.idl: Added.
+        * Modules/encryptedmedia/MediaKeySystemMediaCapability.h: Added.
+        * Modules/encryptedmedia/MediaKeySystemMediaCapability.idl: Added.
+        * Modules/encryptedmedia/MediaKeys.cpp: Added.
+        (WebCore::MediaKeys::createSession):
+        (WebCore::MediaKeys::setServerCertificate):
+        * Modules/encryptedmedia/MediaKeys.h: Added.
+        (WebCore::MediaKeys::create):
+        * Modules/encryptedmedia/MediaKeys.idl: Added.
+        * Modules/encryptedmedia/MediaKeysRequirement.h: Added.
+        * Modules/encryptedmedia/NavigatorEME.cpp: Added.
+        (WebCore::NavigatorEME::requestMediaKeySystemAccess):
+        * Modules/encryptedmedia/NavigatorEME.h: Added.
+        * Modules/encryptedmedia/NavigatorEME.idl: Added.
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/BufferSource.h:
+        (WebCore::BufferSource::BufferSource):
+        (WebCore::BufferSource::variant):
+        * bindings/js/JSMediaKeySessionCustom.cpp: Added.
+        (WebCore::JSMediaKeySession::closed):
+        * bindings/js/JSMediaKeySystemAccessCustom.cpp: Added.
+        (WebCore::JSMediaKeySystemAccess::getConfiguration):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GetNativeVectorInnerType):
+        * dom/EventNames.h:
+        * dom/EventNames.in:
+        * dom/EventTargetFactory.in:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::mediaKeys):
+        (WebCore::HTMLMediaElement::setMediaKeys):
+        * html/HTMLMediaElement.h:
+        * html/HTMLMediaElement.idl:
+        * html/MediaEncryptedEvent.cpp: Added.
+        (WebCore::MediaEncryptedEvent::MediaEncryptedEvent):
+        (WebCore::MediaEncryptedEvent::eventInterface):
+        (WebCore::MediaEncryptedEvent::initDataType):
+        (WebCore::MediaEncryptedEvent::initData):
+        * html/MediaEncryptedEvent.h: Added.
+        * html/MediaEncryptedEvent.idl: Added.
+        * html/MediaEncryptedEventInit.h: Added.
+        (WebCore::MediaEncryptedEventInit::MediaEncryptedEventInit):
+
</ins><span class="cx"> 2016-11-10  Antoine Quint  &lt;graouts@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Modern Media Controls] Media Controller: update controls based on fullscreen playback on macOS
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/DerivedSources.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -326,6 +326,15 @@
</span><span class="cx"> #include &quot;JSMediaElementAudioSourceNode.cpp&quot;
</span><span class="cx"> #endif
</span><span class="cx"> #include &quot;JSMediaError.cpp&quot;
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA)
+#include &quot;JSMediaKeyMessageEvent.cpp&quot;
+#include &quot;JSMediaKeySession.cpp&quot;
+#include &quot;JSMediaKeyStatusMap.cpp&quot;
+#include &quot;JSMediaKeySystemAccess.cpp&quot;
+#include &quot;JSMediaKeySystemConfiguration.cpp&quot;
+#include &quot;JSMediaKeySystemMediaCapability.cpp&quot;
+#include &quot;JSMediaKeys.cpp&quot;
+#endif
</ins><span class="cx"> #include &quot;JSMediaList.cpp&quot;
</span><span class="cx"> #include &quot;JSMediaQueryList.cpp&quot;
</span><span class="cx"> #include &quot;JSMediaQueryListListener.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/DerivedSources.make        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx">     $(WebCore) \
</span><span class="cx">     $(WebCore)/Modules/airplay \
</span><span class="cx">     $(WebCore)/Modules/applepay \
</span><ins>+    $(WebCore)/Modules/encryptedmedia \
</ins><span class="cx">     $(WebCore)/Modules/encryptedmedia/legacy \
</span><span class="cx">     $(WebCore)/Modules/fetch \
</span><span class="cx">     $(WebCore)/Modules/gamepad \
</span><span class="lines">@@ -83,6 +84,14 @@
</span><span class="cx">     $(WebCore)/Modules/applepay/ApplePayShippingContactSelectedEvent.idl \
</span><span class="cx">     $(WebCore)/Modules/applepay/ApplePayShippingMethodSelectedEvent.idl \
</span><span class="cx">     $(WebCore)/Modules/applepay/ApplePayValidateMerchantEvent.idl \
</span><ins>+    $(WebCore)/Modules/encryptedmedia/MediaKeyMessageEvent.idl \
+    $(WebCore)/Modules/encryptedmedia/MediaKeySession.idl \
+    $(WebCore)/Modules/encryptedmedia/MediaKeyStatusMap.idl \
+    $(WebCore)/Modules/encryptedmedia/MediaKeySystemAccess.idl \
+    $(WebCore)/Modules/encryptedmedia/MediaKeySystemConfiguration.idl \
+    $(WebCore)/Modules/encryptedmedia/MediaKeySystemMediaCapability.idl \
+    $(WebCore)/Modules/encryptedmedia/MediaKeys.idl \
+    $(WebCore)/Modules/encryptedmedia/NavigatorEME.idl \
</ins><span class="cx">     $(WebCore)/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl \
</span><span class="cx">     $(WebCore)/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl \
</span><span class="cx">     $(WebCore)/Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl \
</span><span class="lines">@@ -462,6 +471,7 @@
</span><span class="cx">     $(WebCore)/html/HTMLVideoElement.idl \
</span><span class="cx">     $(WebCore)/html/ImageData.idl \
</span><span class="cx">     $(WebCore)/html/MediaController.idl \
</span><ins>+    $(WebCore)/html/MediaEncryptedEvent.idl \
</ins><span class="cx">     $(WebCore)/html/MediaError.idl \
</span><span class="cx">     $(WebCore)/html/RadioNodeList.idl \
</span><span class="cx">     $(WebCore)/html/TextMetrics.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyMessageEventcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MediaKeyMessageEvent.h&quot;
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;EventNames.h&quot;
+
+namespace WebCore {
+
+MediaKeyMessageEvent::MediaKeyMessageEvent(const AtomicString&amp; type, const MediaKeyMessageEvent::Init&amp; initializer, IsTrusted isTrusted)
+    : Event(type, initializer, isTrusted)
+    , m_messageType(initializer.messageType)
+    , m_message(initializer.message)
+{
+}
+
+MediaKeyMessageEvent::~MediaKeyMessageEvent() = default;
+
+EventInterface MediaKeyMessageEvent::eventInterface() const
+{
+    return MediaKeyMessageEventInterfaceType;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyMessageEventh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;Event.h&quot;
+#include &quot;MediaKeyMessageEventInit.h&quot;
+#include &quot;MediaKeyMessageType.h&quot;
+#include &lt;runtime/ArrayBuffer.h&gt;
+
+namespace WebCore {
+
+class MediaKeyMessageEvent final : public Event {
+public:
+    using Type = MediaKeyMessageType;
+    using Init = MediaKeyMessageEventInit;
+
+    virtual ~MediaKeyMessageEvent();
+
+    static Ref&lt;MediaKeyMessageEvent&gt; create(const AtomicString&amp; type, const MediaKeyMessageEventInit&amp; initializer, IsTrusted isTrusted = IsTrusted::No)
+    {
+        return adoptRef(*new MediaKeyMessageEvent(type, initializer, isTrusted));
+    }
+
+    Type messageType() const { return m_messageType; }
+    RefPtr&lt;JSC::ArrayBuffer&gt; message() const { return m_message; }
+
+private:
+    MediaKeyMessageEvent(const AtomicString&amp;, const MediaKeyMessageEventInit&amp;, IsTrusted);
+
+    // Event
+    EventInterface eventInterface() const override;
+
+    MediaKeyMessageType m_messageType;
+    RefPtr&lt;JSC::ArrayBuffer&gt; m_message;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyMessageEventidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum MediaKeyMessageType {
+    &quot;license-request&quot;,
+    &quot;license-renewal&quot;,
+    &quot;license-release&quot;,
+    &quot;individualization-request&quot;
+};
+
+dictionary MediaKeyMessageEventInit : EventInit {
+    required MediaKeyMessageType messageType;
+    required ArrayBuffer message;
+};
+
+[
+    Conditional=ENCRYPTED_MEDIA,
+    Constructor(DOMString type, MediaKeyMessageEventInit eventInitDict),
+] interface MediaKeyMessageEvent : Event {
+    readonly attribute MediaKeyMessageType messageType;
+    readonly attribute ArrayBuffer message;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyMessageEventInith"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEventInit.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEventInit.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEventInit.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;Event.h&quot;
+#include &quot;MediaKeyMessageType.h&quot;
+#include &lt;runtime/ArrayBuffer.h&gt;
+
+namespace WebCore {
+
+struct MediaKeyMessageEventInit : EventInit {
+    MediaKeyMessageEventInit() = default;
+
+    MediaKeyMessageEventInit(MediaKeyMessageType messageType, RefPtr&lt;JSC::ArrayBuffer&gt;&amp;&amp; message)
+        : EventInit()
+        , messageType(messageType)
+        , message(WTFMove(message))
+    { }
+
+    MediaKeyMessageType messageType;
+    RefPtr&lt;JSC::ArrayBuffer&gt; message;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyMessageTypeh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageType.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageType.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageType.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+namespace WebCore {
+
+enum class MediaKeyMessageType {
+    LicenseRequest,
+    LicenseRenewal,
+    LicenseRelease,
+    IndividualizationRequest
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySessioncpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,121 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MediaKeySession.h&quot;
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;MediaKeyStatusMap.h&quot;
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+Ref&lt;MediaKeySession&gt; MediaKeySession::create(ScriptExecutionContext&amp; context)
+{
+    auto session = adoptRef(*new MediaKeySession(context));
+    session-&gt;suspendIfNeeded();
+    return session;
+}
+
+MediaKeySession::MediaKeySession(ScriptExecutionContext&amp; context)
+    : ActiveDOMObject(&amp;context)
+{
+}
+
+MediaKeySession::~MediaKeySession() = default;
+
+const String&amp; MediaKeySession::sessionId() const
+{
+    notImplemented();
+    return emptyString();
+}
+
+double MediaKeySession::expiration() const
+{
+    notImplemented();
+    return 0;
+}
+
+RefPtr&lt;MediaKeyStatusMap&gt; MediaKeySession::keyStatuses() const
+{
+    notImplemented();
+    return nullptr;
+}
+
+void MediaKeySession::generateRequest(const String&amp;, const BufferSource&amp;, Ref&lt;DeferredPromise&gt;&amp;&amp;)
+{
+    notImplemented();
+}
+
+void MediaKeySession::load(const String&amp;, Ref&lt;DeferredPromise&gt;&amp;&amp;)
+{
+    notImplemented();
+}
+
+void MediaKeySession::update(const BufferSource&amp;, Ref&lt;DeferredPromise&gt;&amp;&amp;)
+{
+    notImplemented();
+}
+
+void MediaKeySession::close(Ref&lt;DeferredPromise&gt;&amp;&amp;)
+{
+    notImplemented();
+}
+
+void MediaKeySession::remove(Ref&lt;DeferredPromise&gt;&amp;&amp;)
+{
+    notImplemented();
+}
+
+bool MediaKeySession::hasPendingActivity() const
+{
+    notImplemented();
+    return false;
+}
+
+const char* MediaKeySession::activeDOMObjectName() const
+{
+    notImplemented();
+    return &quot;MediaKeySession&quot;;
+}
+
+bool MediaKeySession::canSuspendForDocumentSuspension() const
+{
+    notImplemented();
+    return false;
+}
+
+void MediaKeySession::stop()
+{
+    notImplemented();
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySessionh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,83 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;ActiveDOMObject.h&quot;
+#include &quot;EventTarget.h&quot;
+#include &quot;GenericEventQueue.h&quot;
+#include &quot;JSDOMPromise.h&quot;
+#include &quot;MediaKeySessionType.h&quot;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+class BufferSource;
+class MediaKeyStatusMap;
+class MediaKeys;
+
+class MediaKeySession final : public RefCounted&lt;MediaKeySession&gt;, public EventTargetWithInlineData, public ActiveDOMObject {
+public:
+    static Ref&lt;MediaKeySession&gt; create(ScriptExecutionContext&amp;);
+    virtual ~MediaKeySession();
+
+    using RefCounted&lt;MediaKeySession&gt;::ref;
+    using RefCounted&lt;MediaKeySession&gt;::deref;
+
+    const String&amp; sessionId() const;
+    double expiration() const;
+    RefPtr&lt;MediaKeyStatusMap&gt; keyStatuses() const;
+
+    void generateRequest(const String&amp;, const BufferSource&amp;, Ref&lt;DeferredPromise&gt;&amp;&amp;);
+    void load(const String&amp;, Ref&lt;DeferredPromise&gt;&amp;&amp;);
+    void update(const BufferSource&amp;, Ref&lt;DeferredPromise&gt;&amp;&amp;);
+    void close(Ref&lt;DeferredPromise&gt;&amp;&amp;);
+    void remove(Ref&lt;DeferredPromise&gt;&amp;&amp;);
+
+private:
+    MediaKeySession(ScriptExecutionContext&amp;);
+
+    // EventTarget
+    EventTargetInterface eventTargetInterface() const override { return MediaKeySessionEventTargetInterfaceType; }
+    ScriptExecutionContext* scriptExecutionContext() const override { return ActiveDOMObject::scriptExecutionContext(); }
+    void refEventTarget() override { ref(); }
+    void derefEventTarget() override { deref(); }
+
+    // ActiveDOMObject
+    bool hasPendingActivity() const override;
+    const char* activeDOMObjectName() const override;
+    bool canSuspendForDocumentSuspension() const override;
+    void stop() override;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySessionidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.idl (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.idl        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=ENCRYPTED_MEDIA,
+] interface MediaKeySession : EventTarget {
+    readonly attribute DOMString sessionId;
+    readonly attribute unrestricted double expiration;
+    [CustomGetter, CachedAttribute] readonly attribute Promise&lt;void&gt; closed;
+    readonly attribute MediaKeyStatusMap keyStatuses;
+    attribute EventHandler onkeystatuseschange;
+    attribute EventHandler onmessage;
+    Promise&lt;void&gt; generateRequest(DOMString initDataType, BufferSource initData);
+    Promise&lt;bool&gt; load(DOMString sessionId);
+    Promise&lt;void&gt; update(BufferSource response);
+    Promise&lt;void&gt; close();
+    Promise&lt;void&gt; remove();
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySessionTypeh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySessionType.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySessionType.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySessionType.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+namespace WebCore {
+
+enum class MediaKeySessionType {
+    Temporary,
+    PersistentUsageRecord,
+    PersistentLicense
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyStatush"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatus.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatus.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatus.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+namespace WebCore {
+
+enum class MediaKeyStatus {
+    Usable,
+    Expired,
+    Released,
+    OutputRestricted,
+    OutputDownscaled,
+    StatusPending,
+    InternalError
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyStatusMapcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.cpp (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MediaKeyStatusMap.h&quot;
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+MediaKeyStatusMap::MediaKeyStatusMap() = default;
+
+MediaKeyStatusMap::~MediaKeyStatusMap() = default;
+
+unsigned long MediaKeyStatusMap::size()
+{
+    notImplemented();
+    return 0;
+}
+
+bool MediaKeyStatusMap::has(const BufferSource&amp;)
+{
+    notImplemented();
+    return false;
+}
+
+JSC::JSValue MediaKeyStatusMap::get(const BufferSource&amp;)
+{
+    notImplemented();
+    return JSC::jsUndefined();
+}
+
+MediaKeyStatusMap::Iterator::Iterator(MediaKeyStatusMap&amp;)
+{
+}
+
+Optional&lt;WTF::KeyValuePair&lt;BufferSource::VariantType, MediaKeyStatus&gt;&gt; MediaKeyStatusMap::Iterator::next()
+{
+    return Nullopt;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyStatusMaph"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;BufferSource.h&quot;
+#include &quot;MediaKeyStatus.h&quot;
+#include &lt;runtime/JSCJSValueInlines.h&gt;
+#include &lt;wtf/HashTraits.h&gt;
+#include &lt;wtf/Optional.h&gt;
+#include &lt;wtf/Ref.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebCore {
+
+class MediaKeyStatusMap : public RefCounted&lt;MediaKeyStatusMap&gt; {
+public:
+    using Status = MediaKeyStatus;
+
+    static Ref&lt;MediaKeyStatusMap&gt; create()
+    {
+        return adoptRef(*new MediaKeyStatusMap);
+    }
+
+    virtual ~MediaKeyStatusMap();
+
+    unsigned long size();
+    bool has(const BufferSource&amp;);
+    JSC::JSValue get(const BufferSource&amp;);
+
+    class Iterator {
+    public:
+        explicit Iterator(MediaKeyStatusMap&amp;);
+        Optional&lt;WTF::KeyValuePair&lt;BufferSource::VariantType, MediaKeyStatus&gt;&gt; next();
+    };
+    Iterator createIterator() { return Iterator(*this); }
+
+private:
+    MediaKeyStatusMap();
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyStatusMapidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.idl (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.idl        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum MediaKeyStatus {
+    &quot;usable&quot;,
+    &quot;expired&quot;,
+    &quot;released&quot;,
+    &quot;output-restricted&quot;,
+    &quot;output-downscaled&quot;,
+    &quot;status-pending&quot;,
+    &quot;internal-error&quot;
+};
+
+[
+    Conditional=ENCRYPTED_MEDIA
+] interface MediaKeyStatusMap {
+    iterable&lt;BufferSource, MediaKeyStatus&gt;;
+    readonly attribute unsigned long size;
+    boolean has(BufferSource keyId);
+    any get(BufferSource keyId);
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySystemAccesscpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.cpp (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MediaKeySystemAccess.h&quot;
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;MediaKeySystemConfiguration.h&quot;
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+MediaKeySystemAccess::MediaKeySystemAccess() = default;
+
+MediaKeySystemAccess::~MediaKeySystemAccess() = default;
+
+const String&amp; MediaKeySystemAccess::keySystem() const
+{
+    notImplemented();
+    return m_keySystem;
+}
+
+const MediaKeySystemConfiguration&amp; MediaKeySystemAccess::getConfiguration() const
+{
+    notImplemented();
+    return m_configuration;
+}
+
+void MediaKeySystemAccess::createMediaKeys(Ref&lt;DeferredPromise&gt;&amp;&amp;)
+{
+    notImplemented();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySystemAccessh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;JSDOMPromise.h&quot;
+#include &quot;MediaKeySystemConfiguration.h&quot;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+class MediaKeys;
+
+class MediaKeySystemAccess : public RefCounted&lt;MediaKeySystemAccess&gt; {
+public:
+    static Ref&lt;MediaKeySystemAccess&gt; create()
+    {
+        return adoptRef(*new MediaKeySystemAccess);
+    }
+
+    virtual ~MediaKeySystemAccess();
+
+    const String&amp; keySystem() const;
+    const MediaKeySystemConfiguration&amp; getConfiguration() const;
+    void createMediaKeys(Ref&lt;DeferredPromise&gt;&amp;&amp;);
+
+private:
+    MediaKeySystemAccess();
+
+    String m_keySystem;
+    MediaKeySystemConfiguration m_configuration;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySystemAccessidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.idl (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.idl        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=ENCRYPTED_MEDIA
+] interface MediaKeySystemAccess {
+    readonly attribute DOMString keySystem;
+    [Custom] MediaKeySystemConfiguration getConfiguration();
+    Promise&lt;MediaKeys&gt; createMediaKeys();
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySystemConfigurationh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;MediaKeySystemMediaCapability.h&quot;
+#include &quot;MediaKeysRequirement.h&quot;
+#include &lt;wtf/Vector.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+struct MediaKeySystemConfiguration {
+    using KeysRequirement = MediaKeysRequirement;
+
+    String label;
+    Vector&lt;String&gt; initDataTypes;
+    Vector&lt;MediaKeySystemMediaCapability&gt; audioCapabilities;
+    Vector&lt;MediaKeySystemMediaCapability&gt; videoCapabilities;
+    MediaKeysRequirement distinctiveIdentifier;
+    MediaKeysRequirement persistentState;
+    Vector&lt;String&gt; sessionTypes;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySystemConfigurationidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.idl (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.idl        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum MediaKeysRequirement {
+    &quot;required&quot;,
+    &quot;optional&quot;,
+    &quot;not-allowed&quot;
+};
+
+[
+    Conditional=ENCRYPTED_MEDIA
+] dictionary MediaKeySystemConfiguration {
+    DOMString label = &quot;&quot;;
+    sequence&lt;DOMString&gt; initDataTypes = [];
+    sequence&lt;MediaKeySystemMediaCapability&gt; audioCapabilities = [];
+    sequence&lt;MediaKeySystemMediaCapability&gt; videoCapabilities = [];
+    MediaKeysRequirement distinctiveIdentifier = &quot;optional&quot;;
+    MediaKeysRequirement persistentState = &quot;optional&quot;;
+    sequence&lt;DOMString&gt; sessionTypes;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySystemMediaCapabilityh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+struct MediaKeySystemMediaCapability {
+    String contentType;
+    String robustness;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySystemMediaCapabilityidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.idl (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.idl        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=ENCRYPTED_MEDIA
+] dictionary MediaKeySystemMediaCapability {
+    DOMString contentType = &quot;&quot;;
+    DOMString robustness = &quot;&quot;;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyscpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MediaKeys.h&quot;
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;MediaKeySession.h&quot;
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+MediaKeys::MediaKeys() = default;
+
+MediaKeys::~MediaKeys() = default;
+
+ExceptionOr&lt;Ref&lt;MediaKeySession&gt;&gt; MediaKeys::createSession(MediaKeySessionType)
+{
+    notImplemented();
+    return Exception { NOT_SUPPORTED_ERR };
+}
+
+void MediaKeys::setServerCertificate(const BufferSource&amp;, Ref&lt;DeferredPromise&gt;&amp;&amp;)
+{
+    notImplemented();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeysh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;ExceptionOr.h&quot;
+#include &quot;JSDOMPromise.h&quot;
+#include &quot;MediaKeySessionType.h&quot;
+#include &lt;wtf/Ref.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+
+namespace WebCore {
+
+class BufferSource;
+class MediaKeySession;
+
+class MediaKeys : public RefCounted&lt;MediaKeys&gt; {
+public:
+    using KeySessionType = MediaKeySessionType;
+
+    static Ref&lt;MediaKeys&gt; create()
+    {
+        return adoptRef(*new MediaKeys);
+    }
+
+    virtual ~MediaKeys();
+
+    ExceptionOr&lt;Ref&lt;MediaKeySession&gt;&gt; createSession(MediaKeySessionType);
+
+    void setServerCertificate(const BufferSource&amp;, Ref&lt;DeferredPromise&gt;&amp;&amp;);
+
+protected:
+    MediaKeys();
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeysidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum MediaKeySessionType {
+    &quot;temporary&quot;,
+    &quot;persistent-usage-record&quot;,
+    &quot;persistent-license&quot;
+};

+[
+    Conditional=ENCRYPTED_MEDIA,
+] interface MediaKeys {
+    [MayThrowException] MediaKeySession createSession(optional MediaKeySessionType sessionType = &quot;temporary&quot;);
+    Promise&lt;bool&gt; setServerCertificate(BufferSource serverCertificate);
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeysRequirementh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeysRequirement.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeysRequirement.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeysRequirement.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+namespace WebCore {
+
+enum class MediaKeysRequirement {
+    Required,
+    Optional,
+    NotAllowed
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaNavigatorEMEcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;NavigatorEME.h&quot;
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+void NavigatorEME::requestMediaKeySystemAccess(Navigator&amp;, const String&amp;, Vector&lt;MediaKeySystemConfiguration&gt;&amp;&amp;, Ref&lt;DeferredPromise&gt;&amp;&amp;)
+{
+    notImplemented();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaNavigatorEMEh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;JSDOMPromise.h&quot;
+#include &quot;MediaKeySystemConfiguration.h&quot;
+#include &quot;Supplementable.h&quot;
+
+namespace WebCore {
+
+class MediaKeySystemAccess;
+class Navigator;
+class Page;
+
+class NavigatorEME final : public Supplement&lt;Page&gt; {
+public:
+    static void requestMediaKeySystemAccess(Navigator&amp;, const String&amp;, Vector&lt;MediaKeySystemConfiguration&gt;&amp;&amp;, Ref&lt;DeferredPromise&gt;&amp;&amp;);
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaNavigatorEMEidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.idl (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/encryptedmedia/NavigatorEME.idl        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=ENCRYPTED_MEDIA
+] partial interface Navigator {
+    Promise&lt;MediaKeySystemAccess&gt; requestMediaKeySystemAccess(DOMString keySystem, sequence&lt;MediaKeySystemConfiguration&gt; supportedConfiguration);
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -1256,6 +1256,33 @@
</span><span class="cx">                 2D93AEE419DF5641002A86C3 /* ServicesOverlayController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D93AEE219DF5641002A86C3 /* ServicesOverlayController.mm */; };
</span><span class="cx">                 2D97F04719DD413C001EE9C3 /* MockPageOverlayClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2DAAE32C19DCAF6000E002D2 /* MockPageOverlayClient.cpp */; };
</span><span class="cx">                 2D97F04819DD4140001EE9C3 /* MockPageOverlayClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DAAE32D19DCAF6000E002D2 /* MockPageOverlayClient.h */; };
</span><ins>+                2D9BF7051DBFBB24007A7D99 /* MediaEncryptedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF7011DBFBB24007A7D99 /* MediaEncryptedEvent.cpp */; };
+                2D9BF7061DBFBB24007A7D99 /* MediaEncryptedEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9BF7021DBFBB24007A7D99 /* MediaEncryptedEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                2D9BF7081DBFBB24007A7D99 /* MediaEncryptedEventInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9BF7041DBFBB24007A7D99 /* MediaEncryptedEventInit.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                2D9BF7101DBFD8CE007A7D99 /* JSMediaEncryptedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF70F1DBFD8CE007A7D99 /* JSMediaEncryptedEvent.cpp */; };
+                2D9BF7121DBFD914007A7D99 /* JSMediaEncryptedEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9BF7111DBFD914007A7D99 /* JSMediaEncryptedEvent.h */; };
+                2D9BF7211DBFDABA007A7D99 /* JSMediaKeyMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF7131DBFDAB1007A7D99 /* JSMediaKeyMessageEvent.cpp */; };
+                2D9BF7221DBFDACB007A7D99 /* JSMediaKeys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF7151DBFDAB1007A7D99 /* JSMediaKeys.cpp */; };
+                2D9BF7231DBFDACD007A7D99 /* JSMediaKeySession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF7171DBFDAB1007A7D99 /* JSMediaKeySession.cpp */; };
+                2D9BF7241DBFDAD0007A7D99 /* JSMediaKeyStatusMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF7191DBFDAB1007A7D99 /* JSMediaKeyStatusMap.cpp */; };
+                2D9BF7251DBFDAD3007A7D99 /* JSMediaKeySystemAccess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF71B1DBFDAB1007A7D99 /* JSMediaKeySystemAccess.cpp */; };
+                2D9BF7261DBFDAD5007A7D99 /* JSMediaKeySystemConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF71D1DBFDAB1007A7D99 /* JSMediaKeySystemConfiguration.cpp */; };
+                2D9BF7271DBFDAD8007A7D99 /* JSMediaKeySystemMediaCapability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF71F1DBFDAB1007A7D99 /* JSMediaKeySystemMediaCapability.cpp */; };
+                2D9BF7281DBFDB0D007A7D99 /* JSMediaKeyMessageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9BF7141DBFDAB1007A7D99 /* JSMediaKeyMessageEvent.h */; };
+                2D9BF7291DBFDB10007A7D99 /* JSMediaKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9BF7161DBFDAB1007A7D99 /* JSMediaKeys.h */; };
+                2D9BF72A1DBFDB13007A7D99 /* JSMediaKeySession.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9BF7181DBFDAB1007A7D99 /* JSMediaKeySession.h */; };
+                2D9BF72B1DBFDB15007A7D99 /* JSMediaKeyStatusMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9BF71A1DBFDAB1007A7D99 /* JSMediaKeyStatusMap.h */; };
+                2D9BF72C1DBFDB17007A7D99 /* JSMediaKeySystemAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9BF71C1DBFDAB1007A7D99 /* JSMediaKeySystemAccess.h */; };
+                2D9BF72D1DBFDB19007A7D99 /* JSMediaKeySystemConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9BF71E1DBFDAB1007A7D99 /* JSMediaKeySystemConfiguration.h */; };
+                2D9BF72E1DBFDB1C007A7D99 /* JSMediaKeySystemMediaCapability.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9BF7201DBFDAB1007A7D99 /* JSMediaKeySystemMediaCapability.h */; };
+                2D9BF7421DBFDC27007A7D99 /* NavigatorEME.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF7401DBFDC0F007A7D99 /* NavigatorEME.cpp */; };
+                2D9BF7431DBFDC3E007A7D99 /* MediaKeySystemAccess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF73C1DBFDC0F007A7D99 /* MediaKeySystemAccess.cpp */; };
+                2D9BF7441DBFDC41007A7D99 /* MediaKeyStatusMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF73A1DBFDC0F007A7D99 /* MediaKeyStatusMap.cpp */; };
+                2D9BF7451DBFDC44007A7D99 /* MediaKeySession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF7351DBFDC0F007A7D99 /* MediaKeySession.cpp */; };
+                2D9BF7461DBFDC47007A7D99 /* MediaKeys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF7331DBFDC0F007A7D99 /* MediaKeys.cpp */; };
+                2D9BF7471DBFDC49007A7D99 /* MediaKeyMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF72F1DBFDC0F007A7D99 /* MediaKeyMessageEvent.cpp */; };
+                2D9BF74A1DBFDDFF007A7D99 /* JSMediaKeySessionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF7481DBFDDF8007A7D99 /* JSMediaKeySessionCustom.cpp */; };
+                2D9BF74B1DBFDE02007A7D99 /* JSMediaKeySystemAccessCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9BF7491DBFDDF8007A7D99 /* JSMediaKeySystemAccessCustom.cpp */; };
</ins><span class="cx">                 2D9F0E1314FF1CBF00BA0FF7 /* linearSRGB.icc in Resources */ = {isa = PBXBuildFile; fileRef = 2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */; };
</span><span class="cx">                 2DB9C4AA1B3231F40070F27F /* NSEventSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB9C4A91B3231F40070F27F /* NSEventSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2DC4CF791D2DD98900ECCC94 /* DataDetectorsUISPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DC4CF781D2DD98900ECCC94 /* DataDetectorsUISPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -8312,6 +8339,55 @@
</span><span class="cx">                 2D90660C0665D937006B6F1A /* DataTransferMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DataTransferMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 2D93AEE119DF5641002A86C3 /* ServicesOverlayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServicesOverlayController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D93AEE219DF5641002A86C3 /* ServicesOverlayController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ServicesOverlayController.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                2D9BF6F51DBFB71F007A7D99 /* MediaKeyMessageEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaKeyMessageEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF6F61DBFB71F007A7D99 /* MediaKeys.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaKeys.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF6F71DBFB71F007A7D99 /* MediaKeySession.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaKeySession.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF6F81DBFB71F007A7D99 /* MediaKeyStatusMap.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaKeyStatusMap.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF6F91DBFB71F007A7D99 /* MediaKeySystemAccess.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaKeySystemAccess.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF6FA1DBFB71F007A7D99 /* MediaKeySystemConfiguration.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaKeySystemConfiguration.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF6FB1DBFB71F007A7D99 /* MediaKeySystemMediaCapability.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaKeySystemMediaCapability.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF6FC1DBFB71F007A7D99 /* NavigatorEME.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorEME.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7011DBFBB24007A7D99 /* MediaEncryptedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaEncryptedEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7021DBFBB24007A7D99 /* MediaEncryptedEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaEncryptedEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7031DBFBB24007A7D99 /* MediaEncryptedEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaEncryptedEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7041DBFBB24007A7D99 /* MediaEncryptedEventInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaEncryptedEventInit.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF70F1DBFD8CE007A7D99 /* JSMediaEncryptedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaEncryptedEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7111DBFD914007A7D99 /* JSMediaEncryptedEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaEncryptedEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7131DBFDAB1007A7D99 /* JSMediaKeyMessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeyMessageEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7141DBFDAB1007A7D99 /* JSMediaKeyMessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeyMessageEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7151DBFDAB1007A7D99 /* JSMediaKeys.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeys.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7161DBFDAB1007A7D99 /* JSMediaKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeys.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7171DBFDAB1007A7D99 /* JSMediaKeySession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeySession.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7181DBFDAB1007A7D99 /* JSMediaKeySession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeySession.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7191DBFDAB1007A7D99 /* JSMediaKeyStatusMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeyStatusMap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF71A1DBFDAB1007A7D99 /* JSMediaKeyStatusMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeyStatusMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF71B1DBFDAB1007A7D99 /* JSMediaKeySystemAccess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeySystemAccess.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF71C1DBFDAB1007A7D99 /* JSMediaKeySystemAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeySystemAccess.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF71D1DBFDAB1007A7D99 /* JSMediaKeySystemConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeySystemConfiguration.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF71E1DBFDAB1007A7D99 /* JSMediaKeySystemConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeySystemConfiguration.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF71F1DBFDAB1007A7D99 /* JSMediaKeySystemMediaCapability.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeySystemMediaCapability.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7201DBFDAB1007A7D99 /* JSMediaKeySystemMediaCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeySystemMediaCapability.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF72F1DBFDC0F007A7D99 /* MediaKeyMessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaKeyMessageEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7301DBFDC0F007A7D99 /* MediaKeyMessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeyMessageEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7311DBFDC0F007A7D99 /* MediaKeyMessageEventInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeyMessageEventInit.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7321DBFDC0F007A7D99 /* MediaKeyMessageType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeyMessageType.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7331DBFDC0F007A7D99 /* MediaKeys.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaKeys.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7341DBFDC0F007A7D99 /* MediaKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeys.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7351DBFDC0F007A7D99 /* MediaKeySession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaKeySession.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7361DBFDC0F007A7D99 /* MediaKeySession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeySession.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7371DBFDC0F007A7D99 /* MediaKeySessionType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeySessionType.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7381DBFDC0F007A7D99 /* MediaKeysRequirement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeysRequirement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7391DBFDC0F007A7D99 /* MediaKeyStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeyStatus.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF73A1DBFDC0F007A7D99 /* MediaKeyStatusMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaKeyStatusMap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF73B1DBFDC0F007A7D99 /* MediaKeyStatusMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeyStatusMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF73C1DBFDC0F007A7D99 /* MediaKeySystemAccess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaKeySystemAccess.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF73D1DBFDC0F007A7D99 /* MediaKeySystemAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeySystemAccess.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF73E1DBFDC0F007A7D99 /* MediaKeySystemConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeySystemConfiguration.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF73F1DBFDC0F007A7D99 /* MediaKeySystemMediaCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeySystemMediaCapability.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7401DBFDC0F007A7D99 /* NavigatorEME.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigatorEME.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7411DBFDC0F007A7D99 /* NavigatorEME.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorEME.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7481DBFDDF8007A7D99 /* JSMediaKeySessionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeySessionCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2D9BF7491DBFDDF8007A7D99 /* JSMediaKeySystemAccessCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeySystemAccessCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */ = {isa = PBXFileReference; lastKnownFileType = file; path = linearSRGB.icc; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DAAE32C19DCAF6000E002D2 /* MockPageOverlayClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockPageOverlayClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DAAE32D19DCAF6000E002D2 /* MockPageOverlayClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockPageOverlayClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -18751,6 +18827,10 @@
</span><span class="cx">                                 97205AB41239291000B17380 /* MediaDocument.h */,
</span><span class="cx">                                 07FE99DA18807A7D00256648 /* MediaElementSession.cpp */,
</span><span class="cx">                                 07FE99DB18807A7D00256648 /* MediaElementSession.h */,
</span><ins>+                                2D9BF7011DBFBB24007A7D99 /* MediaEncryptedEvent.cpp */,
+                                2D9BF7021DBFBB24007A7D99 /* MediaEncryptedEvent.h */,
+                                2D9BF7031DBFBB24007A7D99 /* MediaEncryptedEvent.idl */,
+                                2D9BF7041DBFBB24007A7D99 /* MediaEncryptedEventInit.h */,
</ins><span class="cx">                                 E446139B0CD6331000FADA75 /* MediaError.h */,
</span><span class="cx">                                 E446139C0CD6331000FADA75 /* MediaError.idl */,
</span><span class="cx">                                 07A6D1E91491137700051D0C /* MediaFragmentURIParser.cpp */,
</span><span class="lines">@@ -19704,6 +19784,8 @@
</span><span class="cx">                                 A77979250D6B9E64003851B9 /* JSImageData.h */,
</span><span class="cx">                                 CD27F6E2145767580078207D /* JSMediaController.cpp */,
</span><span class="cx">                                 CD27F6E3145767580078207D /* JSMediaController.h */,
</span><ins>+                                2D9BF70F1DBFD8CE007A7D99 /* JSMediaEncryptedEvent.cpp */,
+                                2D9BF7111DBFD914007A7D99 /* JSMediaEncryptedEvent.h */,
</ins><span class="cx">                                 E44614100CD6826900FADA75 /* JSMediaError.cpp */,
</span><span class="cx">                                 E44614110CD6826900FADA75 /* JSMediaError.h */,
</span><span class="cx">                                 C9026B631B1CF5AB001D99A7 /* JSMediaRemoteControls.cpp */,
</span><span class="lines">@@ -21735,6 +21817,8 @@
</span><span class="cx">                                 8F934D841189F1EE00508D5D /* JSMainThreadExecState.cpp */,
</span><span class="cx">                                 8F934D831189F1EE00508D5D /* JSMainThreadExecState.h */,
</span><span class="cx">                                 B56576E417DA599F00A56BDC /* JSMainThreadExecStateInstrumentation.h */,
</span><ins>+                                2D9BF7481DBFDDF8007A7D99 /* JSMediaKeySessionCustom.cpp */,
+                                2D9BF7491DBFDDF8007A7D99 /* JSMediaKeySystemAccessCustom.cpp */,
</ins><span class="cx">                                 C6F420A016B7164E0052A9F2 /* JSMutationCallback.cpp */,
</span><span class="cx">                                 C6F420A116B7164E0052A9F2 /* JSMutationCallback.h */,
</span><span class="cx">                                 CB38FD551CD21D5B00592A3F /* JSPerformanceEntryCustom.cpp */,
</span><span class="lines">@@ -22522,6 +22606,33 @@
</span><span class="cx">                                 CDCA98E918B2C8D000C12FF9 /* CDMPrivateMediaPlayer.h */,
</span><span class="cx">                                 CDE8B5EE1A69778B00B4B66A /* CDMSessionClearKey.cpp */,
</span><span class="cx">                                 CDE8B5EF1A69778B00B4B66A /* CDMSessionClearKey.h */,
</span><ins>+                                2D9BF72F1DBFDC0F007A7D99 /* MediaKeyMessageEvent.cpp */,
+                                2D9BF7301DBFDC0F007A7D99 /* MediaKeyMessageEvent.h */,
+                                2D9BF6F51DBFB71F007A7D99 /* MediaKeyMessageEvent.idl */,
+                                2D9BF7311DBFDC0F007A7D99 /* MediaKeyMessageEventInit.h */,
+                                2D9BF7321DBFDC0F007A7D99 /* MediaKeyMessageType.h */,
+                                2D9BF7331DBFDC0F007A7D99 /* MediaKeys.cpp */,
+                                2D9BF7341DBFDC0F007A7D99 /* MediaKeys.h */,
+                                2D9BF6F61DBFB71F007A7D99 /* MediaKeys.idl */,
+                                2D9BF7351DBFDC0F007A7D99 /* MediaKeySession.cpp */,
+                                2D9BF7361DBFDC0F007A7D99 /* MediaKeySession.h */,
+                                2D9BF6F71DBFB71F007A7D99 /* MediaKeySession.idl */,
+                                2D9BF7371DBFDC0F007A7D99 /* MediaKeySessionType.h */,
+                                2D9BF7381DBFDC0F007A7D99 /* MediaKeysRequirement.h */,
+                                2D9BF7391DBFDC0F007A7D99 /* MediaKeyStatus.h */,
+                                2D9BF73A1DBFDC0F007A7D99 /* MediaKeyStatusMap.cpp */,
+                                2D9BF73B1DBFDC0F007A7D99 /* MediaKeyStatusMap.h */,
+                                2D9BF6F81DBFB71F007A7D99 /* MediaKeyStatusMap.idl */,
+                                2D9BF73C1DBFDC0F007A7D99 /* MediaKeySystemAccess.cpp */,
+                                2D9BF73D1DBFDC0F007A7D99 /* MediaKeySystemAccess.h */,
+                                2D9BF6F91DBFB71F007A7D99 /* MediaKeySystemAccess.idl */,
+                                2D9BF73E1DBFDC0F007A7D99 /* MediaKeySystemConfiguration.h */,
+                                2D9BF6FA1DBFB71F007A7D99 /* MediaKeySystemConfiguration.idl */,
+                                2D9BF73F1DBFDC0F007A7D99 /* MediaKeySystemMediaCapability.h */,
+                                2D9BF6FB1DBFB71F007A7D99 /* MediaKeySystemMediaCapability.idl */,
+                                2D9BF7401DBFDC0F007A7D99 /* NavigatorEME.cpp */,
+                                2D9BF7411DBFDC0F007A7D99 /* NavigatorEME.h */,
+                                2D9BF6FC1DBFB71F007A7D99 /* NavigatorEME.idl */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = encryptedmedia;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -22529,6 +22640,20 @@
</span><span class="cx">                 CDA98DCD1601515C00FEA3B1 /* EncryptedMedia */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                2D9BF7131DBFDAB1007A7D99 /* JSMediaKeyMessageEvent.cpp */,
+                                2D9BF7141DBFDAB1007A7D99 /* JSMediaKeyMessageEvent.h */,
+                                2D9BF7151DBFDAB1007A7D99 /* JSMediaKeys.cpp */,
+                                2D9BF7161DBFDAB1007A7D99 /* JSMediaKeys.h */,
+                                2D9BF7171DBFDAB1007A7D99 /* JSMediaKeySession.cpp */,
+                                2D9BF7181DBFDAB1007A7D99 /* JSMediaKeySession.h */,
+                                2D9BF7191DBFDAB1007A7D99 /* JSMediaKeyStatusMap.cpp */,
+                                2D9BF71A1DBFDAB1007A7D99 /* JSMediaKeyStatusMap.h */,
+                                2D9BF71B1DBFDAB1007A7D99 /* JSMediaKeySystemAccess.cpp */,
+                                2D9BF71C1DBFDAB1007A7D99 /* JSMediaKeySystemAccess.h */,
+                                2D9BF71D1DBFDAB1007A7D99 /* JSMediaKeySystemConfiguration.cpp */,
+                                2D9BF71E1DBFDAB1007A7D99 /* JSMediaKeySystemConfiguration.h */,
+                                2D9BF71F1DBFDAB1007A7D99 /* JSMediaKeySystemMediaCapability.cpp */,
+                                2D9BF7201DBFDAB1007A7D99 /* JSMediaKeySystemMediaCapability.h */,
</ins><span class="cx">                                 CDA98D9B160128A500FEA3B1 /* JSWebKitMediaKeyError.cpp */,
</span><span class="cx">                                 CDA98D9C160128A500FEA3B1 /* JSWebKitMediaKeyError.h */,
</span><span class="cx">                                 CDA98DDB16026A1800FEA3B1 /* JSWebKitMediaKeyMessageEvent.cpp */,
</span><span class="lines">@@ -25962,7 +26087,15 @@
</span><span class="cx">                                 15739BBB1B42012D00D258C1 /* JSMediaDevices.h in Headers */,
</span><span class="cx">                                 072A70431D7396B300DF0AFC /* JSMediaDevicesCustom.h in Headers */,
</span><span class="cx">                                 FD23A12613F5FA5900F67001 /* JSMediaElementAudioSourceNode.h in Headers */,
</span><ins>+                                2D9BF7121DBFD914007A7D99 /* JSMediaEncryptedEvent.h in Headers */,
</ins><span class="cx">                                 E44614190CD6826900FADA75 /* JSMediaError.h in Headers */,
</span><ins>+                                2D9BF7281DBFDB0D007A7D99 /* JSMediaKeyMessageEvent.h in Headers */,
+                                2D9BF7291DBFDB10007A7D99 /* JSMediaKeys.h in Headers */,
+                                2D9BF72A1DBFDB13007A7D99 /* JSMediaKeySession.h in Headers */,
+                                2D9BF72B1DBFDB15007A7D99 /* JSMediaKeyStatusMap.h in Headers */,
+                                2D9BF72C1DBFDB17007A7D99 /* JSMediaKeySystemAccess.h in Headers */,
+                                2D9BF72D1DBFDB19007A7D99 /* JSMediaKeySystemConfiguration.h in Headers */,
+                                2D9BF72E1DBFDB1C007A7D99 /* JSMediaKeySystemMediaCapability.h in Headers */,
</ins><span class="cx">                                 BC3C39B70C0D3D8D005F4D7A /* JSMediaList.h in Headers */,
</span><span class="cx">                                 93D437A31D57B7E200AB85EA /* JSMediaListCustom.h in Headers */,
</span><span class="cx">                                 D3A94A47122DC40F00A37BBC /* JSMediaQueryList.h in Headers */,
</span><span class="lines">@@ -26432,6 +26565,8 @@
</span><span class="cx">                                 97205AB81239291000B17380 /* MediaDocument.h in Headers */,
</span><span class="cx">                                 FD6F252D13F5EF0E0065165F /* MediaElementAudioSourceNode.h in Headers */,
</span><span class="cx">                                 07FE99DD18807A7D00256648 /* MediaElementSession.h in Headers */,
</span><ins>+                                2D9BF7061DBFBB24007A7D99 /* MediaEncryptedEvent.h in Headers */,
+                                2D9BF7081DBFBB24007A7D99 /* MediaEncryptedEventInit.h in Headers */,
</ins><span class="cx">                                 5EBB89351C77782900C65D41 /* MediaEndpoint.h in Headers */,
</span><span class="cx">                                 5EBB89371C77782900C65D41 /* MediaEndpointConfiguration.h in Headers */,
</span><span class="cx">                                 5E16A2E41BFA650B0029A21E /* MediaEndpointPeerConnection.h in Headers */,
</span><span class="lines">@@ -29723,7 +29858,17 @@
</span><span class="cx">                                 15739BBA1B42012A00D258C1 /* JSMediaDevices.cpp in Sources */,
</span><span class="cx">                                 1B88DD131D5B9E5000E3B7A4 /* JSMediaDevicesCustom.cpp in Sources */,
</span><span class="cx">                                 FD23A12513F5FA5900F67001 /* JSMediaElementAudioSourceNode.cpp in Sources */,
</span><ins>+                                2D9BF7101DBFD8CE007A7D99 /* JSMediaEncryptedEvent.cpp in Sources */,
</ins><span class="cx">                                 E44614180CD6826900FADA75 /* JSMediaError.cpp in Sources */,
</span><ins>+                                2D9BF7211DBFDABA007A7D99 /* JSMediaKeyMessageEvent.cpp in Sources */,
+                                2D9BF7221DBFDACB007A7D99 /* JSMediaKeys.cpp in Sources */,
+                                2D9BF7231DBFDACD007A7D99 /* JSMediaKeySession.cpp in Sources */,
+                                2D9BF74A1DBFDDFF007A7D99 /* JSMediaKeySessionCustom.cpp in Sources */,
+                                2D9BF7241DBFDAD0007A7D99 /* JSMediaKeyStatusMap.cpp in Sources */,
+                                2D9BF7251DBFDAD3007A7D99 /* JSMediaKeySystemAccess.cpp in Sources */,
+                                2D9BF74B1DBFDE02007A7D99 /* JSMediaKeySystemAccessCustom.cpp in Sources */,
+                                2D9BF7261DBFDAD5007A7D99 /* JSMediaKeySystemConfiguration.cpp in Sources */,
+                                2D9BF7271DBFDAD8007A7D99 /* JSMediaKeySystemMediaCapability.cpp in Sources */,
</ins><span class="cx">                                 BC3C39B60C0D3D8D005F4D7A /* JSMediaList.cpp in Sources */,
</span><span class="cx">                                 D3A94A46122DC40F00A37BBC /* JSMediaQueryList.cpp in Sources */,
</span><span class="cx">                                 7C5343FC17B74B63004232F0 /* JSMediaQueryListListener.cpp in Sources */,
</span><span class="lines">@@ -30233,6 +30378,7 @@
</span><span class="cx">                                 97205AB71239291000B17380 /* MediaDocument.cpp in Sources */,
</span><span class="cx">                                 FD6F252C13F5EF0E0065165F /* MediaElementAudioSourceNode.cpp in Sources */,
</span><span class="cx">                                 07FE99DC18807A7D00256648 /* MediaElementSession.cpp in Sources */,
</span><ins>+                                2D9BF7051DBFBB24007A7D99 /* MediaEncryptedEvent.cpp in Sources */,
</ins><span class="cx">                                 5EBB89341C77782900C65D41 /* MediaEndpoint.cpp in Sources */,
</span><span class="cx">                                 5EBB89361C77782900C65D41 /* MediaEndpointConfiguration.cpp in Sources */,
</span><span class="cx">                                 5E16A2E51BFA650F0029A21E /* MediaEndpointPeerConnection.cpp in Sources */,
</span><span class="lines">@@ -30239,6 +30385,11 @@
</span><span class="cx">                                 5E4EAB051D07166E0006A184 /* MediaEndpointSessionDescription.cpp in Sources */,
</span><span class="cx">                                 4E1959210A39DABA00220FE5 /* MediaFeatureNames.cpp in Sources */,
</span><span class="cx">                                 07A6D1EB1491137700051D0C /* MediaFragmentURIParser.cpp in Sources */,
</span><ins>+                                2D9BF7471DBFDC49007A7D99 /* MediaKeyMessageEvent.cpp in Sources */,
+                                2D9BF7461DBFDC47007A7D99 /* MediaKeys.cpp in Sources */,
+                                2D9BF7451DBFDC44007A7D99 /* MediaKeySession.cpp in Sources */,
+                                2D9BF7441DBFDC41007A7D99 /* MediaKeyStatusMap.cpp in Sources */,
+                                2D9BF7431DBFDC3E007A7D99 /* MediaKeySystemAccess.cpp in Sources */,
</ins><span class="cx">                                 A8EA80090A19516E00A8EF5F /* MediaList.cpp in Sources */,
</span><span class="cx">                                 071E496E1AD5AA0D008A50B4 /* MediaPlaybackTargetMac.mm in Sources */,
</span><span class="cx">                                 077B64161B95F703003E9AD5 /* MediaPlaybackTargetMock.cpp in Sources */,
</span><span class="lines">@@ -30345,6 +30496,7 @@
</span><span class="cx">                                 979F43D31075E44A0000F83B /* NavigationScheduler.cpp in Sources */,
</span><span class="cx">                                 A9C6E5A50D746458006442E9 /* Navigator.cpp in Sources */,
</span><span class="cx">                                 E12719CA0EEEC21300F61213 /* NavigatorBase.cpp in Sources */,
</span><ins>+                                2D9BF7421DBFDC27007A7D99 /* NavigatorEME.cpp in Sources */,
</ins><span class="cx">                                 51A4BB101954D62700FA5C2E /* NavigatorGamepad.cpp in Sources */,
</span><span class="cx">                                 9711460314EF009A00674FD9 /* NavigatorGeolocation.cpp in Sources */,
</span><span class="cx">                                 5EA725D51ACABD5700EAD17B /* NavigatorMediaDevices.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsBufferSourceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/BufferSource.h (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/BufferSource.h        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/bindings/js/BufferSource.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -34,10 +34,14 @@
</span><span class="cx"> 
</span><span class="cx"> class BufferSource {
</span><span class="cx"> public:
</span><del>-    BufferSource(WTF::Variant&lt;RefPtr&lt;JSC::ArrayBufferView&gt;, RefPtr&lt;JSC::ArrayBuffer&gt;&gt;&amp;&amp; variant)
</del><ins>+    using VariantType = WTF::Variant&lt;RefPtr&lt;JSC::ArrayBufferView&gt;, RefPtr&lt;JSC::ArrayBuffer&gt;&gt;;
+
+    BufferSource(VariantType&amp;&amp; variant)
</ins><span class="cx">         : m_variant(WTFMove(variant))
</span><span class="cx">     { }
</span><span class="cx"> 
</span><ins>+    const VariantType&amp; variant() const { return m_variant; }
+
</ins><span class="cx">     const uint8_t* data() const
</span><span class="cx">     {
</span><span class="cx">         return WTF::visit([](auto&amp; buffer) -&gt; const uint8_t* {
</span><span class="lines">@@ -53,7 +57,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    WTF::Variant&lt;RefPtr&lt;JSC::ArrayBufferView&gt;, RefPtr&lt;JSC::ArrayBuffer&gt;&gt; m_variant;
</del><ins>+    VariantType m_variant;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMediaKeySessionCustomcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSMediaKeySessionCustom.cpp (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMediaKeySessionCustom.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSMediaKeySessionCustom.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;JSMediaKeySession.h&quot;
+
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+JSC::JSValue JSMediaKeySession::closed(JSC::ExecState&amp;) const
+{
+    notImplemented();
+    return JSC::jsUndefined();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMediaKeySystemAccessCustomcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSMediaKeySystemAccessCustom.cpp (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMediaKeySystemAccessCustom.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSMediaKeySystemAccessCustom.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;JSMediaKeySystemAccess.h&quot;
+
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+JSC::JSValue JSMediaKeySystemAccess::getConfiguration(JSC::ExecState&amp;)
+{
+    notImplemented();
+    return JSC::jsUndefined();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -5366,6 +5366,7 @@
</span><span class="cx">     my $innerTypeName = $innerType-&gt;name;
</span><span class="cx"> 
</span><span class="cx">     return $nativeType{$innerTypeName} if exists $nativeType{$innerTypeName};
</span><ins>+    return GetDictionaryClassName($innerType) if $codeGenerator-&gt;IsDictionaryType($innerType);
</ins><span class="cx">     return &quot;RefPtr&lt;$innerTypeName&gt;&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventNames.h (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventNames.h        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/dom/EventNames.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -102,6 +102,7 @@
</span><span class="cx">     macro(drop) \
</span><span class="cx">     macro(durationchange) \
</span><span class="cx">     macro(emptied) \
</span><ins>+    macro(encrypted) \
</ins><span class="cx">     macro(end) \
</span><span class="cx">     macro(endEvent) \
</span><span class="cx">     macro(ended) \
</span><span class="lines">@@ -130,6 +131,7 @@
</span><span class="cx">     macro(invalid) \
</span><span class="cx">     macro(keydown) \
</span><span class="cx">     macro(keypress) \
</span><ins>+    macro(keystatuseschange) \
</ins><span class="cx">     macro(keyup) \
</span><span class="cx">     macro(languagechange) \
</span><span class="cx">     macro(levelchange) \
</span><span class="lines">@@ -238,6 +240,7 @@
</span><span class="cx">     macro(visibilitychange) \
</span><span class="cx">     macro(volumechange) \
</span><span class="cx">     macro(waiting) \
</span><ins>+    macro(waitingforkey) \
</ins><span class="cx">     macro(webglcontextcreationerror) \
</span><span class="cx">     macro(webglcontextlost) \
</span><span class="cx">     macro(webglcontextrestored) \
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventNames.in (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventNames.in        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/dom/EventNames.in        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -70,3 +70,5 @@
</span><span class="cx"> WebKitPlaybackTargetAvailabilityEvent conditional=WIRELESS_PLAYBACK_TARGET
</span><span class="cx"> GamepadEvent conditional=GAMEPAD
</span><span class="cx"> OverconstrainedErrorEvent conditional=MEDIA_STREAM
</span><ins>+MediaEncryptedEvent conditional=ENCRYPTED_MEDIA
+MediaKeyMessageEvent conditional=ENCRYPTED_MEDIA
</ins></span></pre></div>
<a id="trunkSourceWebCoredomEventTargetFactoryin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTargetFactory.in (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTargetFactory.in        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/dom/EventTargetFactory.in        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -15,6 +15,7 @@
</span><span class="cx"> IDBRequest conditional=INDEXED_DATABASE
</span><span class="cx"> IDBTransaction conditional=INDEXED_DATABASE
</span><span class="cx"> MediaController conditional=VIDEO
</span><ins>+MediaKeySession conditional=ENCRYPTED_MEDIA
</ins><span class="cx"> MediaRemoteControls conditional=MEDIA_SESSION
</span><span class="cx"> MediaSource conditional=MEDIA_SOURCE
</span><span class="cx"> MediaStream conditional=MEDIA_STREAM
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -2437,6 +2437,20 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA)
+
+MediaKeys* HTMLMediaElement::mediaKeys() const
+{
+    return nullptr;
+}
+
+void HTMLMediaElement::setMediaKeys(MediaKeys*, Ref&lt;DeferredPromise&gt;&amp;&amp;)
+{
+    notImplemented();
+}
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
+
</ins><span class="cx"> void HTMLMediaElement::progressEventTimerFired()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_player);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -69,6 +69,9 @@
</span><span class="cx"> class MediaControlsHost;
</span><span class="cx"> class MediaElementAudioSourceNode;
</span><span class="cx"> class MediaError;
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA)
+class MediaKeys;
+#endif
</ins><span class="cx"> class MediaPlayer;
</span><span class="cx"> class MediaSession;
</span><span class="cx"> class MediaSource;
</span><span class="lines">@@ -254,6 +257,12 @@
</span><span class="cx">     void keyAdded();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA)
+    MediaKeys* mediaKeys() const;
+
+    void setMediaKeys(MediaKeys*, Ref&lt;DeferredPromise&gt;&amp;&amp;);
+#endif
+
</ins><span class="cx"> // controls
</span><span class="cx">     WEBCORE_EXPORT bool controls() const;
</span><span class="cx">     WEBCORE_EXPORT void setControls(bool);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.idl (208538 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.idl        2016-11-10 16:03:51 UTC (rev 208538)
+++ trunk/Source/WebCore/html/HTMLMediaElement.idl        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -93,6 +93,10 @@
</span><span class="cx"> 
</span><span class="cx">     [Conditional=LEGACY_ENCRYPTED_MEDIA] readonly attribute WebKitMediaKeys webkitKeys;
</span><span class="cx">     [Conditional=LEGACY_ENCRYPTED_MEDIA] void webkitSetMediaKeys(WebKitMediaKeys? mediaKeys);
</span><ins>+    [Conditional=ENCRYPTED_MEDIA] readonly attribute MediaKeys mediaKeys;
+    [Conditional=ENCRYPTED_MEDIA] attribute EventHandler onencrypted;
+    [Conditional=ENCRYPTED_MEDIA] attribute EventHandler onwaitingforkey;
+    [Conditional=ENCRYPTED_MEDIA] Promise&lt;void&gt; setMediaKeys(MediaKeys? mediaKeys);
</ins><span class="cx"> 
</span><span class="cx">     [Conditional=VIDEO_TRACK, MayThrowException] TextTrack addTextTrack(DOMString kind, optional DOMString label = &quot;&quot;, optional DOMString language = &quot;&quot;);
</span><span class="cx">     [Conditional=VIDEO_TRACK] readonly attribute AudioTrackList audioTracks;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlMediaEncryptedEventcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/MediaEncryptedEvent.cpp (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/MediaEncryptedEvent.cpp                                (rev 0)
+++ trunk/Source/WebCore/html/MediaEncryptedEvent.cpp        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MediaEncryptedEvent.h&quot;
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;NotImplemented.h&quot;
+
+namespace WebCore {
+
+MediaEncryptedEvent::MediaEncryptedEvent(const AtomicString&amp; type, const MediaEncryptedEventInit&amp; initializer, IsTrusted isTrusted)
+    : Event(type, initializer, isTrusted)
+{
+}
+
+MediaEncryptedEvent::~MediaEncryptedEvent() = default;
+
+EventInterface MediaEncryptedEvent::eventInterface() const
+{
+    return MediaEncryptedEventInterfaceType;
+}
+
+String MediaEncryptedEvent::initDataType()
+{
+    notImplemented();
+    return emptyString();
+}
+
+ArrayBuffer* MediaEncryptedEvent::initData()
+{
+    notImplemented();
+    return nullptr;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlMediaEncryptedEventh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/MediaEncryptedEvent.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/MediaEncryptedEvent.h                                (rev 0)
+++ trunk/Source/WebCore/html/MediaEncryptedEvent.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;Event.h&quot;
+#include &quot;MediaEncryptedEventInit.h&quot;
+
+namespace JSC {
+class ArrayBuffer;
+}
+
+namespace WebCore {
+
+class MediaEncryptedEvent final : public Event {
+public:
+    using Init = MediaEncryptedEventInit;
+
+    static Ref&lt;MediaEncryptedEvent&gt; create(const AtomicString&amp; type, const MediaEncryptedEventInit&amp; initializer, IsTrusted isTrusted = IsTrusted::No)
+    {
+        return adoptRef(*new MediaEncryptedEvent(type, initializer, isTrusted));
+    }
+
+    virtual ~MediaEncryptedEvent();
+
+    String initDataType();
+    JSC::ArrayBuffer* initData();
+
+private:
+    MediaEncryptedEvent(const AtomicString&amp;, const MediaEncryptedEventInit&amp;, IsTrusted);
+
+    // Event
+    EventInterface eventInterface() const override;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlMediaEncryptedEventidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/MediaEncryptedEvent.idl (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/MediaEncryptedEvent.idl                                (rev 0)
+++ trunk/Source/WebCore/html/MediaEncryptedEvent.idl        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+dictionary MediaEncryptedEventInit : EventInit {
+    DOMString initDataType = &quot;&quot;;
+    ArrayBuffer? initData = null;
+};
+
+[
+    Conditional=ENCRYPTED_MEDIA,
+    Constructor(DOMString type, optional MediaEncryptedEventInit eventInitDict)
+] interface MediaEncryptedEvent : Event {
+    readonly attribute DOMString initDataType;
+    readonly attribute ArrayBuffer? initData;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlMediaEncryptedEventInith"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/MediaEncryptedEventInit.h (0 => 208539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/MediaEncryptedEventInit.h                                (rev 0)
+++ trunk/Source/WebCore/html/MediaEncryptedEventInit.h        2016-11-10 17:08:41 UTC (rev 208539)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+/*
+ * Copyright (C) 2016 Metrological Group B.V.
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials provided
+ *    with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ENCRYPTED_MEDIA)
+
+#include &quot;Event.h&quot;
+#include &lt;runtime/ArrayBuffer.h&gt;
+
+namespace WebCore {
+
+struct MediaEncryptedEventInit : EventInit {
+    MediaEncryptedEventInit() = default;
+
+    MediaEncryptedEventInit(const String&amp; initDataType, RefPtr&lt;JSC::ArrayBuffer&gt;&amp;&amp; initData)
+        : EventInit()
+        , initDataType(initDataType)
+        , initData(WTFMove(initData))
+    { }
+
+    String initDataType;
+    RefPtr&lt;JSC::ArrayBuffer&gt; initData;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ENCRYPTED_MEDIA)
</ins></span></pre>
</div>
</div>

</body>
</html>