<!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:
"[Mac][EME] Support ClearKey encryption with AES128-encrypted
HLS"
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 <commit-queue@webkit.org>
+
+ 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:
+
+ "[Mac][EME] Support ClearKey encryption with AES128-encrypted
+ HLS"
+ https://bugs.webkit.org/show_bug.cgi?id=140825
+ http://trac.webkit.org/changeset/179051
+
</ins><span class="cx"> 2015-01-23 Jer Noble <jer.noble@apple.com>
</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 <commit-queue@webkit.org>
+
+ 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:
+
+ "[Mac][EME] Support ClearKey encryption with AES128-encrypted
+ HLS"
+ https://bugs.webkit.org/show_bug.cgi?id=140825
+ http://trac.webkit.org/changeset/179051
+
</ins><span class="cx"> 2015-01-23 Joseph Pecoraro <pecoraro@apple.com>
</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 "CDM.h"
</span><span class="cx">
</span><del>-#include "CDMPrivateClearKey.h"
</del><span class="cx"> #include "CDMPrivateMediaPlayer.h"
</span><span class="cx"> #include "CDMSession.h"
</span><span class="cx"> #include "MediaKeyError.h"
</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 "config.h"
-#include "CDMPrivateClearKey.h"
-
-#if ENABLE(ENCRYPTED_MEDIA_V2)
-
-#include "CDM.h"
-#include "CDMSessionClearKey.h"
-#include "ContentType.h"
-#include "ExceptionCode.h"
-#include "MediaPlayer.h"
-
-namespace WebCore {
-
-bool CDMPrivateClearKey::supportsKeySystem(const String& keySystem)
-{
- if (!equalIgnoringCase(keySystem, "org.w3c.clearkey"))
- return false;
-
- // The MediaPlayer must also support the key system:
- return MediaPlayer::supportsKeySystem(keySystem, emptyString());
-}
-
-bool CDMPrivateClearKey::supportsKeySystemAndMimeType(const String& keySystem, const String& mimeType)
-{
- if (!equalIgnoringCase(keySystem, "org.w3c.clearkey"))
- return false;
-
- // The MediaPlayer must also support the key system:
- return MediaPlayer::supportsKeySystem(keySystem, mimeType);
-}
-
-bool CDMPrivateClearKey::supportsMIMEType(const String& mimeType)
-{
- return MediaPlayer::supportsKeySystem(m_cdm->keySystem(), mimeType);
-}
-
-std::unique_ptr<CDMSession> CDMPrivateClearKey::createSession()
-{
- return std::make_unique<CDMSessionClearKey>();
-}
-
-}
-
-#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 "CDMPrivate.h"
-
-namespace WebCore {
-
-class CDM;
-
-class CDMPrivateClearKey : public CDMPrivateInterface {
-public:
- static std::unique_ptr<CDMPrivateInterface> create(CDM* cdm) { return std::unique_ptr<CDMPrivateInterface>(new CDMPrivateClearKey(cdm)); }
- virtual ~CDMPrivateClearKey() { }
-
- static bool supportsKeySystem(const String&);
- static bool supportsKeySystemAndMimeType(const String& keySystem, const String& mimeType);
-
- virtual bool supportsMIMEType(const String& mimeType) override;
- virtual std::unique_ptr<CDMSession> 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 "config.h"
-#include "CDMSessionClearKey.h"
-
-#include "ArrayValue.h"
-#include "CryptoAlgorithm.h"
-#include "CryptoAlgorithmIdentifier.h"
-#include "CryptoAlgorithmParameters.h"
-#include "CryptoKeyDataOctetSequence.h"
-#include "Dictionary.h"
-#include "JSMainThreadExecState.h"
-#include "Logging.h"
-#include "MediaKeyError.h"
-#include "TextEncoding.h"
-#include "UUID.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSLock.h>
-#include <runtime/JSONObject.h>
-#include <runtime/VM.h>
-#include <wtf/NeverDestroyed.h>
-#include <wtf/text/Base64.h>
-
-#if ENABLE(ENCRYPTED_MEDIA_V2)
-
-using namespace JSC;
-
-namespace WebCore {
-
-static VM& clearKeyVM()
-{
- static NeverDestroyed<RefPtr<VM>> vm;
- if (!vm.get())
- vm.get() = VM::create();
-
- return *vm.get();
-}
-
-CDMSessionClearKey::CDMSessionClearKey()
- : m_sessionId(createCanonicalUUIDString())
-{
-}
-
-CDMSessionClearKey::~CDMSessionClearKey()
-{
-}
-
-PassRefPtr<Uint8Array> CDMSessionClearKey::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& 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<char*>(m_initData->baseAddress()), m_initData->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<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode)
-{
- UNUSED_PARAM(nextMessage);
- UNUSED_PARAM(systemCode);
- ASSERT(rawKeysData);
-
- do {
- String rawKeysString = String::fromUTF8(rawKeysData->data(), rawKeysData->length());
- if (rawKeysString.isEmpty()) {
- LOG(Media, "CDMSessionClearKey::update(%p) - failed: empty message", this);
- continue;
- }
-
- VM& vm = clearKeyVM();
- JSLockHolder lock(vm);
- JSGlobalObject* globalObject = JSGlobalObject::create(vm, JSGlobalObject::createStructure(vm, jsNull()));
- ExecState* exec = globalObject->globalExec();
-
- JSLockHolder locker(clearKeyVM());
- JSValue keysDataObject = JSONParse(exec, rawKeysString);
- if (exec->hadException() || !keysDataObject) {
- LOG(Media, "CDMSessionClearKey::update(%p) - failed: invalid JSON", this);
- break;
- }
- Dictionary keysDataDictionary(exec, keysDataObject);
- ArrayValue keysArray;
- size_t length;
- if (!keysDataDictionary.get("keys", keysArray) || keysArray.isUndefinedOrNull() || !keysArray.length(length) || !length) {
- LOG(Media, "CDMSessionClearKey::update(%p) - failed: keys array missing or empty", this);
- break;
- }
-
- bool foundValidKey = false;
- for (size_t i = 0; i < length; ++i) {
- Dictionary keyDictionary;
- if (!keysArray.get(i, keyDictionary) || keyDictionary.isUndefinedOrNull()) {
- LOG(Media, "CDMSessionClearKey::update(%p) - failed: null keyDictionary", this);
- continue;
- }
-
- String algorithm;
- if (!keyDictionary.get("alg", algorithm) || !equalIgnoringCase(algorithm, "a128kw")) {
- LOG(Media, "CDMSessionClearKey::update(%p) - failed: algorithm unsupported", this);
- continue;
- }
-
- String keyType;
- if (!keyDictionary.get("kty", keyType) || !equalIgnoringCase(keyType, "oct")) {
- LOG(Media, "CDMSessionClearKey::update(%p) - failed: keyType unsupported", this);
- continue;
- }
-
- String keyId;
- if (!keyDictionary.get("kid", keyId) || keyId.isEmpty()) {
- LOG(Media, "CDMSessionClearKey::update(%p) - failed: keyId missing or empty", this);
- continue;
- }
-
- String rawKeyData;
- if (!keyDictionary.get("k", rawKeyData) || rawKeyData.isEmpty()) {
- LOG(Media, "CDMSessionClearKey::update(%p) - failed: key missing or empty", this);
- continue;
- }
-
- Vector<uint8_t> keyData;
- if (!base64Decode(rawKeyData, keyData) || keyData.isEmpty()) {
- LOG(Media, "CDMSessionClearKey::update(%p) - failed: unable to base64 decode key", 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<ArrayBuffer> CDMSessionClearKey::cachedKeyForKeyID(const String& keyId) const
-{
- if (!m_cachedKeys.contains(keyId))
- return nullptr;
-
- auto keyData = m_cachedKeys.get(keyId);
- RefPtr<Uint8Array> keyDataArray = Uint8Array::create(keyData.data(), keyData.size());
- return keyDataArray->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 "CDMSession.h"
-#include <wtf/HashMap.h>
-
-#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& sessionId() const override { return m_sessionId; }
- virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array*, String&, unsigned short&, unsigned long&) override;
- virtual void releaseKeys() override;
- virtual bool update(Uint8Array*, RefPtr<Uint8Array>&, unsigned short&, unsigned long&) override;
- virtual RefPtr<ArrayBuffer> cachedKeyForKeyID(const String&) const override;
-
-protected:
- CDMSessionClient* m_client;
- RefPtr<Uint8Array> m_initData;
- HashMap<String, Vector<uint8_t>> 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->releaseKeys();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<ArrayBuffer> MediaKeySession::cachedKeyForKeyId(const String& keyId) const
-{
- return m_session ? m_session->cachedKeyForKeyID(keyId) : nullptr;
-}
-
</del><span class="cx"> const String& MediaKeySession::sessionId() const
</span><span class="cx"> {
</span><span class="cx"> return m_session->sessionId();
</span><span class="lines">@@ -189,8 +184,6 @@
</span><span class="cx"> RefPtr<Event> keyaddedEvent = Event::create(eventNames().webkitkeyaddedEvent, false, false);
</span><span class="cx"> keyaddedEvent->setTarget(this);
</span><span class="cx"> m_asyncEventQueue.enqueueEvent(keyaddedEvent.release());
</span><del>-
- keys()->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<ArrayBuffer> cachedKeyForKeyId(const String& keyId) const;
-
</del><span class="cx"> using RefCounted<MediaKeySession>::ref;
</span><span class="cx"> using RefCounted<MediaKeySession>::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->keyAdded();
-
</del><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<ArrayBuffer> MediaKeys::cachedKeyForKeyId(const String& keyId) const
-{
- for (auto& session : m_sessions) {
- if (RefPtr<ArrayBuffer> key = session->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<ArrayBuffer> cachedKeyForKeyId(const String& 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"> </ClCompile>
</span><span class="cx"> <ClCompile Include="..\Modules\encryptedmedia\CDM.cpp" />
</span><span class="cx"> <ClCompile Include="..\Modules\encryptedmedia\CDMPrivateMediaPlayer.cpp" />
</span><del>- <ClCompile Include="..\Modules\encryptedmedia\CDMPrivateClearKey.cpp" />
- <ClCompile Include="..\Modules\encryptedmedia\CDMSessionClearKey.cpp" />
</del><span class="cx"> <ClCompile Include="..\Modules\encryptedmedia\MediaKeyMessageEvent.cpp" />
</span><span class="cx"> <ClCompile Include="..\Modules\encryptedmedia\MediaKeyNeededEvent.cpp" />
</span><span class="cx"> <ClCompile Include="..\Modules\encryptedmedia\MediaKeys.cpp" />
</span><span class="lines">@@ -19007,8 +19005,6 @@
</span><span class="cx"> <ClInclude Include="..\Modules\encryptedmedia\CDM.h" />
</span><span class="cx"> <ClInclude Include="..\Modules\encryptedmedia\CDMPrivate.h" />
</span><span class="cx"> <ClInclude Include="..\Modules\encryptedmedia\CDMPrivateMediaPlayer.h" />
</span><del>- <ClInclude Include="..\Modules\encryptedmedia\CDMPrivateClearKey.h" />
- <ClInclude Include="..\Modules\encryptedmedia\CDMSessionClearKey.h" />
</del><span class="cx"> <ClInclude Include="..\Modules\encryptedmedia\MediaKeyMessageEvent.h" />
</span><span class="cx"> <ClInclude Include="..\Modules\encryptedmedia\MediaKeyNeededEvent.h" />
</span><span class="cx"> <ClInclude Include="..\Modules\encryptedmedia\MediaKeys.h" />
</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"> <ClCompile Include="..\Modules\encryptedmedia\CDMPrivateMediaPlayer.cpp">
</span><span class="cx"> <Filter>Modules\encryptedmedia</Filter>
</span><span class="cx"> </ClCompile>
</span><del>- <ClCompile Include="..\Modules\encryptedmedia\CDMPrivateClearKey.cpp">
- <Filter>Modules\encryptedmedia</Filter>
- </ClCompile>
- <ClCompile Include="..\Modules\encryptedmedia\CDMSessionClearKey.cpp">
- <Filter>Modules\encryptedmedia</Filter>
- </ClCompile>
</del><span class="cx"> <ClCompile Include="..\Modules\encryptedmedia\MediaKeyMessageEvent.cpp">
</span><span class="cx"> <Filter>Modules\encryptedmedia</Filter>
</span><span class="cx"> </ClCompile>
</span><span class="lines">@@ -14288,12 +14282,6 @@
</span><span class="cx"> <ClInclude Include="..\Modules\encryptedmedia\CDMPrivateMediaPlayer.h">
</span><span class="cx"> <Filter>Modules\encryptedmedia</Filter>
</span><span class="cx"> </ClInclude>
</span><del>- <ClInclude Include="..\Modules\encryptedmedia\CDMPrivateClearKey.h">
- <Filter>Modules\encryptedmedia</Filter>
- </ClInclude>
- <ClInclude Include="..\Modules\encryptedmedia\CDMSessionClearKey.h">
- <Filter>Modules\encryptedmedia</Filter>
- </ClInclude>
</del><span class="cx"> <ClInclude Include="..\Modules\encryptedmedia\MediaKeyMessageEvent.h">
</span><span class="cx"> <Filter>Modules\encryptedmedia</Filter>
</span><span class="cx"> </ClInclude>
</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 = "<group>"; };
</span><span class="cx">                 CDE83DB4183D352A0031EAA3 /* JSVideoPlaybackQuality.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVideoPlaybackQuality.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 CDE83DB5183D352A0031EAA3 /* JSVideoPlaybackQuality.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVideoPlaybackQuality.h; sourceTree = "<group>"; };
</span><del>-                CDE8B5EA1A69777300B4B66A /* CDMPrivateClearKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CDMPrivateClearKey.cpp; sourceTree = "<group>"; };
-                CDE8B5EB1A69777300B4B66A /* CDMPrivateClearKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDMPrivateClearKey.h; sourceTree = "<group>"; };
-                CDE8B5EE1A69778B00B4B66A /* CDMSessionClearKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CDMSessionClearKey.cpp; sourceTree = "<group>"; };
-                CDE8B5EF1A69778B00B4B66A /* CDMSessionClearKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDMSessionClearKey.h; sourceTree = "<group>"; };
</del><span class="cx">                 CDEA762C14608224008B31F1 /* Clock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Clock.h; sourceTree = "<group>"; };
</span><span class="cx">                 CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformClockCA.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 CDEA762F146084EE008B31F1 /* PlatformClockCA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformClockCA.h; sourceTree = "<group>"; };
</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 = "<group>";
</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<ArrayBuffer> HTMLMediaElement::mediaPlayerCachedKeyForKeyId(const String& keyId) const
-{
- return m_mediaKeys ? m_mediaKeys->cachedKeyForKeyId(keyId) : nullptr;
-}
-
</del><span class="cx"> bool HTMLMediaElement::mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array* initData)
</span><span class="cx"> {
</span><span class="cx"> if (!hasEventListeners("webkitneedkey")) {
</span><span class="lines">@@ -2235,12 +2230,6 @@
</span><span class="cx"> if (m_mediaKeys)
</span><span class="cx"> m_mediaKeys->setMediaElement(this);
</span><span class="cx"> }
</span><del>-
-void HTMLMediaElement::keyAdded()
-{
- if (m_player)
- m_player->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<ArrayBuffer> mediaPlayerCachedKeyForKeyId(const String& 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<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) = 0;
</span><span class="cx"> virtual void releaseKeys() = 0;
</span><span class="cx"> virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) = 0;
</span><del>- virtual RefPtr<ArrayBuffer> cachedKeyForKeyID(const String&) 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->setCDMSession(session);
</span><span class="cx"> }
</span><del>-
-void MediaPlayer::keyAdded()
-{
- m_private->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<ArrayBuffer> MediaPlayer::cachedKeyForKeyId(const String& 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<ArrayBuffer> mediaPlayerCachedKeyForKeyId(const String&) 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<CDMSession> createSession(const String& 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<ArrayBuffer> cachedKeyForKeyId(const String& 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<CDMSession> createSession(const String&) { 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<AVAssetResourceLoadingRequest> takeRequestForKeyURI(const String&);
</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 "SecurityOrigin.h"
</span><span class="cx"> #import "SerializedPlatformRepresentationMac.h"
</span><span class="cx"> #import "SoftLinking.h"
</span><del>-#import "TextEncoding.h"
</del><span class="cx"> #import "TextTrackRepresentation.h"
</span><span class="cx"> #import "UUID.h"
</span><span class="cx"> #import "VideoTrackPrivateAVFObjC.h"
</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& keySystem)
</span><span class="cx"> {
</span><del>- if (equalIgnoringCase(keySystem, "com.apple.fps") || equalIgnoringCase(keySystem, "com.apple.fps.1_0") || equalIgnoringCase(keySystem, "org.w3c.clearkey"))
</del><ins>+ if (equalIgnoringCase(keySystem, "com.apple.fps") || equalIgnoringCase(keySystem, "com.apple.fps.1_0"))
</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() && !parameters.keySystem.isEmpty()) {
</span><del>- // "Clear Key" is only supported with HLS:
- if (equalIgnoringCase(parameters.keySystem, "org.w3c.clearkey") && !parameters.type.isEmpty() && !equalIgnoringCase(parameters.type, "application/x-mpegurl"))
- 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>- // "Clear Key" is only supported with HLS:
- if (equalIgnoringCase(keySystem, "org.w3c.clearkey") && !mimeType.isEmpty() && !equalIgnoringCase(mimeType, "application/x-mpegurl"))
- 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->byteLength()];
- [infoRequest setByteRangeAccessSupported:YES];
- }
-
- if (AVAssetResourceLoadingDataRequest *dataRequest = [request dataRequest]) {
- long start = [dataRequest currentOffset];
- long long end = std::min<long long>(keyData->byteLength(), [dataRequest currentOffset] + [dataRequest requestedLength]);
-
- ASSERT(start <= std::numeric_limits<int>::max());
- ASSERT(end <= std::numeric_limits<int>::max());
-
- if (start < 0 || end < 0 || start >= keyData->byteLength()) {
- [request finishLoadingWithError:nil];
- return;
- }
-
- RefPtr<ArrayBuffer> requestedKeyData = keyData->slice(start, end);
- RetainPtr<NSData> nsData = adoptNS([[NSData alloc] initWithBytes:requestedKeyData->data() length:requestedKeyData->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 == "clearkey") {
- String keyID = [[[avRequest request] URL] resourceSpecifier];
- StringView keyIDView(keyID);
- CString utf8EncodedKeyId = UTF8Encoding().encode(keyIDView, URLEncodedEntitiesForUnencodables);
-
- RefPtr<Uint8Array> initData = Uint8Array::create(utf8EncodedKeyId.length());
- initData->setRange((JSC::Uint8Adaptor::Type*)utf8EncodedKeyId.data(), utf8EncodedKeyId.length(), 0);
-
- auto keyData = player()->cachedKeyForKeyId(keyID);
- if (keyData) {
- fulfillRequestWithKeyData(avRequest, keyData.get());
- return false;
- }
-
- if (!player()->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<String> fulfilledKeyIds;
-
- for (auto& pair : m_keyURIToRequestMap) {
- const String& keyId = pair.key;
- const RetainPtr<AVAssetResourceLoadingRequest>& request = pair.value;
-
- auto keyData = player()->cachedKeyForKeyId(keyId);
- if (!keyData)
- continue;
-
- fulfillRequestWithKeyData(request.get(), keyData.get());
- fulfilledKeyIds.append(keyId);
- }
-
- for (auto& keyId : fulfilledKeyIds)
- m_keyURIToRequestMap.remove(keyId);
-}
-
</del><span class="cx"> std::unique_ptr<CDMSession> MediaPlayerPrivateAVFoundationObjC::createSession(const String& keySystem)
</span><span class="cx"> {
</span><span class="cx"> if (!keySystemIsSupported(keySystem))
</span></span></pre>
</div>
</div>
</body>
</html>