Deprecate _WKUserContentWorld replaced by WKContentWorld
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Feb 2020 23:08:15 +0000 (23:08 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Feb 2020 23:08:15 +0000 (23:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=207514

Reviewed by Brady Eidson.

_WKUserContentWorld.contentWorld is not needed,
but WKContentWorld._userContentWorld needs to return an autoreleased object.

* UIProcess/API/APIContentWorld.cpp:
(API::ContentWorld::fromUserContentWorld): Deleted.
* UIProcess/API/APIContentWorld.h:
* UIProcess/API/Cocoa/WKContentWorld.mm:
(-[WKContentWorld _userContentWorld]):
* UIProcess/API/Cocoa/_WKUserContentWorld.h:
* UIProcess/API/Cocoa/_WKUserContentWorld.mm:
(-[_WKUserContentWorld contentWorld]): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256561 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/APIContentWorld.cpp
Source/WebKit/UIProcess/API/APIContentWorld.h
Source/WebKit/UIProcess/API/Cocoa/WKContentWorld.mm
Source/WebKit/UIProcess/API/Cocoa/_WKUserContentWorld.h
Source/WebKit/UIProcess/API/Cocoa/_WKUserContentWorld.mm

index d0014b6..9afb74a 100644 (file)
@@ -1,3 +1,22 @@
+2020-02-13  Alex Christensen  <achristensen@webkit.org>
+
+        Deprecate _WKUserContentWorld replaced by WKContentWorld
+        https://bugs.webkit.org/show_bug.cgi?id=207514
+
+        Reviewed by Brady Eidson.
+
+        _WKUserContentWorld.contentWorld is not needed,
+        but WKContentWorld._userContentWorld needs to return an autoreleased object.
+
+        * UIProcess/API/APIContentWorld.cpp:
+        (API::ContentWorld::fromUserContentWorld): Deleted.
+        * UIProcess/API/APIContentWorld.h:
+        * UIProcess/API/Cocoa/WKContentWorld.mm:
+        (-[WKContentWorld _userContentWorld]):
+        * UIProcess/API/Cocoa/_WKUserContentWorld.h:
+        * UIProcess/API/Cocoa/_WKUserContentWorld.mm:
+        (-[_WKUserContentWorld contentWorld]): Deleted.
+
 2020-02-13  Per Arne Vollan  <pvollan@apple.com>
 
         [iOS] Check if PIP is supported in the UI process
index c724261..8f5fe56 100644 (file)
@@ -76,11 +76,6 @@ ContentWorld& ContentWorld::defaultClientWorld()
     return *world.get();
 }
 
-Ref<ContentWorld> ContentWorld::fromUserContentWorld(const UserContentWorld& userContentWorld)
-{
-    return adoptRef(*new ContentWorld(userContentWorld));
-}
-
 ContentWorld::ContentWorld(const WTF::String& name)
     : ContentWorldBase(name)
 {
index 4a4733d..81052d4 100644 (file)
@@ -61,7 +61,6 @@ public:
     static Ref<ContentWorld> sharedWorldWithName(const WTF::String&);
     static ContentWorld& pageContentWorld();
     static ContentWorld& defaultClientWorld();
-    static Ref<ContentWorld> fromUserContentWorld(const UserContentWorld&);
 
     virtual ~ContentWorld();
 
index 42ab646..b20f9a2 100644 (file)
@@ -74,7 +74,7 @@
 ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 - (_WKUserContentWorld *)_userContentWorld
 {
-    return wrapper(API::UserContentWorld::fromContentWorld(*_contentWorld));
+    return [[wrapper(API::UserContentWorld::fromContentWorld(*_contentWorld)) retain] autorelease];
 }
 ALLOW_DEPRECATED_DECLARATIONS_END
 
index d18b0f1..103589d 100644 (file)
@@ -25,8 +25,6 @@
 
 #import <WebKit/WKFoundation.h>
 
-@class WKContentWorld;
-
 NS_ASSUME_NONNULL_BEGIN
 
 WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKContentWorld", macos(10.12, WK_MAC_TBA), ios(10.0, WK_IOS_TBA))
@@ -37,8 +35,6 @@ WK_CLASS_DEPRECATED_WITH_REPLACEMENT("WKContentWorld", macos(10.12, WK_MAC_TBA),
 
 @property (nullable, nonatomic, readonly, copy) NSString *name;
 
-@property (nonatomic, copy, readonly) WKContentWorld *contentWorld WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
-
 @end
 
 NS_ASSUME_NONNULL_END
index 9758131..e50d90e 100644 (file)
@@ -26,8 +26,6 @@
 #import "config.h"
 #import "_WKUserContentWorldInternal.h"
 
-#import "WKContentWorldInternal.h"
-
 ALLOW_DEPRECATED_IMPLEMENTATIONS_BEGIN
 @implementation _WKUserContentWorld
 
@@ -55,11 +53,6 @@ ALLOW_DEPRECATED_IMPLEMENTATIONS_BEGIN
     return _userContentWorld->name();
 }
 
-- (WKContentWorld *)contentWorld
-{
-    return wrapper(API::ContentWorld::fromUserContentWorld(*_userContentWorld));
-}
-
 #pragma mark WKObject protocol implementation
 
 - (API::Object&)_apiObject