Title: [266146] branches/safari-610.2.2-branch
Revision
266146
Author
[email protected]
Date
2020-08-25 14:57:10 -0700 (Tue, 25 Aug 2020)

Log Message

Revert r265115. rdar://problem/67759082

Modified Paths

Removed Paths

Diff

Modified: branches/safari-610.2.2-branch/Source/WTF/ChangeLog (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WTF/ChangeLog	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WTF/ChangeLog	2020-08-25 21:57:10 UTC (rev 266146)
@@ -1,3 +1,7 @@
+2020-08-25  Russell Epstein  <[email protected]>
+
+        Revert r265115. rdar://problem/67759082
+
 2020-08-15  Yusuke Suzuki  <[email protected]>
 
         Use std::call_once + LazyNeverDestroyed to initialize complex data structures

Modified: branches/safari-610.2.2-branch/Source/WTF/WTF.xcodeproj/project.pbxproj (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WTF/WTF.xcodeproj/project.pbxproj	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WTF/WTF.xcodeproj/project.pbxproj	2020-08-25 21:57:10 UTC (rev 266146)
@@ -687,7 +687,6 @@
 		C6F050790D9C432A99085E75 /* ASCIILiteral.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASCIILiteral.cpp; sourceTree = "<group>"; };
 		C8F597CA2A57417FBAB92FD6 /* RandomDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RandomDevice.cpp; sourceTree = "<group>"; };
 		CD00360D21501F7800F4ED4C /* StringToIntegerConversion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StringToIntegerConversion.h; sourceTree = "<group>"; };
-		CD48A87024C8A21600F5800C /* Observer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Observer.h; sourceTree = "<group>"; };
 		CD5497AA15857D0300B5BC30 /* MediaTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTime.cpp; sourceTree = "<group>"; };
 		CD5497AB15857D0300B5BC30 /* MediaTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTime.h; sourceTree = "<group>"; };
 		CD6D9FCD1EEF3AD4008B0671 /* Algorithms.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Algorithms.h; sourceTree = "<group>"; };
@@ -1129,7 +1128,6 @@
 				7E29C33D15FFD79B00516D61 /* ObjCRuntimeExtras.h */,
 				8348BA0D21FBC0D400FD3054 /* ObjectIdentifier.cpp */,
 				83A8AC3D1FABBE94002064AC /* ObjectIdentifier.h */,
-				CD48A87024C8A21600F5800C /* Observer.h */,
 				1AFDE6521953B23D00C48FFA /* Optional.h */,
 				1A4656181C7FC68E00F5920F /* OptionSet.h */,
 				275DFB6B238BDF72001230E2 /* OptionSetHash.h */,

Modified: branches/safari-610.2.2-branch/Source/WTF/wtf/CMakeLists.txt (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WTF/wtf/CMakeLists.txt	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WTF/wtf/CMakeLists.txt	2020-08-25 21:57:10 UTC (rev 266146)
@@ -156,7 +156,6 @@
     OSRandomSource.h
     ObjCRuntimeExtras.h
     ObjectIdentifier.h
-    Observer.h
     OptionSet.h
     OptionSetHash.h
     Optional.h

Deleted: branches/safari-610.2.2-branch/Source/WTF/wtf/Observer.h (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WTF/wtf/Observer.h	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WTF/wtf/Observer.h	2020-08-25 21:57:10 UTC (rev 266146)
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2020 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.
- */
-
-#pragma once
-
-#include <wtf/Function.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/WeakPtr.h>
-
-namespace WTF {
-
-template<typename> class Observer;
-
-template <typename Out, typename... In>
-class Observer<Out(In...)> : public CanMakeWeakPtr<Observer<Out(In...)>> {
-    WTF_MAKE_NONCOPYABLE(Observer);
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    Observer(Function<Out(In...)>&& callback)
-        : m_callback(WTFMove(callback))
-    {
-        ASSERT(m_callback);
-    }
-
-    Out operator()(In... in) const
-    {
-        ASSERT(m_callback);
-        return m_callback(std::forward<In>(in)...);
-    }
-
-private:
-    Function<Out(In...)> m_callback;
-};
-
-}
-
-using WTF::Observer;
-

Modified: branches/safari-610.2.2-branch/Source/WebCore/ChangeLog (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebCore/ChangeLog	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebCore/ChangeLog	2020-08-25 21:57:10 UTC (rev 266146)
@@ -1,3 +1,7 @@
+2020-08-25  Russell Epstein  <[email protected]>
+
+        Revert r265115. rdar://problem/67759082
+
 2020-08-25  Alan Coon  <[email protected]>
 
         Cherry-pick r265881. rdar://problem/67742375

Modified: branches/safari-610.2.2-branch/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp	2020-08-25 21:57:10 UTC (rev 266146)
@@ -76,7 +76,6 @@
     , m_sessionType(sessionType)
     , m_implementation(WTFMove(implementation))
     , m_instanceSession(WTFMove(instanceSession))
-    , m_displayChangedObserver([this] (auto displayID) { displayChanged(displayID); })
 {
     // https://w3c.github.io/encrypted-media/#dom-mediakeys-createsession
     // W3C Editor's Draft 09 November 2016
@@ -106,8 +105,6 @@
     m_instanceSession->setLogger(m_logger, m_logIdentifier);
 #endif
     m_instanceSession->setClient(makeWeakPtr(*this));
-
-    document.addDisplayChangedObserver(m_displayChangedObserver);
 }
 
 MediaKeySession::~MediaKeySession()
@@ -725,18 +722,6 @@
     m_sessionId = sessionId;
 }
 
-PlatformDisplayID MediaKeySession::displayID()
-{
-    auto* document = downcast<Document>(scriptExecutionContext());
-    if (!document)
-        return 0;
-
-    if (auto* page = document->page())
-        return page->displayID();
-
-    return 0;
-}
-
 void MediaKeySession::updateExpiration(double)
 {
     notImplemented();
@@ -805,11 +790,6 @@
 }
 #endif
 
-void MediaKeySession::displayChanged(PlatformDisplayID displayID)
-{
-    m_instanceSession->displayChanged(displayID);
-}
-
 } // namespace WebCore
 
 #endif

Modified: branches/safari-610.2.2-branch/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h	2020-08-25 21:57:10 UTC (rev 266146)
@@ -37,7 +37,6 @@
 #include "MediaKeyMessageType.h"
 #include "MediaKeySessionType.h"
 #include "MediaKeyStatus.h"
-#include <wtf/Observer.h>
 #include <wtf/RefCounted.h>
 #include <wtf/UniqueRef.h>
 #include <wtf/Vector.h>
@@ -100,7 +99,6 @@
     void updateKeyStatuses(CDMInstanceSessionClient::KeyStatusVector&&) override;
     void sendMessage(CDMMessageType, Ref<SharedBuffer>&& message) final;
     void sessionIdChanged(const String&) final;
-    PlatformDisplayID displayID() final;
 
     // EventTarget
     EventTargetInterface eventTargetInterface() const override { return MediaKeySessionEventTargetInterfaceType; }
@@ -112,9 +110,6 @@
     const char* activeDOMObjectName() const final;
     bool virtualHasPendingActivity() const final;
 
-    // DisplayChangedObserver
-    void displayChanged(PlatformDisplayID);
-
 #if !RELEASE_LOG_DISABLED
     // LoggerHelper
     const WTF::Logger& logger() const { return m_logger; }
@@ -142,9 +137,6 @@
     double m_firstDecryptTime { 0 };
     double m_latestDecryptTime { 0 };
     Vector<std::pair<Ref<SharedBuffer>, MediaKeyStatus>> m_statuses;
-
-    using DisplayChangedObserver = Observer<void(PlatformDisplayID)>;
-    DisplayChangedObserver m_displayChangedObserver;
 };
 
 } // namespace WebCore

Modified: branches/safari-610.2.2-branch/Source/WebCore/PAL/ChangeLog (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebCore/PAL/ChangeLog	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebCore/PAL/ChangeLog	2020-08-25 21:57:10 UTC (rev 266146)
@@ -1,3 +1,7 @@
+2020-08-25  Russell Epstein  <[email protected]>
+
+        Revert r265115. rdar://problem/67759082
+
 2020-08-11  Myles C. Maxfield  <[email protected]>
 
         Fix Apple internal Mojave builds

Modified: branches/safari-610.2.2-branch/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h	2020-08-25 21:57:10 UTC (rev 266146)
@@ -196,12 +196,6 @@
 @interface AVContentKeySession (AVContentKeyGroup_Support)
 - (nonnull AVContentKeyReportGroup *)makeContentKeyGroup;
 @end
-
-@interface AVContentKeyRequest (OutputObscured)
-NS_ASSUME_NONNULL_BEGIN
-- (BOOL)willOutputBeObscuredDueToInsufficientExternalProtectionForDisplays:(NSArray<NSNumber *> *)displays;
-NS_ASSUME_NONNULL_END
-@end
 #endif // HAVE(AVCONTENTKEYSESSION)
 
 #if ENABLE(MEDIA_SOURCE) && !USE(APPLE_INTERNAL_SDK)

Modified: branches/safari-610.2.2-branch/Source/WebCore/dom/Document.cpp (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebCore/dom/Document.cpp	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebCore/dom/Document.cpp	2020-08-25 21:57:10 UTC (rev 266146)
@@ -6476,11 +6476,6 @@
         if (view->usesCompositing())
             view->compositor().windowScreenDidChange(displayID);
     }
-
-    for (auto& observer : copyToVector(m_displayChangedObservers)) {
-        if (observer)
-            (*observer)(displayID);
-    }
 }
 
 String Document::displayStringModifiedByEncoding(const String& string) const
@@ -6535,12 +6530,6 @@
     return listener;
 }
 
-void Document::addDisplayChangedObserver(const DisplayChangedObserver& observer)
-{
-    ASSERT(!m_displayChangedObservers.contains(observer));
-    m_displayChangedObservers.add(observer);
-}
-
 #if ENABLE(DEVICE_ORIENTATION) && PLATFORM(IOS_FAMILY)
 
 DeviceMotionController& Document::deviceMotionController() const

Modified: branches/safari-610.2.2-branch/Source/WebCore/dom/Document.h (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebCore/dom/Document.h	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebCore/dom/Document.h	2020-08-25 21:57:10 UTC (rev 266146)
@@ -72,7 +72,6 @@
 #include <wtf/HashSet.h>
 #include <wtf/Logger.h>
 #include <wtf/ObjectIdentifier.h>
-#include <wtf/Observer.h>
 #include <wtf/UniqueRef.h>
 #include <wtf/WeakHashSet.h>
 #include <wtf/WeakPtr.h>
@@ -1172,9 +1171,6 @@
     WEBCORE_EXPORT void removeMediaCanStartListener(MediaCanStartListener&);
     MediaCanStartListener* takeAnyMediaCanStartListener();
 
-    using DisplayChangedObserver = WTF::Observer<void(PlatformDisplayID)>;
-    void addDisplayChangedObserver(const DisplayChangedObserver&);
-
 #if ENABLE(FULLSCREEN_API)
     FullscreenManager& fullscreenManager() { return m_fullscreenManager; }
     const FullscreenManager& fullscreenManager() const { return m_fullscreenManager; }
@@ -1848,7 +1844,6 @@
     RenderPtr<RenderView> m_renderView;
 
     WeakHashSet<MediaCanStartListener> m_mediaCanStartListeners;
-    WeakHashSet<DisplayChangedObserver> m_displayChangedObservers;
 
 #if ENABLE(FULLSCREEN_API)
     UniqueRef<FullscreenManager> m_fullscreenManager;

Modified: branches/safari-610.2.2-branch/Source/WebCore/platform/encryptedmedia/CDMInstanceSession.h (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebCore/platform/encryptedmedia/CDMInstanceSession.h	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebCore/platform/encryptedmedia/CDMInstanceSession.h	2020-08-25 21:57:10 UTC (rev 266146)
@@ -54,8 +54,6 @@
     virtual void updateKeyStatuses(KeyStatusVector&&) = 0;
     virtual void sendMessage(CDMMessageType, Ref<SharedBuffer>&& message) = 0;
     virtual void sessionIdChanged(const String&) = 0;
-    using PlatformDisplayID = uint32_t;
-    virtual PlatformDisplayID displayID() = 0;
 };
 
 class CDMInstanceSession : public RefCounted<CDMInstanceSession> {
@@ -104,9 +102,6 @@
     virtual void removeSessionData(const String& sessionId, LicenseType, RemoveSessionDataCallback&&) = 0;
 
     virtual void storeRecordOfKeyUsage(const String& sessionId) = 0;
-
-    using PlatformDisplayID = uint32_t;
-    virtual void displayChanged(PlatformDisplayID) { }
 };
 
 } // namespace WebCore

Modified: branches/safari-610.2.2-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h	2020-08-25 21:57:10 UTC (rev 266146)
@@ -66,7 +66,6 @@
     virtual void sessionIdentifierChanged(NSData*) = 0;
     virtual void groupSessionIdentifierChanged(AVContentKeyReportGroup*, NSData*) = 0;
     virtual void outputObscuredDueToInsufficientExternalProtectionChanged(bool) = 0;
-    virtual void externalProtectionStatusDidChangeForContentKeyRequest(AVContentKeyRequest*) = 0;
 };
 
 class CDMInstanceFairPlayStreamingAVFObjC final : public CDMInstance, public AVContentKeySessionDelegateClient, public CanMakeWeakPtr<CDMInstanceFairPlayStreamingAVFObjC> {
@@ -112,7 +111,6 @@
     void sessionIdentifierChanged(NSData*) final;
     void groupSessionIdentifierChanged(AVContentKeyReportGroup*, NSData*) final;
     void outputObscuredDueToInsufficientExternalProtectionChanged(bool) final;
-    void externalProtectionStatusDidChangeForContentKeyRequest(AVContentKeyRequest*) final;
 
     using Keys = Vector<Ref<SharedBuffer>>;
     CDMInstanceSessionFairPlayStreamingAVFObjC* sessionForKeyIDs(const Keys&) const;
@@ -156,7 +154,6 @@
     void closeSession(const String&, CloseSessionCallback&&) final;
     void removeSessionData(const String&, LicenseType, RemoveSessionDataCallback&&) final;
     void storeRecordOfKeyUsage(const String&) final;
-    void displayChanged(PlatformDisplayID) final;
     void setClient(WeakPtr<CDMInstanceSessionClient>&&) final;
     void clearClient() final;
 
@@ -171,7 +168,6 @@
     void sessionIdentifierChanged(NSData*) final;
     void groupSessionIdentifierChanged(AVContentKeyReportGroup*, NSData*) final;
     void outputObscuredDueToInsufficientExternalProtectionChanged(bool) final;
-    void externalProtectionStatusDidChangeForContentKeyRequest(AVContentKeyRequest*) final;
 
     using Keys = CDMInstanceFairPlayStreamingAVFObjC::Keys;
     Keys keyIDs();
@@ -200,8 +196,6 @@
     const char* logClassName() const { return "CDMInstanceSessionFairPlayStreamingAVFObjC"; }
 #endif
 
-    void updateProtectionStatusForDisplayID(PlatformDisplayID);
-
     Ref<CDMInstanceFairPlayStreamingAVFObjC> m_instance;
     RetainPtr<AVContentKeyReportGroup> m_group;
     RetainPtr<AVContentKeySession> m_session;

Modified: branches/safari-610.2.2-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm	2020-08-25 21:57:10 UTC (rev 266146)
@@ -159,13 +159,6 @@
         _parent->groupSessionIdentifierChanged(reportGroup, reportGroup.contentProtectionSessionIdentifier);
 }
 
-- (void)contentKeySession:(AVContentKeySession *)session externalProtectionStatusDidChangeForContentKeyRequest:(AVContentKeyRequest *)keyRequest
-{
-    UNUSED_PARAM(session);
-    if (_parent)
-        _parent->externalProtectionStatusDidChangeForContentKeyRequest(keyRequest);
-}
-
 @end
 
 namespace WebCore {
@@ -524,17 +517,6 @@
     }
 }
 
-void CDMInstanceFairPlayStreamingAVFObjC::externalProtectionStatusDidChangeForContentKeyRequest(AVContentKeyRequest* request)
-{
-    if (auto* session = sessionForRequest(request)) {
-        session->externalProtectionStatusDidChangeForContentKeyRequest(request);
-        return;
-    }
-
-    ASSERT_NOT_REACHED();
-    ERROR_LOG_IF_POSSIBLE(LOGIDENTIFIER, "- no responsible session; dropping");
-}
-
 CDMInstanceSessionFairPlayStreamingAVFObjC* CDMInstanceFairPlayStreamingAVFObjC::sessionForKeyIDs(const Keys& keyIDs) const
 {
     for (auto& sessionInterface : m_sessions) {
@@ -999,11 +981,6 @@
     // no-op; key usage data is stored automatically.
 }
 
-void CDMInstanceSessionFairPlayStreamingAVFObjC::displayChanged(PlatformDisplayID displayID)
-{
-    updateProtectionStatusForDisplayID(displayID);
-}
-
 void CDMInstanceSessionFairPlayStreamingAVFObjC::setClient(WeakPtr<CDMInstanceSessionClient>&& client)
 {
     m_client = WTFMove(client);
@@ -1370,32 +1347,6 @@
         m_client->updateKeyStatuses(keyStatuses());
 }
 
-void CDMInstanceSessionFairPlayStreamingAVFObjC::externalProtectionStatusDidChangeForContentKeyRequest(AVContentKeyRequest* request)
-{
-    UNUSED_PARAM(request);
-    if (!m_client)
-        return;
-
-    updateProtectionStatusForDisplayID(m_client->displayID());
-}
-
-void CDMInstanceSessionFairPlayStreamingAVFObjC::updateProtectionStatusForDisplayID(PlatformDisplayID displayID)
-{
-    if (m_requests.isEmpty())
-        return;
-
-    auto keyRequestHasInsufficientProtectionForDisplayID = [displayID] (auto& request) -> bool {
-        if ([request respondsToSelector:@selector(willOutputBeObscuredDueToInsufficientExternalProtectionForDisplays:)])
-            return [request willOutputBeObscuredDueToInsufficientExternalProtectionForDisplays:@[ @(displayID) ]];
-        return false;
-    };
-
-    bool outputWillBeObscured = WTF::anyOf(m_requests, [&](Request& request) {
-        return WTF::anyOf(request.requests, keyRequestHasInsufficientProtectionForDisplayID);
-    });
-    outputObscuredDueToInsufficientExternalProtectionChanged(outputWillBeObscured);
-}
-
 bool CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSessionOrGroup()
 {
     if (m_session || m_group)

Modified: branches/safari-610.2.2-branch/Source/WebKit/ChangeLog (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebKit/ChangeLog	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebKit/ChangeLog	2020-08-25 21:57:10 UTC (rev 266146)
@@ -1,3 +1,7 @@
+2020-08-25  Russell Epstein  <[email protected]>
+
+        Revert r265115. rdar://problem/67759082
+
 2020-08-25  Alan Coon  <[email protected]>
 
         Cherry-pick r266099. rdar://problem/67742560

Modified: branches/safari-610.2.2-branch/Source/WebKit/GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebKit/GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebKit/GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp	2020-08-25 21:57:10 UTC (rev 266146)
@@ -127,11 +127,6 @@
     m_session->storeRecordOfKeyUsage(sessionId);
 }
 
-void RemoteCDMInstanceSessionProxy::displayIDChanged(PlatformDisplayID displayID)
-{
-    m_session->displayChanged(displayID);
-}
-
 void RemoteCDMInstanceSessionProxy::updateKeyStatuses(KeyStatusVector&& keyStatuses)
 {
     if (!m_cdm)

Modified: branches/safari-610.2.2-branch/Source/WebKit/GPUProcess/media/RemoteCDMInstanceSessionProxy.h (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebKit/GPUProcess/media/RemoteCDMInstanceSessionProxy.h	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebKit/GPUProcess/media/RemoteCDMInstanceSessionProxy.h	2020-08-25 21:57:10 UTC (rev 266146)
@@ -73,18 +73,15 @@
     void closeSession(const String& sessionId, CloseSessionCallback&&);
     void removeSessionData(const String& sessionId, LicenseType, RemoveSessionDataCallback&&);
     void storeRecordOfKeyUsage(const String& sessionId);
-    void displayIDChanged(PlatformDisplayID);
 
     // CDMInstanceSessionClient
     void updateKeyStatuses(KeyStatusVector&&) final;
     void sendMessage(WebCore::CDMMessageType, Ref<WebCore::SharedBuffer>&& message) final;
     void sessionIdChanged(const String&) final;
-    PlatformDisplayID displayID() final { return m_displayID; }
 
     WeakPtr<RemoteCDMProxy> m_cdm;
     Ref<WebCore::CDMInstanceSession> m_session;
     RemoteCDMInstanceSessionIdentifier m_identifier;
-    PlatformDisplayID m_displayID { 0 };
 };
 
 }

Modified: branches/safari-610.2.2-branch/Source/WebKit/GPUProcess/media/RemoteCDMInstanceSessionProxy.messages.in (266145 => 266146)


--- branches/safari-610.2.2-branch/Source/WebKit/GPUProcess/media/RemoteCDMInstanceSessionProxy.messages.in	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Source/WebKit/GPUProcess/media/RemoteCDMInstanceSessionProxy.messages.in	2020-08-25 21:57:10 UTC (rev 266146)
@@ -32,7 +32,6 @@
     CloseSession(String sessionId) -> () Async
     RemoveSessionData(String sessionId, WebCore::CDMInstanceSession::LicenseType type) -> (WebCore::CDMInstanceSession::KeyStatusVector changedKeys, Optional<IPC::SharedBufferDataReference> message, bool succeeded) Async
     StoreRecordOfKeyUsage(String sessionId)
-    DisplayIDChanged(uint32_t displayID)
 }
 
 #endif

Modified: branches/safari-610.2.2-branch/Tools/ChangeLog (266145 => 266146)


--- branches/safari-610.2.2-branch/Tools/ChangeLog	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Tools/ChangeLog	2020-08-25 21:57:10 UTC (rev 266146)
@@ -1,3 +1,7 @@
+2020-08-25  Russell Epstein  <[email protected]>
+
+        Revert r265115. rdar://problem/67759082
+
 2020-08-17  Carlos Garcia Campos  <[email protected]>
 
         [GTK][WPE] Remove support for NPAPI plugins

Modified: branches/safari-610.2.2-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (266145 => 266146)


--- branches/safari-610.2.2-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2020-08-25 21:57:10 UTC (rev 266146)
@@ -986,7 +986,6 @@
 		CD2D0D1A213465560018C784 /* NowPlaying.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD2D0D19213465560018C784 /* NowPlaying.mm */; };
 		CD3065E02165682E00E895DF /* VideoQualityDisplayCompositing.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD3065DF2165682E00E895DF /* VideoQualityDisplayCompositing.mm */; };
 		CD321B041E3A85FA00EB21C8 /* video-with-muted-audio-and-webaudio.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD321B031E3A84B700EB21C8 /* video-with-muted-audio-and-webaudio.html */; };
-		CD48A87324C8A66F00F5800C /* Observer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD48A87224C8A66F00F5800C /* Observer.cpp */; };
 		CD577799211CE0E4001B371E /* web-audio-only.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD577798211CDE8F001B371E /* web-audio-only.html */; };
 		CD57779C211CE91F001B371E /* audio-with-web-audio.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD57779A211CE6B7001B371E /* audio-with-web-audio.html */; };
 		CD57779D211CE91F001B371E /* video-with-audio-and-web-audio.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD57779B211CE6CE001B371E /* video-with-audio-and-web-audio.html */; };
@@ -2667,7 +2666,6 @@
 		CD2D0D19213465560018C784 /* NowPlaying.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NowPlaying.mm; sourceTree = "<group>"; };
 		CD3065DF2165682E00E895DF /* VideoQualityDisplayCompositing.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = VideoQualityDisplayCompositing.mm; sourceTree = "<group>"; };
 		CD321B031E3A84B700EB21C8 /* video-with-muted-audio-and-webaudio.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "video-with-muted-audio-and-webaudio.html"; sourceTree = "<group>"; };
-		CD48A87224C8A66F00F5800C /* Observer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Observer.cpp; sourceTree = "<group>"; };
 		CD5393C91757BAC400C07123 /* SHA1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SHA1.cpp; sourceTree = "<group>"; };
 		CD5451E919E41F9D0016936F /* CSSParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSParser.cpp; sourceTree = "<group>"; };
 		CD5497B315857F0C00B5BC30 /* MediaTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTime.cpp; sourceTree = "<group>"; };
@@ -4161,7 +4159,6 @@
 				CE78705C2107AB8C0053AC67 /* MoveOnlyLifecycleLogger.h */,
 				FEB6F74E1B2BA44E009E4922 /* NakedPtr.cpp */,
 				A57D54F21F338C3600A97AA7 /* NeverDestroyed.cpp */,
-				CD48A87224C8A66F00F5800C /* Observer.cpp */,
 				1AFDE6541953B2C000C48FFA /* Optional.cpp */,
 				CE50D8C81C8665CE0072EA5A /* OptionSet.cpp */,
 				E32B549122810AC0008AD702 /* Packed.cpp */,

Deleted: branches/safari-610.2.2-branch/Tools/TestWebKitAPI/Tests/WTF/Observer.cpp (266145 => 266146)


--- branches/safari-610.2.2-branch/Tools/TestWebKitAPI/Tests/WTF/Observer.cpp	2020-08-25 21:51:00 UTC (rev 266145)
+++ branches/safari-610.2.2-branch/Tools/TestWebKitAPI/Tests/WTF/Observer.cpp	2020-08-25 21:57:10 UTC (rev 266146)
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2020 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 <wtf/Observer.h>
-
-namespace TestWebKitAPI {
-
-TEST(WTF_Observer, Basic)
-{
-    bool testValue = false;
-
-    Observer<void(bool)> observer([&] (bool value) {
-        testValue = value;
-    });
-
-    observer(true);
-
-    EXPECT_TRUE(testValue);
-}
-
-TEST(WTF_Observer, Weak)
-{
-    bool testValue = false;
-
-    auto uniqueObserver = WTF::makeUnique<Observer<void(bool)>>([&] (bool value) {
-        testValue = value;
-    });
-
-    auto weakObserver = makeWeakPtr(uniqueObserver.get());
-
-    ASSERT_TRUE(static_cast<bool>(weakObserver));
-
-    (*weakObserver)(true);
-
-    EXPECT_TRUE(testValue);
-
-    uniqueObserver = nullptr;
-
-    EXPECT_FALSE(static_cast<bool>(weakObserver));
-}
-
-
-}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to