Title: [261096] trunk/Source
Revision
261096
Author
[email protected]
Date
2020-05-04 11:52:27 -0700 (Mon, 04 May 2020)

Log Message

Remove now-unneeded HAVE(UI_REMOTE_VIEW)
https://bugs.webkit.org/show_bug.cgi?id=211382

Reviewed by Alex Christensen.

Source/WebKit:

* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::createRemoteView): Deleted.
(WebKit::RemoteLayerTreeHost::makeNode): After researching to be sure the method
is present in the relevant versions of iOS 13, changed this code to use the
initWithFrame:pid:contextID: method without doing a selector check, and also
without a HAVE(UI_REMOTE_VIEW) conditional.

* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: Removed the
HAVE(UI_REMOTE_VIEW) conditional.

Source/WTF:

* wtf/PlatformHave.h: Remove code to define HAVE_UI_REMOTE_VIEW.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (261095 => 261096)


--- trunk/Source/WTF/ChangeLog	2020-05-04 18:47:34 UTC (rev 261095)
+++ trunk/Source/WTF/ChangeLog	2020-05-04 18:52:27 UTC (rev 261096)
@@ -1,5 +1,14 @@
 2020-05-04  Darin Adler  <[email protected]>
 
+        Remove now-unneeded HAVE(UI_REMOTE_VIEW)
+        https://bugs.webkit.org/show_bug.cgi?id=211382
+
+        Reviewed by Alex Christensen.
+
+        * wtf/PlatformHave.h: Remove code to define HAVE_UI_REMOTE_VIEW.
+
+2020-05-04  Darin Adler  <[email protected]>
+
         Remove now-unneeded HAVE(MENU_CONTROLLER_SHOW_HIDE_API)
         https://bugs.webkit.org/show_bug.cgi?id=211381
 

Modified: trunk/Source/WTF/wtf/PlatformHave.h (261095 => 261096)


--- trunk/Source/WTF/wtf/PlatformHave.h	2020-05-04 18:47:34 UTC (rev 261095)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2020-05-04 18:52:27 UTC (rev 261096)
@@ -635,10 +635,6 @@
 #endif
 
 #if PLATFORM(IOS_FAMILY)
-#define HAVE_UI_REMOTE_VIEW 1
-#endif
-
-#if PLATFORM(IOS_FAMILY)
 #define HAVE_PDF_HOST_VIEW_CONTROLLER_WITH_BACKGROUND_COLOR 1
 #endif
 

Modified: trunk/Source/WebKit/ChangeLog (261095 => 261096)


--- trunk/Source/WebKit/ChangeLog	2020-05-04 18:47:34 UTC (rev 261095)
+++ trunk/Source/WebKit/ChangeLog	2020-05-04 18:52:27 UTC (rev 261096)
@@ -1,5 +1,22 @@
 2020-05-04  Darin Adler  <[email protected]>
 
+        Remove now-unneeded HAVE(UI_REMOTE_VIEW)
+        https://bugs.webkit.org/show_bug.cgi?id=211382
+
+        Reviewed by Alex Christensen.
+
+        * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
+        (WebKit::createRemoteView): Deleted.
+        (WebKit::RemoteLayerTreeHost::makeNode): After researching to be sure the method
+        is present in the relevant versions of iOS 13, changed this code to use the
+        initWithFrame:pid:contextID: method without doing a selector check, and also
+        without a HAVE(UI_REMOTE_VIEW) conditional.
+
+        * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: Removed the
+        HAVE(UI_REMOTE_VIEW) conditional.
+
+2020-05-04  Darin Adler  <[email protected]>
+
         Remove now-unneeded HAVE(MENU_CONTROLLER_SHOW_HIDE_API)
         https://bugs.webkit.org/show_bug.cgi?id=211381
 

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm (261095 => 261096)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm	2020-05-04 18:47:34 UTC (rev 261095)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm	2020-05-04 18:52:27 UTC (rev 261096)
@@ -36,28 +36,10 @@
 #import "WebPageProxy.h"
 #import <UIKit/UIScrollView.h>
 #import <pal/spi/cocoa/QuartzCoreSPI.h>
-#import <wtf/SoftLinking.h>
 
 namespace WebKit {
 using namespace WebCore;
 
-static RetainPtr<UIView> createRemoteView(pid_t pid, uint32_t contextID)
-{
-#if HAVE(UI_REMOTE_VIEW)
-    // FIXME: Remove this respondsToSelector check when possible.
-    static BOOL canUseUIRemoteView;
-    static std::once_flag initializeCanUseUIRemoteView;
-    std::call_once(initializeCanUseUIRemoteView, [] {
-        canUseUIRemoteView = [_UIRemoteView instancesRespondToSelector:@selector(initWithFrame:pid:contextID:)];
-    });
-    if (canUseUIRemoteView)
-        return adoptNS([[WKUIRemoteView alloc] initWithFrame:CGRectZero pid:pid contextID:contextID]);
-#else
-    UNUSED_PARAM(pid);
-#endif
-    return adoptNS([[WKRemoteView alloc] initWithFrame:CGRectZero contextID:contextID]);
-}
-
 std::unique_ptr<RemoteLayerTreeNode> RemoteLayerTreeHost::makeNode(const RemoteLayerTreeTransaction::LayerCreationProperties& properties)
 {
     auto makeWithView = [&] (RetainPtr<UIView> view) {
@@ -95,7 +77,8 @@
     case PlatformCALayer::LayerTypeAVPlayerLayer:
     case PlatformCALayer::LayerTypeContentsProvidedLayer:
         if (!m_isDebugLayerTreeHost) {
-            auto view = createRemoteView(m_drawingArea->page().processIdentifier(), properties.hostingContextID);
+            auto view = adoptNS([[WKUIRemoteView alloc] initWithFrame:CGRectZero
+                pid:m_drawingArea->page().processIdentifier() contextID:properties.hostingContextID]);
             if (properties.type == PlatformCALayer::LayerTypeAVPlayerLayer) {
                 // Invert the scale transform added in the WebProcess to fix <rdar://problem/18316542>.
                 float inverseScale = 1 / properties.hostingDeviceScaleFactor;

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm (261095 => 261096)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2020-05-04 18:47:34 UTC (rev 261095)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2020-05-04 18:52:27 UTC (rev 261096)
@@ -332,7 +332,6 @@
 
 @end
 
-#if HAVE(UI_REMOTE_VIEW)
 @implementation WKUIRemoteView
 
 - (instancetype)initWithFrame:(CGRect)frame pid:(pid_t)pid contextID:(uint32_t)contextID
@@ -362,7 +361,6 @@
 }
 
 @end
-#endif
 
 @implementation WKBackdropView
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to