Title: [277672] trunk/Source/WebKit

Diff

Modified: trunk/Source/WebKit/ChangeLog (277671 => 277672)


--- trunk/Source/WebKit/ChangeLog	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/ChangeLog	2021-05-18 20:26:15 UTC (rev 277672)
@@ -1,3 +1,16 @@
+2021-05-18  Alex Christensen  <achristen...@webkit.org>
+
+        Unreviewed, reverting r277614.
+        <rdar://78167889>
+
+        Broke Mail
+
+        Reverted changeset:
+
+        "Remove API::Object::Type::BundlePageGroup"
+        https://bugs.webkit.org/show_bug.cgi?id=225611
+        https://commits.webkit.org/r277614
+
 2021-05-18  Said Abou-Hallawa  <s...@apple.com>
 
         Allow logging minimal info about uploading media files

Modified: trunk/Source/WebKit/Shared/API/APIObject.h (277671 => 277672)


--- trunk/Source/WebKit/Shared/API/APIObject.h	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/Shared/API/APIObject.h	2021-05-18 20:26:15 UTC (rev 277672)
@@ -66,7 +66,9 @@
         Error,
         FrameHandle,
         Image,
+        PageGroupData,
         PageHandle,
+        PageGroupHandle,
         ProtectionSpace,
         RenderLayer,
         RenderObject,
@@ -202,6 +204,7 @@
         BundleNodeHandle,
         BundlePage,
         BundlePageBanner,
+        BundlePageGroup,
         BundlePageOverlay,
         BundleRangeHandle,
         BundleScriptWorld,
@@ -316,7 +319,9 @@
         API::Object::Type::Error,
         API::Object::Type::FrameHandle,
         API::Object::Type::Image,
+        API::Object::Type::PageGroupData,
         API::Object::Type::PageHandle,
+        API::Object::Type::PageGroupHandle,
         API::Object::Type::ProtectionSpace,
         API::Object::Type::ResourceLoadInfo,
         API::Object::Type::SecurityOrigin,
@@ -450,6 +455,7 @@
         API::Object::Type::BundleNodeHandle,
         API::Object::Type::BundlePage,
         API::Object::Type::BundlePageBanner,
+        API::Object::Type::BundlePageGroup,
         API::Object::Type::BundlePageOverlay,
         API::Object::Type::BundleRangeHandle,
         API::Object::Type::BundleScriptWorld,

Copied: trunk/Source/WebKit/Shared/API/APIPageGroupHandle.cpp (from rev 277613, trunk/Source/WebKit/Shared/API/APIPageGroupHandle.cpp) (0 => 277672)


--- trunk/Source/WebKit/Shared/API/APIPageGroupHandle.cpp	                        (rev 0)
+++ trunk/Source/WebKit/Shared/API/APIPageGroupHandle.cpp	2021-05-18 20:26:15 UTC (rev 277672)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2014 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 "APIPageGroupHandle.h"
+
+#include "ArgumentCoders.h"
+#include "Decoder.h"
+#include "Encoder.h"
+
+namespace API {
+
+Ref<PageGroupHandle> PageGroupHandle::create(WebKit::WebPageGroupData&& webPageGroupData)
+{
+    return adoptRef(*new PageGroupHandle(WTFMove(webPageGroupData)));
+}
+
+PageGroupHandle::PageGroupHandle(WebKit::WebPageGroupData&& webPageGroupData)
+    : m_webPageGroupData(WTFMove(webPageGroupData))
+{
+}
+
+PageGroupHandle::~PageGroupHandle()
+{
+}
+
+void PageGroupHandle::encode(IPC::Encoder& encoder) const
+{
+    encoder << m_webPageGroupData;
+}
+
+bool PageGroupHandle::decode(IPC::Decoder& decoder, RefPtr<Object>& result)
+{
+    Optional<WebKit::WebPageGroupData> webPageGroupData;
+    decoder >> webPageGroupData;
+    if (!webPageGroupData)
+        return false;
+
+    result = create(WTFMove(*webPageGroupData));
+    return true;
+}
+
+}

Copied: trunk/Source/WebKit/Shared/API/APIPageGroupHandle.h (from rev 277613, trunk/Source/WebKit/Shared/API/APIPageGroupHandle.h) (0 => 277672)


--- trunk/Source/WebKit/Shared/API/APIPageGroupHandle.h	                        (rev 0)
+++ trunk/Source/WebKit/Shared/API/APIPageGroupHandle.h	2021-05-18 20:26:15 UTC (rev 277672)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2014 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 APIPageGroupHandle_h
+#define APIPageGroupHandle_h
+
+#include "APIObject.h"
+#include "WebPageGroupData.h"
+#include <wtf/RefPtr.h>
+
+namespace IPC {
+class Decoder;
+class Encoder;
+}
+
+namespace API {
+
+class PageGroupHandle : public ObjectImpl<Object::Type::PageGroupHandle> {
+public:
+    static Ref<PageGroupHandle> create(WebKit::WebPageGroupData&&);
+    virtual ~PageGroupHandle();
+
+    const WebKit::WebPageGroupData& webPageGroupData() const { return m_webPageGroupData; }
+
+    void encode(IPC::Encoder&) const;
+    static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, RefPtr<Object>&);
+
+private:
+    explicit PageGroupHandle(WebKit::WebPageGroupData&&);
+
+    const WebKit::WebPageGroupData m_webPageGroupData;
+};
+
+} // namespace API
+
+
+#endif // APIPageGroupHandle_h

Modified: trunk/Source/WebKit/Shared/Cocoa/APIObject.mm (277671 => 277672)


--- trunk/Source/WebKit/Shared/Cocoa/APIObject.mm	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/Shared/Cocoa/APIObject.mm	2021-05-18 20:26:15 UTC (rev 277672)
@@ -63,6 +63,7 @@
 #import "WKWebProcessPlugInHitTestResultInternal.h"
 #import "WKWebProcessPlugInInternal.h"
 #import "WKWebProcessPlugInNodeHandleInternal.h"
+#import "WKWebProcessPlugInPageGroupInternal.h"
 #import "WKWebProcessPlugInRangeHandleInternal.h"
 #import "WKWebProcessPlugInScriptWorldInternal.h"
 #import "WKWebpagePreferencesInternal.h"
@@ -426,6 +427,12 @@
         wrapper = [WKWebProcessPlugInNodeHandle alloc];
         break;
 
+    case Type::BundlePageGroup:
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN;
+        wrapper = [WKWebProcessPlugInPageGroup alloc];
+        ALLOW_DEPRECATED_DECLARATIONS_END;
+        break;
+
     case Type::BundleRangeHandle:
         wrapper = [WKWebProcessPlugInRangeHandle alloc];
         break;

Modified: trunk/Source/WebKit/Shared/Cocoa/SharedRingBufferStorage.cpp (277671 => 277672)


--- trunk/Source/WebKit/Shared/Cocoa/SharedRingBufferStorage.cpp	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/Shared/Cocoa/SharedRingBufferStorage.cpp	2021-05-18 20:26:15 UTC (rev 277672)
@@ -80,7 +80,7 @@
     m_endFrame = pair.second;
 }
 
-void SharedRingBufferStorage::setStorage(RefPtr<SharedMemory>&& storage, const WebCore::CAAudioStreamDescription& format, size_t frameCount)
+void SharedRingBufferStorage::setStorage(RefPtr<SharedMemory>&& storage, const CAAudioStreamDescription& format, size_t frameCount)
 {
     m_storage = WTFMove(storage);
     if (m_storageChangedHandler)
@@ -87,7 +87,7 @@
         m_storageChangedHandler(m_storage.get(), format, frameCount);
 }
 
-void SharedRingBufferStorage::allocate(size_t byteCount, const WebCore::CAAudioStreamDescription& format, size_t frameCount)
+void SharedRingBufferStorage::allocate(size_t byteCount, const CAAudioStreamDescription& format, size_t frameCount)
 {
     auto sharedMemory = SharedMemory::allocate(byteCount + sizeof(FrameBounds));
     new (NotNull, sharedMemory->data()) FrameBounds;

Modified: trunk/Source/WebKit/Shared/UserData.cpp (277671 => 277672)


--- trunk/Source/WebKit/Shared/UserData.cpp	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/Shared/UserData.cpp	2021-05-18 20:26:15 UTC (rev 277672)
@@ -33,6 +33,7 @@
 #include "APIFrameHandle.h"
 #include "APIGeometry.h"
 #include "APINumber.h"
+#include "APIPageGroupHandle.h"
 #include "APIPageHandle.h"
 #include "APISerializedScriptValue.h"
 #include "APIString.h"
@@ -229,6 +230,10 @@
         break;
     }
 
+    case API::Object::Type::PageGroupHandle:
+        static_cast<const API::PageGroupHandle&>(object).encode(encoder);
+        break;
+
     case API::Object::Type::PageHandle:
         static_cast<const API::PageHandle&>(object).encode(encoder);
         break;
@@ -410,6 +415,11 @@
         result = nullptr;
         break;
 
+    case API::Object::Type::PageGroupHandle:
+        if (!API::PageGroupHandle::decode(decoder, result))
+            return false;
+        break;
+
     case API::Object::Type::PageHandle:
         if (!API::PageHandle::decode(decoder, result))
             return false;

Modified: trunk/Source/WebKit/Shared/mac/MediaFormatReader/MediaSampleCursor.h (277671 => 277672)


--- trunk/Source/WebKit/Shared/mac/MediaFormatReader/MediaSampleCursor.h	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/Shared/mac/MediaFormatReader/MediaSampleCursor.h	2021-05-18 20:26:15 UTC (rev 277672)
@@ -29,7 +29,6 @@
 
 #include "CoreMediaWrapped.h"
 #include <WebCore/SampleMap.h>
-#include <wtf/Identified.h>
 #include <wtf/MediaTime.h>
 #include <wtf/Variant.h>
 

Modified: trunk/Source/WebKit/Sources.txt (277671 => 277672)


--- trunk/Source/WebKit/Sources.txt	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/Sources.txt	2021-05-18 20:26:15 UTC (rev 277672)
@@ -238,6 +238,7 @@
 Shared/API/APIFrameHandle.cpp
 Shared/API/APIGeometry.cpp
 Shared/API/APIObject.cpp
+Shared/API/APIPageGroupHandle.cpp
 Shared/API/APIPageHandle.cpp
 Shared/API/APIURLRequest.cpp
 Shared/API/APIURLResponse.cpp

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (277671 => 277672)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2021-05-18 20:26:15 UTC (rev 277672)
@@ -27,6 +27,7 @@
 #include "WebProcessProxy.h"
 
 #include "APIFrameHandle.h"
+#include "APIPageGroupHandle.h"
 #include "APIPageHandle.h"
 #include "AuthenticatorManager.h"
 #include "DataReference.h"
@@ -1339,6 +1340,7 @@
             case API::Object::Type::PageHandle:
                 return static_cast<const API::PageHandle&>(object).isAutoconverting();
 
+            case API::Object::Type::PageGroupHandle:
 #if PLATFORM(COCOA)
             case API::Object::Type::ObjCObjectGraph:
 #endif
@@ -1356,6 +1358,9 @@
                 ASSERT(static_cast<API::FrameHandle&>(object).isAutoconverting());
                 return m_webProcessProxy.webFrame(static_cast<API::FrameHandle&>(object).frameID());
 
+            case API::Object::Type::PageGroupHandle:
+                return WebPageGroup::get(static_cast<API::PageGroupHandle&>(object).webPageGroupData().pageGroupID);
+
             case API::Object::Type::PageHandle:
                 ASSERT(static_cast<API::PageHandle&>(object).isAutoconverting());
                 return m_webProcessProxy.webPage(static_cast<API::PageHandle&>(object).pageProxyID());
@@ -1403,6 +1408,9 @@
             case API::Object::Type::Page:
                 return API::PageHandle::createAutoconverting(static_cast<const WebPageProxy&>(object).identifier(), static_cast<const WebPageProxy&>(object).webPageID());
 
+            case API::Object::Type::PageGroup:
+                return API::PageGroupHandle::create(WebPageGroupData(static_cast<const WebPageGroup&>(object).data()));
+
 #if PLATFORM(COCOA)
             case API::Object::Type::ObjCObjectGraph:
                 return transformObjectsToHandles(static_cast<ObjCObjectGraph&>(object));

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (277671 => 277672)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2021-05-18 20:26:15 UTC (rev 277672)
@@ -464,6 +464,7 @@
 		1F7506B81859165D00EC0FF7 /* WKWebProcessPlugInFrameInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F01816B1858DC1500F92884 /* WKWebProcessPlugInFrameInternal.h */; };
 		1F7D36C118DA513F00D9D659 /* APIDownloadClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F7D36C018DA513F00D9D659 /* APIDownloadClient.h */; };
 		1FB00AC7185F76460019142E /* WKWebProcessPlugInPageGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB00AC4185F76460019142E /* WKWebProcessPlugInPageGroup.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		1FB00AC9185F76460019142E /* WKWebProcessPlugInPageGroupInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB00AC6185F76460019142E /* WKWebProcessPlugInPageGroupInternal.h */; };
 		263172CF18B469490065B9C3 /* NativeWebTouchEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 263172CE18B469490065B9C3 /* NativeWebTouchEvent.h */; };
 		2684054418B85A630022C38B /* VisibleContentRectUpdateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 2684054218B85A630022C38B /* VisibleContentRectUpdateInfo.h */; };
 		2684055218B86ED60022C38B /* ViewUpdateDispatcherMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2684055018B86ED60022C38B /* ViewUpdateDispatcherMessageReceiver.cpp */; };
@@ -2658,6 +2659,8 @@
 		1A334DEA16DE8B68006A8E38 /* StorageAreaMap.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = StorageAreaMap.messages.in; sourceTree = "<group>"; };
 		1A334DEB16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StorageAreaMapMessageReceiver.cpp; path = DerivedSources/WebKit2/StorageAreaMapMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
 		1A334DEC16DE8F88006A8E38 /* StorageAreaMapMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StorageAreaMapMessages.h; path = DerivedSources/WebKit2/StorageAreaMapMessages.h; sourceTree = BUILT_PRODUCTS_DIR; };
+		1A3A73CB1A48C6D4007231B3 /* APIPageGroupHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIPageGroupHandle.cpp; sourceTree = "<group>"; };
+		1A3A73CC1A48C6D4007231B3 /* APIPageGroupHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIPageGroupHandle.h; sourceTree = "<group>"; };
 		1A3C887F18A5ABAE00C4C962 /* WKPreferencesInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPreferencesInternal.h; sourceTree = "<group>"; };
 		1A3CC16418906ACF001E6ED8 /* WKWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebView.mm; sourceTree = "<group>"; };
 		1A3CC16518906ACF001E6ED8 /* WKWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebView.h; sourceTree = "<group>"; };
@@ -3112,6 +3115,7 @@
 		1F7D36C018DA513F00D9D659 /* APIDownloadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIDownloadClient.h; sourceTree = "<group>"; };
 		1FB00AC4185F76460019142E /* WKWebProcessPlugInPageGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebProcessPlugInPageGroup.h; sourceTree = "<group>"; };
 		1FB00AC5185F76460019142E /* WKWebProcessPlugInPageGroup.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebProcessPlugInPageGroup.mm; sourceTree = "<group>"; };
+		1FB00AC6185F76460019142E /* WKWebProcessPlugInPageGroupInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebProcessPlugInPageGroupInternal.h; sourceTree = "<group>"; };
 		263172CE18B469490065B9C3 /* NativeWebTouchEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebTouchEvent.h; sourceTree = "<group>"; };
 		26659AA0185FAAED004303DD /* Info-iOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = "<group>"; };
 		2684054218B85A630022C38B /* VisibleContentRectUpdateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisibleContentRectUpdateInfo.h; sourceTree = "<group>"; };
@@ -7229,6 +7233,7 @@
 				CEC8F9CA1FDF5870002635E7 /* WKWebProcessPlugInNodeHandlePrivate.h */,
 				1FB00AC4185F76460019142E /* WKWebProcessPlugInPageGroup.h */,
 				1FB00AC5185F76460019142E /* WKWebProcessPlugInPageGroup.mm */,
+				1FB00AC6185F76460019142E /* WKWebProcessPlugInPageGroupInternal.h */,
 				374942191DF1F9FF0033C19F /* WKWebProcessPlugInRangeHandle.h */,
 				374942181DF1F9FF0033C19F /* WKWebProcessPlugInRangeHandle.mm */,
 				3749421C1DF1FAB90033C19F /* WKWebProcessPlugInRangeHandleInternal.h */,
@@ -10879,6 +10884,8 @@
 				BC33DD671238464600360F3F /* APINumber.h */,
 				B63403F814910D57001070B5 /* APIObject.cpp */,
 				BCF04C8C11FF9B7D00F86A58 /* APIObject.h */,
+				1A3A73CB1A48C6D4007231B3 /* APIPageGroupHandle.cpp */,
+				1A3A73CC1A48C6D4007231B3 /* APIPageGroupHandle.h */,
 				1AC1336D18565D2B00F3EC05 /* APIPageHandle.cpp */,
 				1AC1336B18565C7A00F3EC05 /* APIPageHandle.h */,
 				F634445512A885C8000612D8 /* APISecurityOrigin.h */,
@@ -12979,6 +12986,7 @@
 				1F7506B61859165700EC0FF7 /* WKWebProcessPlugInNodeHandleInternal.h in Headers */,
 				CEC8F9CB1FDF5870002635E7 /* WKWebProcessPlugInNodeHandlePrivate.h in Headers */,
 				1FB00AC7185F76460019142E /* WKWebProcessPlugInPageGroup.h in Headers */,
+				1FB00AC9185F76460019142E /* WKWebProcessPlugInPageGroupInternal.h in Headers */,
 				BC04EFFC16E65AFB00E336F0 /* WKWebProcessPlugInPrivate.h in Headers */,
 				3749421B1DF1F9FF0033C19F /* WKWebProcessPlugInRangeHandle.h in Headers */,
 				3749421D1DF1FAB90033C19F /* WKWebProcessPlugInRangeHandleInternal.h in Headers */,

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h (277671 => 277672)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h	2021-05-18 20:26:15 UTC (rev 277672)
@@ -27,8 +27,9 @@
 
 #import <Foundation/Foundation.h>
 
-// FIXME: Remove this file once the staging code for rdar://77775952 is removed.
 WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKWebProcessPlugInBrowserContextController._groupIdentifier", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
 @interface WKWebProcessPlugInPageGroup : NSObject
 
+@property (readonly) NSString *identifier;
+
 @end

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm (277671 => 277672)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm	2021-05-18 20:26:15 UTC (rev 277672)
@@ -24,12 +24,38 @@
  */
 
 #import "config.h"
-#import "WKWebProcessPlugInPageGroup.h"
+#import "WKWebProcessPlugInPageGroupInternal.h"
 
-// FIXME: Remove this file once the staging code for rdar://77775952 is removed.
+#import "WKAPICast.h"
+#import "WKNSString.h"
+#import "WKRetainPtr.h"
+#import "WebPageGroupProxy.h"
+#import <WebCore/WebCoreObjCExtras.h>
 
 ALLOW_DEPRECATED_IMPLEMENTATIONS_BEGIN
-@implementation WKWebProcessPlugInPageGroup
+@implementation WKWebProcessPlugInPageGroup {
+    API::ObjectStorage<WebKit::WebPageGroupProxy> _bundlePageGroup;
+}
 ALLOW_DEPRECATED_IMPLEMENTATIONS_END
 
+- (NSString *)identifier
+{
+    return _bundlePageGroup->identifier();
+}
+
+- (void)dealloc
+{
+    if (WebCoreObjCScheduleDeallocateOnMainRunLoop(WKWebProcessPlugInPageGroup.class, self))
+        return;
+    _bundlePageGroup->~WebPageGroupProxy();
+    [super dealloc];
+}
+
+#pragma mark WKObject protocol implementation
+
+- (API::Object&)_apiObject
+{
+    return *_bundlePageGroup;
+}
+
 @end

Copied: trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroupInternal.h (from rev 277613, trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroupInternal.h) (0 => 277672)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroupInternal.h	                        (rev 0)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroupInternal.h	2021-05-18 20:26:15 UTC (rev 277672)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2013-2018 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.
+ */
+
+#import "WKWebProcessPlugInPageGroup.h"
+
+#import "WKBase.h"
+#import "WebPageGroupProxy.h"
+
+namespace WebKit {
+
+template<> struct WrapperTraits<WebPageGroupProxy> {
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+    using WrapperClass = WKWebProcessPlugInPageGroup;
+    ALLOW_DEPRECATED_DECLARATIONS_END
+};
+
+}
+
+@interface WKWebProcessPlugInPageGroup () <WKObject>
+@end

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h (277671 => 277672)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h	2021-05-18 20:26:15 UTC (rev 277672)
@@ -30,6 +30,7 @@
 @class WKDOMDocument;
 @class WKDOMRange;
 @class WKWebProcessPlugInFrame;
+@class WKWebProcessPlugInPageGroup;
 @protocol WKWebProcessPlugInLoadDelegate;
 
 WK_CLASS_AVAILABLE(macos(10.10), ios(8.0))
@@ -41,6 +42,8 @@
 
 @property (readonly) WKWebProcessPlugInFrame *mainFrame;
 
+@property (readonly) WKWebProcessPlugInPageGroup *pageGroup WK_API_DEPRECATED_WITH_REPLACEMENT("_groupIdentifier", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA));
+
 @property (weak) id <WKWebProcessPlugInLoadDelegate> loadDelegate;
 
 @end

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm (277671 => 277672)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm	2021-05-18 20:26:15 UTC (rev 277672)
@@ -48,10 +48,10 @@
 #import "WKWebProcessPlugInFormDelegatePrivate.h"
 #import "WKWebProcessPlugInLoadDelegate.h"
 #import "WKWebProcessPlugInNodeHandleInternal.h"
+#import "WKWebProcessPlugInPageGroupInternal.h"
 #import "WKWebProcessPlugInRangeHandleInternal.h"
 #import "WKWebProcessPlugInScriptWorldInternal.h"
 #import "WebPage.h"
-#import "WebPageGroupProxy.h"
 #import "WebProcess.h"
 #import "_WKRemoteObjectRegistryInternal.h"
 #import "_WKRenderingProgressEventsInternal.h"
@@ -404,6 +404,11 @@
     return wrapper(_page->mainWebFrame());
 }
 
+- (WKWebProcessPlugInPageGroup *)pageGroup
+{
+    return wrapper(*_page->pageGroup());
+}
+
 #pragma mark WKObject protocol implementation
 
 - (API::Object&)_apiObject

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPageGroupProxy.h (277671 => 277672)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPageGroupProxy.h	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPageGroupProxy.h	2021-05-18 20:26:15 UTC (rev 277672)
@@ -38,7 +38,7 @@
 
 class WebUserContentController;
 
-class WebPageGroupProxy : public RefCounted<WebPageGroupProxy> {
+class WebPageGroupProxy : public API::ObjectImpl<API::Object::Type::BundlePageGroup> {
 public:
     static Ref<WebPageGroupProxy> create(const WebPageGroupData&);
     virtual ~WebPageGroupProxy();

Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (277671 => 277672)


--- trunk/Source/WebKit/WebProcess/WebProcess.cpp	2021-05-18 19:56:03 UTC (rev 277671)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp	2021-05-18 20:26:15 UTC (rev 277672)
@@ -27,6 +27,7 @@
 #include "WebProcess.h"
 
 #include "APIFrameHandle.h"
+#include "APIPageGroupHandle.h"
 #include "APIPageHandle.h"
 #include "AuthenticationManager.h"
 #include "AuxiliaryProcessMessages.h"
@@ -1697,6 +1698,7 @@
             case API::Object::Type::PageHandle:
                 return static_cast<const API::PageHandle&>(object).isAutoconverting();
 
+            case API::Object::Type::PageGroupHandle:
 #if PLATFORM(COCOA)
             case API::Object::Type::ObjCObjectGraph:
 #endif
@@ -1713,6 +1715,9 @@
             case API::Object::Type::FrameHandle:
                 return m_webProcess.webFrame(static_cast<const API::FrameHandle&>(object).frameID());
 
+            case API::Object::Type::PageGroupHandle:
+                return m_webProcess.webPageGroup(static_cast<const API::PageGroupHandle&>(object).webPageGroupData());
+
             case API::Object::Type::PageHandle:
                 return m_webProcess.webPage(static_cast<const API::PageHandle&>(object).webPageID());
 
@@ -1739,6 +1744,7 @@
             switch (object.type()) {
             case API::Object::Type::BundleFrame:
             case API::Object::Type::BundlePage:
+            case API::Object::Type::BundlePageGroup:
 #if PLATFORM(COCOA)
             case API::Object::Type::ObjCObjectGraph:
 #endif
@@ -1758,6 +1764,13 @@
             case API::Object::Type::BundlePage:
                 return API::PageHandle::createAutoconverting(static_cast<const WebPage&>(object).webPageProxyIdentifier(), static_cast<const WebPage&>(object).identifier());
 
+            case API::Object::Type::BundlePageGroup: {
+                WebPageGroupData pageGroupData;
+                pageGroupData.pageGroupID = static_cast<const WebPageGroupProxy&>(object).pageGroupID();
+
+                return API::PageGroupHandle::create(WTFMove(pageGroupData));
+            }
+
 #if PLATFORM(COCOA)
             case API::Object::Type::ObjCObjectGraph:
                 return transformObjectsToHandles(static_cast<ObjCObjectGraph&>(object));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to