<!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>[179054] 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/179054">179054</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-01-23 19:05:36 -0800 (Fri, 23 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/179051">r179051</a>.
https://bugs.webkit.org/show_bug.cgi?id=140850

broke the 32-bit build (Requested by thorton on #webkit).

Reverted changeset:

&quot;[Mac][EME] Support ClearKey encryption with AES128-encrypted
HLS&quot;
https://bugs.webkit.org/show_bug.cgi?id=140825
http://trac.webkit.org/changeset/179051</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmediavideotestjs">trunk/LayoutTests/media/video-test.js</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="#trunkSourceWebCoreModulesencryptedmediaCDMcpp">trunk/Source/WebCore/Modules/encryptedmedia/CDM.cpp</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="#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="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</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="#trunkSourceWebCoreplatformgraphicsCDMSessionh">trunk/Source/WebCore/platform/graphics/CDMSession.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsMediaPlayercpp">trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsMediaPlayerh">trunk/Source/WebCore/platform/graphics/MediaPlayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsMediaPlayerPrivateh">trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCh">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li>trunk/LayoutTests/http/tests/media/clearkey/</li>
<li>trunk/LayoutTests/http/tests/media/resources/hls/clearkey/</li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaCDMPrivateClearKeycpp">trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaCDMPrivateClearKeyh">trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaCDMSessionClearKeycpp">trunk/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaCDMSessionClearKeyh">trunk/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/LayoutTests/ChangeLog        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-01-23  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r179051.
+        https://bugs.webkit.org/show_bug.cgi?id=140850
+
+        broke the 32-bit build (Requested by thorton on #webkit).
+
+        Reverted changeset:
+
+        &quot;[Mac][EME] Support ClearKey encryption with AES128-encrypted
+        HLS&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=140825
+        http://trac.webkit.org/changeset/179051
+
</ins><span class="cx"> 2015-01-23  Jer Noble  &lt;jer.noble@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac][EME] Support ClearKey encryption with AES128-encrypted HLS
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideotestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/video-test.js (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-test.js        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/LayoutTests/media/video-test.js        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -203,11 +203,6 @@
</span><span class="cx">     mediaElement.addEventListener(eventName, _eventCallback, true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function waitForEventOnceOn(element, eventName, func, endit)
-{
-    waitForEventOn(element, eventName, func, endit, true);
-}
-
</del><span class="cx"> function waitForEventOn(element, eventName, func, endit, oneTimeOnly)
</span><span class="cx"> {
</span><span class="cx">     waitForEvent(eventName, func, endit, oneTimeOnly, element);
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -2734,8 +2734,6 @@
</span><span class="cx">     list(APPEND WebCore_SOURCES
</span><span class="cx">         Modules/encryptedmedia/CDM.cpp
</span><span class="cx">         Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp
</span><del>-        Modules/encryptedmedia/CDMPrivateClearKey.cpp
-        Modules/encryptedmedia/CDMSessionClearKey.cpp
</del><span class="cx">         Modules/encryptedmedia/MediaKeyMessageEvent.cpp
</span><span class="cx">         Modules/encryptedmedia/MediaKeyNeededEvent.cpp
</span><span class="cx">         Modules/encryptedmedia/MediaKeys.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/ChangeLog        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-01-23  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r179051.
+        https://bugs.webkit.org/show_bug.cgi?id=140850
+
+        broke the 32-bit build (Requested by thorton on #webkit).
+
+        Reverted changeset:
+
+        &quot;[Mac][EME] Support ClearKey encryption with AES128-encrypted
+        HLS&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=140825
+        http://trac.webkit.org/changeset/179051
+
</ins><span class="cx"> 2015-01-23  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Rename InjectedScriptHost::type to subtype
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaCDMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/CDM.cpp (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/CDM.cpp        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/Modules/encryptedmedia/CDM.cpp        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CDM.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;CDMPrivateClearKey.h&quot;
</del><span class="cx"> #include &quot;CDMPrivateMediaPlayer.h&quot;
</span><span class="cx"> #include &quot;CDMSession.h&quot;
</span><span class="cx"> #include &quot;MediaKeyError.h&quot;
</span><span class="lines">@@ -66,8 +65,6 @@
</span><span class="cx">     if (!queriedCDMs) {
</span><span class="cx">         queriedCDMs = true;
</span><span class="cx"> 
</span><del>-        cdms.get().append(new CDMFactory(CDMPrivateClearKey::create, CDMPrivateClearKey::supportsKeySystem, CDMPrivateClearKey::supportsKeySystemAndMimeType));
-
</del><span class="cx">         // FIXME: initialize specific UA CDMs. http://webkit.org/b/109318, http://webkit.org/b/109320
</span><span class="cx">         cdms.get().append(new CDMFactory(CDMPrivateMediaPlayer::create, CDMPrivateMediaPlayer::supportsKeySystem, CDMPrivateMediaPlayer::supportsKeySystemAndMimeType));
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaCDMPrivateClearKeycpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.cpp (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.cpp        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.cpp        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -1,69 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- * 
- * 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 APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * 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 APPLE INC. OR ITS 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;CDMPrivateClearKey.h&quot;
-
-#if ENABLE(ENCRYPTED_MEDIA_V2)
-
-#include &quot;CDM.h&quot;
-#include &quot;CDMSessionClearKey.h&quot;
-#include &quot;ContentType.h&quot;
-#include &quot;ExceptionCode.h&quot;
-#include &quot;MediaPlayer.h&quot;
-
-namespace WebCore {
-
-bool CDMPrivateClearKey::supportsKeySystem(const String&amp; keySystem)
-{
-    if (!equalIgnoringCase(keySystem, &quot;org.w3c.clearkey&quot;))
-        return false;
-
-    // The MediaPlayer must also support the key system:
-    return MediaPlayer::supportsKeySystem(keySystem, emptyString());
-}
-
-bool CDMPrivateClearKey::supportsKeySystemAndMimeType(const String&amp; keySystem, const String&amp; mimeType)
-{
-    if (!equalIgnoringCase(keySystem, &quot;org.w3c.clearkey&quot;))
-        return false;
-
-    // The MediaPlayer must also support the key system:
-    return MediaPlayer::supportsKeySystem(keySystem, mimeType);
-}
-
-bool CDMPrivateClearKey::supportsMIMEType(const String&amp; mimeType)
-{
-    return MediaPlayer::supportsKeySystem(m_cdm-&gt;keySystem(), mimeType);
-}
-
-std::unique_ptr&lt;CDMSession&gt; CDMPrivateClearKey::createSession()
-{
-    return std::make_unique&lt;CDMSessionClearKey&gt;();
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaCDMPrivateClearKeyh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.h (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.h        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.h        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -1,61 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * 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 APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * 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 APPLE INC. OR ITS 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.
- */
-
-#ifndef CDMPrivateClearKey_h
-#define CDMPrivateClearKey_h
-
-#if ENABLE(ENCRYPTED_MEDIA_V2)
-
-#include &quot;CDMPrivate.h&quot;
-
-namespace WebCore {
-
-class CDM;
-
-class CDMPrivateClearKey : public CDMPrivateInterface {
-public:
-    static std::unique_ptr&lt;CDMPrivateInterface&gt; create(CDM* cdm) { return std::unique_ptr&lt;CDMPrivateInterface&gt;(new CDMPrivateClearKey(cdm)); }
-    virtual ~CDMPrivateClearKey() { }
-
-    static bool supportsKeySystem(const String&amp;);
-    static bool supportsKeySystemAndMimeType(const String&amp; keySystem, const String&amp; mimeType);
-
-    virtual bool supportsMIMEType(const String&amp; mimeType) override;
-    virtual std::unique_ptr&lt;CDMSession&gt; createSession() override;
-
-protected:
-    explicit CDMPrivateClearKey(CDM* cdm)
-        : m_cdm(cdm)
-    {
-    }
-
-    CDM* m_cdm;
-};
-
-}
-
-#endif // ENABLE(ENCRYPTED_MEDIA_V2)
-
-#endif // CDMPrivateClearKey_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaCDMSessionClearKeycpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -1,193 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- * 
- * 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 APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * 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 APPLE INC. OR ITS 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;CDMSessionClearKey.h&quot;
-
-#include &quot;ArrayValue.h&quot;
-#include &quot;CryptoAlgorithm.h&quot;
-#include &quot;CryptoAlgorithmIdentifier.h&quot;
-#include &quot;CryptoAlgorithmParameters.h&quot;
-#include &quot;CryptoKeyDataOctetSequence.h&quot;
-#include &quot;Dictionary.h&quot;
-#include &quot;JSMainThreadExecState.h&quot;
-#include &quot;Logging.h&quot;
-#include &quot;MediaKeyError.h&quot;
-#include &quot;TextEncoding.h&quot;
-#include &quot;UUID.h&quot;
-#include &lt;runtime/JSGlobalObject.h&gt;
-#include &lt;runtime/JSLock.h&gt;
-#include &lt;runtime/JSONObject.h&gt;
-#include &lt;runtime/VM.h&gt;
-#include &lt;wtf/NeverDestroyed.h&gt;
-#include &lt;wtf/text/Base64.h&gt;
-
-#if ENABLE(ENCRYPTED_MEDIA_V2)
-
-using namespace JSC;
-
-namespace WebCore {
-
-static VM&amp; clearKeyVM()
-{
-    static NeverDestroyed&lt;RefPtr&lt;VM&gt;&gt; vm;
-    if (!vm.get())
-        vm.get() = VM::create();
-
-    return *vm.get();
-}
-
-CDMSessionClearKey::CDMSessionClearKey()
-    : m_sessionId(createCanonicalUUIDString())
-{
-}
-
-CDMSessionClearKey::~CDMSessionClearKey()
-{
-}
-
-PassRefPtr&lt;Uint8Array&gt; CDMSessionClearKey::generateKeyRequest(const String&amp; mimeType, Uint8Array* initData, String&amp; destinationURL, unsigned short&amp; errorCode, unsigned long&amp; systemCode)
-{
-    UNUSED_PARAM(mimeType);
-    UNUSED_PARAM(destinationURL);
-    UNUSED_PARAM(systemCode);
-
-    if (!initData) {
-        errorCode = MediaKeyError::MEDIA_KEYERR_CLIENT;
-        return nullptr;
-    }
-    m_initData = initData;
-
-    bool sawError = false;
-    String keyID = UTF8Encoding().decode(reinterpret_cast_ptr&lt;char*&gt;(m_initData-&gt;baseAddress()), m_initData-&gt;byteLength(), true, sawError);
-    if (sawError) {
-        errorCode = MediaKeyError::MEDIA_KEYERR_CLIENT;
-        return nullptr;
-    }
-
-    return initData;
-}
-
-void CDMSessionClearKey::releaseKeys()
-{
-    m_cachedKeys.clear();
-}
-
-bool CDMSessionClearKey::update(Uint8Array* rawKeysData, RefPtr&lt;Uint8Array&gt;&amp; nextMessage, unsigned short&amp; errorCode, unsigned long&amp; systemCode)
-{
-    UNUSED_PARAM(nextMessage);
-    UNUSED_PARAM(systemCode);
-    ASSERT(rawKeysData);
-
-    do {
-        String rawKeysString = String::fromUTF8(rawKeysData-&gt;data(), rawKeysData-&gt;length());
-        if (rawKeysString.isEmpty())  {
-            LOG(Media, &quot;CDMSessionClearKey::update(%p) - failed: empty message&quot;, this);
-            continue;
-        }
-
-        VM&amp; vm = clearKeyVM();
-        JSLockHolder lock(vm);
-        JSGlobalObject* globalObject = JSGlobalObject::create(vm, JSGlobalObject::createStructure(vm, jsNull()));
-        ExecState* exec = globalObject-&gt;globalExec();
-
-        JSLockHolder locker(clearKeyVM());
-        JSValue keysDataObject = JSONParse(exec, rawKeysString);
-        if (exec-&gt;hadException() || !keysDataObject) {
-            LOG(Media, &quot;CDMSessionClearKey::update(%p) - failed: invalid JSON&quot;, this);
-            break;
-        }
-        Dictionary keysDataDictionary(exec, keysDataObject);
-        ArrayValue keysArray;
-        size_t length;
-        if (!keysDataDictionary.get(&quot;keys&quot;, keysArray) || keysArray.isUndefinedOrNull() || !keysArray.length(length) || !length) {
-            LOG(Media, &quot;CDMSessionClearKey::update(%p) - failed: keys array missing or empty&quot;, this);
-            break;
-        }
-
-        bool foundValidKey = false;
-        for (size_t i = 0; i &lt; length; ++i) {
-            Dictionary keyDictionary;
-            if (!keysArray.get(i, keyDictionary) || keyDictionary.isUndefinedOrNull()) {
-                LOG(Media, &quot;CDMSessionClearKey::update(%p) - failed: null keyDictionary&quot;, this);
-                continue;
-            }
-
-            String algorithm;
-            if (!keyDictionary.get(&quot;alg&quot;, algorithm) || !equalIgnoringCase(algorithm, &quot;a128kw&quot;)) {
-                LOG(Media, &quot;CDMSessionClearKey::update(%p) - failed: algorithm unsupported&quot;, this);
-                continue;
-            }
-
-            String keyType;
-            if (!keyDictionary.get(&quot;kty&quot;, keyType) || !equalIgnoringCase(keyType, &quot;oct&quot;)) {
-                LOG(Media, &quot;CDMSessionClearKey::update(%p) - failed: keyType unsupported&quot;, this);
-                continue;
-            }
-
-            String keyId;
-            if (!keyDictionary.get(&quot;kid&quot;, keyId) || keyId.isEmpty()) {
-                LOG(Media, &quot;CDMSessionClearKey::update(%p) - failed: keyId missing or empty&quot;, this);
-                continue;
-            }
-
-            String rawKeyData;
-            if (!keyDictionary.get(&quot;k&quot;, rawKeyData) || rawKeyData.isEmpty())  {
-                LOG(Media, &quot;CDMSessionClearKey::update(%p) - failed: key missing or empty&quot;, this);
-                continue;
-            }
-
-            Vector&lt;uint8_t&gt; keyData;
-            if (!base64Decode(rawKeyData, keyData) ||  keyData.isEmpty()) {
-                LOG(Media, &quot;CDMSessionClearKey::update(%p) - failed: unable to base64 decode key&quot;, this);
-                continue;
-            }
-
-            m_cachedKeys.set(keyId, WTF::move(keyData));
-            foundValidKey = true;
-        }
-
-        if (foundValidKey)
-            return true;
-
-    } while (false);
-
-    errorCode = MediaKeyError::MEDIA_KEYERR_CLIENT;
-    return false;
-}
-
-RefPtr&lt;ArrayBuffer&gt; CDMSessionClearKey::cachedKeyForKeyID(const String&amp; keyId) const
-{
-    if (!m_cachedKeys.contains(keyId))
-        return nullptr;
-
-    auto keyData = m_cachedKeys.get(keyId);
-    RefPtr&lt;Uint8Array&gt; keyDataArray = Uint8Array::create(keyData.data(), keyData.size());
-    return keyDataArray-&gt;buffer();
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaCDMSessionClearKeyh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -1,61 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * 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 APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * 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 APPLE INC. OR ITS 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.
- */
-
-#ifndef CDMSessionClearKey_h
-#define CDMSessionClearKey_h
-
-#include &quot;CDMSession.h&quot;
-#include &lt;wtf/HashMap.h&gt;
-
-#if ENABLE(ENCRYPTED_MEDIA_V2)
-
-namespace WebCore {
-
-class CDMSessionClearKey : public CDMSession {
-public:
-    CDMSessionClearKey();
-    virtual ~CDMSessionClearKey();
-
-    // CDMSessionPrivate
-    virtual CDMSessionType type() override { return CDMSessionTypeClearKey; }
-    virtual void setClient(CDMSessionClient* client) override { m_client = client; }
-    virtual const String&amp; sessionId() const override { return m_sessionId; }
-    virtual PassRefPtr&lt;Uint8Array&gt; generateKeyRequest(const String&amp; mimeType, Uint8Array*, String&amp;, unsigned short&amp;, unsigned long&amp;) override;
-    virtual void releaseKeys() override;
-    virtual bool update(Uint8Array*, RefPtr&lt;Uint8Array&gt;&amp;, unsigned short&amp;, unsigned long&amp;) override;
-    virtual RefPtr&lt;ArrayBuffer&gt; cachedKeyForKeyID(const String&amp;) const override;
-
-protected:
-    CDMSessionClient* m_client;
-    RefPtr&lt;Uint8Array&gt; m_initData;
-    HashMap&lt;String, Vector&lt;uint8_t&gt;&gt; m_cachedKeys;
-    String m_sessionId;
-};
-
-}
-
-#endif // ENABLE(ENCRYPTED_MEDIA_V2)
-
-#endif // CDMSessionClearKey_h
</del></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -80,11 +80,6 @@
</span><span class="cx">         m_session-&gt;releaseKeys();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;ArrayBuffer&gt; MediaKeySession::cachedKeyForKeyId(const String&amp; keyId) const
-{
-    return m_session ? m_session-&gt;cachedKeyForKeyID(keyId) : nullptr;
-}
-
</del><span class="cx"> const String&amp; MediaKeySession::sessionId() const
</span><span class="cx"> {
</span><span class="cx">     return m_session-&gt;sessionId();
</span><span class="lines">@@ -189,8 +184,6 @@
</span><span class="cx">             RefPtr&lt;Event&gt; keyaddedEvent = Event::create(eventNames().webkitkeyaddedEvent, false, false);
</span><span class="cx">             keyaddedEvent-&gt;setTarget(this);
</span><span class="cx">             m_asyncEventQueue.enqueueEvent(keyaddedEvent.release());
</span><del>-
-            keys()-&gt;keyAdded();
</del><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // 2.8. If any of the preceding steps in the task failed
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -66,8 +66,6 @@
</span><span class="cx">     bool isClosed() const { return !m_session; }
</span><span class="cx">     void close();
</span><span class="cx"> 
</span><del>-    RefPtr&lt;ArrayBuffer&gt; cachedKeyForKeyId(const String&amp; keyId) const;
-
</del><span class="cx">     using RefCounted&lt;MediaKeySession&gt;::ref;
</span><span class="cx">     using RefCounted&lt;MediaKeySession&gt;::deref;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -160,22 +160,6 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaKeys::keyAdded()
-{
-    if (m_mediaElement)
-        m_mediaElement-&gt;keyAdded();
-
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;ArrayBuffer&gt; MediaKeys::cachedKeyForKeyId(const String&amp; keyId) const
-{
-    for (auto&amp; session : m_sessions) {
-        if (RefPtr&lt;ArrayBuffer&gt; key = session-&gt;cachedKeyForKeyId(keyId))
-            return key;
-    }
-    return nullptr;
-}
-
-}
-
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeysh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -57,9 +57,6 @@
</span><span class="cx">     HTMLMediaElement* mediaElement() const { return m_mediaElement; }
</span><span class="cx">     void setMediaElement(HTMLMediaElement*);
</span><span class="cx"> 
</span><del>-    void keyAdded();
-    RefPtr&lt;ArrayBuffer&gt; cachedKeyForKeyId(const String&amp; keyId) const;
-
</del><span class="cx"> protected:
</span><span class="cx">     // CDMClient:
</span><span class="cx">     virtual MediaPlayer* cdmMediaPlayer(const CDM*) const override;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -6788,8 +6788,6 @@
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\CDM.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\CDMPrivateMediaPlayer.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\CDMPrivateClearKey.cpp&quot; /&gt;
-    &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\CDMSessionClearKey.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\MediaKeyMessageEvent.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\MediaKeyNeededEvent.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\MediaKeys.cpp&quot; /&gt;
</span><span class="lines">@@ -19007,8 +19005,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\CDM.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\CDMPrivate.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\CDMPrivateMediaPlayer.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\CDMPrivateClearKey.h&quot; /&gt;
-    &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\CDMSessionClearKey.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\MediaKeyMessageEvent.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\MediaKeyNeededEvent.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\MediaKeys.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -6922,12 +6922,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\CDMPrivateMediaPlayer.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Modules\encryptedmedia&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\CDMPrivateClearKey.cpp&quot;&gt;
-      &lt;Filter&gt;Modules\encryptedmedia&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
-    &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\CDMSessionClearKey.cpp&quot;&gt;
-      &lt;Filter&gt;Modules\encryptedmedia&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\Modules\encryptedmedia\MediaKeyMessageEvent.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Modules\encryptedmedia&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -14288,12 +14282,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\CDMPrivateMediaPlayer.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Modules\encryptedmedia&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\CDMPrivateClearKey.h&quot;&gt;
-      &lt;Filter&gt;Modules\encryptedmedia&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
-    &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\CDMSessionClearKey.h&quot;&gt;
-      &lt;Filter&gt;Modules\encryptedmedia&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\Modules\encryptedmedia\MediaKeyMessageEvent.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Modules\encryptedmedia&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -5750,10 +5750,6 @@
</span><span class="cx">                 CDE83DB1183C44060031EAA3 /* VideoPlaybackQuality.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDE83DAF183C44060031EAA3 /* VideoPlaybackQuality.cpp */; };
</span><span class="cx">                 CDE83DB2183C44060031EAA3 /* VideoPlaybackQuality.h in Headers */ = {isa = PBXBuildFile; fileRef = CDE83DB0183C44060031EAA3 /* VideoPlaybackQuality.h */; };
</span><span class="cx">                 CDE83DB6183D352A0031EAA3 /* JSVideoPlaybackQuality.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDE83DB4183D352A0031EAA3 /* JSVideoPlaybackQuality.cpp */; };
</span><del>-                CDE8B5EC1A69777300B4B66A /* CDMPrivateClearKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDE8B5EA1A69777300B4B66A /* CDMPrivateClearKey.cpp */; };
-                CDE8B5ED1A69777300B4B66A /* CDMPrivateClearKey.h in Headers */ = {isa = PBXBuildFile; fileRef = CDE8B5EB1A69777300B4B66A /* CDMPrivateClearKey.h */; };
-                CDE8B5F01A69778B00B4B66A /* CDMSessionClearKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDE8B5EE1A69778B00B4B66A /* CDMSessionClearKey.cpp */; };
-                CDE8B5F11A69778B00B4B66A /* CDMSessionClearKey.h in Headers */ = {isa = PBXBuildFile; fileRef = CDE8B5EF1A69778B00B4B66A /* CDMSessionClearKey.h */; };
</del><span class="cx">                 CDEA763014608A53008B31F1 /* PlatformClockCA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */; };
</span><span class="cx">                 CDEA76341460B56F008B31F1 /* ClockGeneric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA76321460AE29008B31F1 /* ClockGeneric.cpp */; };
</span><span class="cx">                 CDEA76351460B71A008B31F1 /* Clock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA76331460B462008B31F1 /* Clock.cpp */; };
</span><span class="lines">@@ -13256,10 +13252,6 @@
</span><span class="cx">                 CDE83DB3183C441E0031EAA3 /* VideoPlaybackQuality.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = VideoPlaybackQuality.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CDE83DB4183D352A0031EAA3 /* JSVideoPlaybackQuality.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVideoPlaybackQuality.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CDE83DB5183D352A0031EAA3 /* JSVideoPlaybackQuality.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVideoPlaybackQuality.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                CDE8B5EA1A69777300B4B66A /* CDMPrivateClearKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CDMPrivateClearKey.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                CDE8B5EB1A69777300B4B66A /* CDMPrivateClearKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDMPrivateClearKey.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                CDE8B5EE1A69778B00B4B66A /* CDMSessionClearKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CDMSessionClearKey.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                CDE8B5EF1A69778B00B4B66A /* CDMSessionClearKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDMSessionClearKey.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 CDEA762C14608224008B31F1 /* Clock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Clock.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformClockCA.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CDEA762F146084EE008B31F1 /* PlatformClockCA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformClockCA.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -21664,10 +21656,6 @@
</span><span class="cx">                                 CDA98DC716014F2C00FEA3B1 /* MediaKeySession.cpp */,
</span><span class="cx">                                 CDA98DC816014F2C00FEA3B1 /* MediaKeySession.h */,
</span><span class="cx">                                 CDA98DC916014F4000FEA3B1 /* MediaKeySession.idl */,
</span><del>-                                CDE8B5EA1A69777300B4B66A /* CDMPrivateClearKey.cpp */,
-                                CDE8B5EB1A69777300B4B66A /* CDMPrivateClearKey.h */,
-                                CDE8B5EE1A69778B00B4B66A /* CDMSessionClearKey.cpp */,
-                                CDE8B5EF1A69778B00B4B66A /* CDMSessionClearKey.h */,
</del><span class="cx">                         );
</span><span class="cx">                         path = encryptedmedia;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -25770,7 +25758,6 @@
</span><span class="cx">                                 D23CA56C0AB0EB8D005108A5 /* RangeException.h in Headers */,
</span><span class="cx">                                 F55B3DCE1251F12D003EF269 /* RangeInputType.h in Headers */,
</span><span class="cx">                                 6E84E9E117668BF100815B68 /* RasterShape.h in Headers */,
</span><del>-                                CDE8B5F11A69778B00B4B66A /* CDMSessionClearKey.h in Headers */,
</del><span class="cx">                                 A84D827C11D333ED00972990 /* RawDataDocumentParser.h in Headers */,
</span><span class="cx">                                 FD31603C12B0267600C1A359 /* RealtimeAnalyser.h in Headers */,
</span><span class="cx">                                 BC4368E80C226E32005EFB5F /* Rect.h in Headers */,
</span><span class="lines">@@ -26553,7 +26540,6 @@
</span><span class="cx">                                 E4C91A0E1802343100A17F6D /* TextPaintStyle.h in Headers */,
</span><span class="cx">                                 930FC68A1072B9280045293E /* TextRenderingMode.h in Headers */,
</span><span class="cx">                                 93F198F608245E59001E9ABC /* TextResourceDecoder.h in Headers */,
</span><del>-                                CDE8B5ED1A69777300B4B66A /* CDMPrivateClearKey.h in Headers */,
</del><span class="cx">                                 A824B4650E2EF2EA0081A7B7 /* TextRun.h in Headers */,
</span><span class="cx">                                 448B1B7A0F3A2F9B0047A9E2 /* TextSizeAdjustment.h in Headers */,
</span><span class="cx">                                 B2C3DA4B0D006C1D00EF6F26 /* TextStream.h in Headers */,
</span><span class="lines">@@ -28358,7 +28344,6 @@
</span><span class="cx">                                 590E1B4B11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp in Sources */,
</span><span class="cx">                                 BCE438A2140C0DC0005E437E /* JSDictionary.cpp in Sources */,
</span><span class="cx">                                 659DDC8209E198BA001BF3C6 /* JSDocument.cpp in Sources */,
</span><del>-                                CDE8B5F01A69778B00B4B66A /* CDMSessionClearKey.cpp in Sources */,
</del><span class="cx">                                 49C7BA8D1042F5B10009D447 /* JSDocumentCustom.cpp in Sources */,
</span><span class="cx">                                 1A494EDE0A123F4C00FDAFC1 /* JSDocumentFragment.cpp in Sources */,
</span><span class="cx">                                 65DF31F509D1CC60000BE325 /* JSDocumentType.cpp in Sources */,
</span><span class="lines">@@ -28740,7 +28725,6 @@
</span><span class="cx">                                 08A48A6E0E86CF6D00E225DD /* JSSVGElementInstanceCustom.cpp in Sources */,
</span><span class="cx">                                 8542A79A0AE5C94400DF58DF /* JSSVGElementWrapperFactory.cpp in Sources */,
</span><span class="cx">                                 B2FA3D680AB75A6F000E5AC4 /* JSSVGEllipseElement.cpp in Sources */,
</span><del>-                                CDE8B5EC1A69777300B4B66A /* CDMPrivateClearKey.cpp in Sources */,
</del><span class="cx">                                 B266CD4D0C3AEC6500EB08D2 /* JSSVGException.cpp in Sources */,
</span><span class="cx">                                 B2FA3D6A0AB75A6F000E5AC4 /* JSSVGFEBlendElement.cpp in Sources */,
</span><span class="cx">                                 B2FA3D6C0AB75A6F000E5AC4 /* JSSVGFEColorMatrixElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -2182,11 +2182,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><del>-RefPtr&lt;ArrayBuffer&gt; HTMLMediaElement::mediaPlayerCachedKeyForKeyId(const String&amp; keyId) const
-{
-    return m_mediaKeys ? m_mediaKeys-&gt;cachedKeyForKeyId(keyId) : nullptr;
-}
-
</del><span class="cx"> bool HTMLMediaElement::mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array* initData)
</span><span class="cx"> {
</span><span class="cx">     if (!hasEventListeners(&quot;webkitneedkey&quot;)) {
</span><span class="lines">@@ -2235,12 +2230,6 @@
</span><span class="cx">     if (m_mediaKeys)
</span><span class="cx">         m_mediaKeys-&gt;setMediaElement(this);
</span><span class="cx"> }
</span><del>-
-void HTMLMediaElement::keyAdded()
-{
-    if (m_player)
-        m_player-&gt;keyAdded();
-}
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void HTMLMediaElement::progressEventTimerFired()
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -242,8 +242,6 @@
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx">     MediaKeys* keys() const { return m_mediaKeys.get(); }
</span><span class="cx">     void setMediaKeys(MediaKeys*);
</span><del>-
-    void keyAdded();
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> // controls
</span><span class="lines">@@ -565,7 +563,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><del>-    virtual RefPtr&lt;ArrayBuffer&gt; mediaPlayerCachedKeyForKeyId(const String&amp; keyId) const override;
</del><span class="cx">     virtual bool mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array*) override;
</span><span class="cx">     virtual String mediaPlayerMediaKeysStorageDirectory() const override;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsCDMSessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/CDMSession.h (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/CDMSession.h        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/platform/graphics/CDMSession.h        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -56,7 +56,6 @@
</span><span class="cx"> 
</span><span class="cx"> enum CDMSessionType {
</span><span class="cx">     CDMSessionTypeUnknown,
</span><del>-    CDMSessionTypeClearKey,
</del><span class="cx">     CDMSessionTypeAVFoundationObjC,
</span><span class="cx">     CDMSessionTypeMediaSourceAVFObjC,
</span><span class="cx"> };
</span><span class="lines">@@ -72,7 +71,6 @@
</span><span class="cx">     virtual PassRefPtr&lt;Uint8Array&gt; generateKeyRequest(const String&amp; mimeType, Uint8Array* initData, String&amp; destinationURL, unsigned short&amp; errorCode, unsigned long&amp; systemCode) = 0;
</span><span class="cx">     virtual void releaseKeys() = 0;
</span><span class="cx">     virtual bool update(Uint8Array*, RefPtr&lt;Uint8Array&gt;&amp; nextMessage, unsigned short&amp; errorCode, unsigned long&amp; systemCode) = 0;
</span><del>-    virtual RefPtr&lt;ArrayBuffer&gt; cachedKeyForKeyID(const String&amp;) const { return nullptr; }
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsMediaPlayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -504,11 +504,6 @@
</span><span class="cx"> {
</span><span class="cx">     m_private-&gt;setCDMSession(session);
</span><span class="cx"> }
</span><del>-
-void MediaPlayer::keyAdded()
-{
-    m_private-&gt;keyAdded();
-}
</del><span class="cx"> #endif
</span><span class="cx">     
</span><span class="cx"> MediaTime MediaPlayer::duration() const
</span><span class="lines">@@ -1124,11 +1119,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><del>-RefPtr&lt;ArrayBuffer&gt; MediaPlayer::cachedKeyForKeyId(const String&amp; keyId) const
-{
-    return m_client.mediaPlayerCachedKeyForKeyId(keyId);
-}
-
</del><span class="cx"> bool MediaPlayer::keyNeeded(Uint8Array* initData)
</span><span class="cx"> {
</span><span class="cx">     return m_client.mediaPlayerKeyNeeded(this, initData);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsMediaPlayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.h (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/MediaPlayer.h        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.h        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -210,7 +210,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><del>-    virtual RefPtr&lt;ArrayBuffer&gt; mediaPlayerCachedKeyForKeyId(const String&amp;) const { return nullptr; }
</del><span class="cx">     virtual bool mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array*) { return false; }
</span><span class="cx">     virtual String mediaPlayerMediaKeysStorageDirectory() const { return emptyString(); }
</span><span class="cx"> #endif
</span><span class="lines">@@ -351,7 +350,6 @@
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx">     std::unique_ptr&lt;CDMSession&gt; createSession(const String&amp; keySystem);
</span><span class="cx">     void setCDMSession(CDMSession*);
</span><del>-    void keyAdded();
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     bool paused() const;
</span><span class="lines">@@ -518,7 +516,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><del>-    RefPtr&lt;ArrayBuffer&gt; cachedKeyForKeyId(const String&amp; keyId) const;
</del><span class="cx">     bool keyNeeded(Uint8Array* initData);
</span><span class="cx">     String mediaKeysStorageDirectory() const;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsMediaPlayerPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -225,7 +225,6 @@
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx">     virtual std::unique_ptr&lt;CDMSession&gt; createSession(const String&amp;) { return nullptr; }
</span><span class="cx">     virtual void setCDMSession(CDMSession*) { }
</span><del>-    virtual void keyAdded() { }
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -91,7 +91,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx">     RetainPtr&lt;AVAssetResourceLoadingRequest&gt; takeRequestForKeyURI(const String&amp;);
</span><del>-    virtual void keyAdded() override;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void playerItemStatusDidChange(int);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (179053 => 179054)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2015-01-24 02:34:18 UTC (rev 179053)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2015-01-24 03:05:36 UTC (rev 179054)
</span><span class="lines">@@ -52,7 +52,6 @@
</span><span class="cx"> #import &quot;SecurityOrigin.h&quot;
</span><span class="cx"> #import &quot;SerializedPlatformRepresentationMac.h&quot;
</span><span class="cx"> #import &quot;SoftLinking.h&quot;
</span><del>-#import &quot;TextEncoding.h&quot;
</del><span class="cx"> #import &quot;TextTrackRepresentation.h&quot;
</span><span class="cx"> #import &quot;UUID.h&quot;
</span><span class="cx"> #import &quot;VideoTrackPrivateAVFObjC.h&quot;
</span><span class="lines">@@ -1508,7 +1507,7 @@
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx"> static bool keySystemIsSupported(const String&amp; keySystem)
</span><span class="cx"> {
</span><del>-    if (equalIgnoringCase(keySystem, &quot;com.apple.fps&quot;) || equalIgnoringCase(keySystem, &quot;com.apple.fps.1_0&quot;) || equalIgnoringCase(keySystem, &quot;org.w3c.clearkey&quot;))
</del><ins>+    if (equalIgnoringCase(keySystem, &quot;com.apple.fps&quot;) || equalIgnoringCase(keySystem, &quot;com.apple.fps.1_0&quot;))
</ins><span class="cx">         return true;
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="lines">@@ -1523,10 +1522,6 @@
</span><span class="cx">     // 1. Check whether the Key System is supported with the specified container and codec type(s) by following the steps for the first matching condition from the following list:
</span><span class="cx">     //    If keySystem is null, continue to the next step.
</span><span class="cx">     if (!parameters.keySystem.isNull() &amp;&amp; !parameters.keySystem.isEmpty()) {
</span><del>-        // &quot;Clear Key&quot; is only supported with HLS:
-        if (equalIgnoringCase(parameters.keySystem, &quot;org.w3c.clearkey&quot;) &amp;&amp; !parameters.type.isEmpty() &amp;&amp; !equalIgnoringCase(parameters.type, &quot;application/x-mpegurl&quot;))
-            return MediaPlayer::IsNotSupported;
-
</del><span class="cx">         // If keySystem contains an unrecognized or unsupported Key System, return the empty string
</span><span class="cx">         if (!keySystemIsSupported(parameters.keySystem))
</span><span class="cx">             return MediaPlayer::IsNotSupported;
</span><span class="lines">@@ -1559,10 +1554,6 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx">     if (!keySystem.isEmpty()) {
</span><del>-        // &quot;Clear Key&quot; is only supported with HLS:
-        if (equalIgnoringCase(keySystem, &quot;org.w3c.clearkey&quot;) &amp;&amp; !mimeType.isEmpty() &amp;&amp; !equalIgnoringCase(mimeType, &quot;application/x-mpegurl&quot;))
-            return MediaPlayer::IsNotSupported;
-
</del><span class="cx">         if (!keySystemIsSupported(keySystem))
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><span class="lines">@@ -1579,35 +1570,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if HAVE(AVFOUNDATION_LOADER_DELEGATE)
</span><del>-#if ENABLE(ENCRYPTED_MEDIA_V2)
-static void fulfillRequestWithKeyData(AVAssetResourceLoadingRequest *request, ArrayBuffer* keyData)
-{
-    if (AVAssetResourceLoadingContentInformationRequest *infoRequest = [request contentInformationRequest]) {
-        [infoRequest setContentLength:keyData-&gt;byteLength()];
-        [infoRequest setByteRangeAccessSupported:YES];
-    }
-
-    if (AVAssetResourceLoadingDataRequest *dataRequest = [request dataRequest]) {
-        long start = [dataRequest currentOffset];
-        long long end = std::min&lt;long long&gt;(keyData-&gt;byteLength(), [dataRequest currentOffset] + [dataRequest requestedLength]);
-
-        ASSERT(start &lt;= std::numeric_limits&lt;int&gt;::max());
-        ASSERT(end &lt;= std::numeric_limits&lt;int&gt;::max());
-
-        if (start &lt; 0 || end &lt; 0 || start &gt;= keyData-&gt;byteLength()) {
-            [request finishLoadingWithError:nil];
-            return;
-        }
-
-        RefPtr&lt;ArrayBuffer&gt; requestedKeyData = keyData-&gt;slice(start, end);
-        RetainPtr&lt;NSData&gt; nsData = adoptNS([[NSData alloc] initWithBytes:requestedKeyData-&gt;data() length:requestedKeyData-&gt;byteLength()]);
-        [dataRequest respondWithData:nsData.get()];
-    }
-
-    [request finishLoading];
-}
-#endif
-
</del><span class="cx"> bool MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource(AVAssetResourceLoadingRequest* avRequest)
</span><span class="cx"> {
</span><span class="cx">     String scheme = [[[avRequest request] URL] scheme];
</span><span class="lines">@@ -1635,27 +1597,6 @@
</span><span class="cx"> 
</span><span class="cx">         m_keyURIToRequestMap.set(keyURI, avRequest);
</span><span class="cx">         return true;
</span><del>-#if ENABLE(ENCRYPTED_MEDIA_V2)
-    } else if (scheme == &quot;clearkey&quot;) {
-        String keyID = [[[avRequest request] URL] resourceSpecifier];
-        StringView keyIDView(keyID);
-        CString utf8EncodedKeyId = UTF8Encoding().encode(keyIDView, URLEncodedEntitiesForUnencodables);
-
-        RefPtr&lt;Uint8Array&gt; initData = Uint8Array::create(utf8EncodedKeyId.length());
-        initData-&gt;setRange((JSC::Uint8Adaptor::Type*)utf8EncodedKeyId.data(), utf8EncodedKeyId.length(), 0);
-
-        auto keyData = player()-&gt;cachedKeyForKeyId(keyID);
-        if (keyData) {
-            fulfillRequestWithKeyData(avRequest, keyData.get());
-            return false;
-        }
-
-        if (!player()-&gt;keyNeeded(initData.get()))
-            return false;
-
-        m_keyURIToRequestMap.set(keyID, avRequest);
-        return true;
-#endif
</del><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -2352,26 +2293,6 @@
</span><span class="cx">     return m_keyURIToRequestMap.take(keyURI);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateAVFoundationObjC::keyAdded()
-{
-    Vector&lt;String&gt; fulfilledKeyIds;
-
-    for (auto&amp; pair : m_keyURIToRequestMap) {
-        const String&amp; keyId = pair.key;
-        const RetainPtr&lt;AVAssetResourceLoadingRequest&gt;&amp; request = pair.value;
-
-        auto keyData = player()-&gt;cachedKeyForKeyId(keyId);
-        if (!keyData)
-            continue;
-
-        fulfillRequestWithKeyData(request.get(), keyData.get());
-        fulfilledKeyIds.append(keyId);
-    }
-
-    for (auto&amp; keyId : fulfilledKeyIds)
-        m_keyURIToRequestMap.remove(keyId);
-}
-
</del><span class="cx"> std::unique_ptr&lt;CDMSession&gt; MediaPlayerPrivateAVFoundationObjC::createSession(const String&amp; keySystem)
</span><span class="cx"> {
</span><span class="cx">     if (!keySystemIsSupported(keySystem))
</span></span></pre>
</div>
</div>

</body>
</html>