Title: [266090] trunk
Revision
266090
Author
wenson_hs...@apple.com
Date
2020-08-24 15:48:19 -0700 (Mon, 24 Aug 2020)

Log Message

Unreviewed, fix the internal iOS 13.4 build

Source/WebKit:

The -_selectionClipRect SPI method isn't declared in any private headers on iOS 13.4 and prior. This isn't a
problem when building with a non-internal SDK since the SPI is declared in the `!USE(APPLE_INTERNAL_SDK)`
section in `UIKitSPI.h`, but on internal builds of iOS 13.4, this declaration is absent from both the internal
SDK and `UIKitSPI.h`.

To fix the build, simply declare it in the IPI section — once we stop supporting iOS 13.4 as a build target,
this can be moved back into the non-internal section only.

* Platform/spi/ios/UIKitSPI.h:

Tools:

See Source/WebKit/ChangeLog.

* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::clipSelectionViewRectToContentView):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (266089 => 266090)


--- trunk/Source/WebKit/ChangeLog	2020-08-24 22:46:50 UTC (rev 266089)
+++ trunk/Source/WebKit/ChangeLog	2020-08-24 22:48:19 UTC (rev 266090)
@@ -1,3 +1,17 @@
+2020-08-24  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Unreviewed, fix the internal iOS 13.4 build
+
+        The -_selectionClipRect SPI method isn't declared in any private headers on iOS 13.4 and prior. This isn't a
+        problem when building with a non-internal SDK since the SPI is declared in the `!USE(APPLE_INTERNAL_SDK)`
+        section in `UIKitSPI.h`, but on internal builds of iOS 13.4, this declaration is absent from both the internal
+        SDK and `UIKitSPI.h`.
+
+        To fix the build, simply declare it in the IPI section — once we stop supporting iOS 13.4 as a build target,
+        this can be moved back into the non-internal section only.
+
+        * Platform/spi/ios/UIKitSPI.h:
+
 2020-08-24  Alex Christensen  <achristen...@webkit.org>
 
         Implement Request/Response consuming as FormData

Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (266089 => 266090)


--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2020-08-24 22:46:50 UTC (rev 266089)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2020-08-24 22:48:19 UTC (rev 266090)
@@ -487,7 +487,6 @@
 - (void)modifierFlagsDidChangeFrom:(UIKeyModifierFlags)oldFlags to:(UIKeyModifierFlags)newFlags;
 #endif
 @property (nonatomic) UITextGranularity selectionGranularity;
-@property (nonatomic, readonly) CGRect _selectionClipRect;
 @required
 - (BOOL)hasContent;
 - (BOOL)hasSelection;
@@ -1374,6 +1373,11 @@
 @end
 #endif
 
+@protocol UITextInputInternal <UITextInputPrivate>
+@optional
+@property (nonatomic, readonly) CGRect _selectionClipRect;
+@end
+
 @interface UIDevice ()
 @property (nonatomic, setter=_setBacklightLevel:) float _backlightLevel;
 @end

Modified: trunk/Tools/ChangeLog (266089 => 266090)


--- trunk/Tools/ChangeLog	2020-08-24 22:46:50 UTC (rev 266089)
+++ trunk/Tools/ChangeLog	2020-08-24 22:48:19 UTC (rev 266090)
@@ -1,3 +1,12 @@
+2020-08-24  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Unreviewed, fix the internal iOS 13.4 build
+
+        See Source/WebKit/ChangeLog.
+
+        * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
+        (WTR::clipSelectionViewRectToContentView):
+
 2020-08-24  Aakash Jain  <aakash_j...@apple.com>
 
         [ews] enable email notifications to patch authors for build or layout test failures on their patch

Modified: trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm (266089 => 266090)


--- trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm	2020-08-24 22:46:50 UTC (rev 266089)
+++ trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm	2020-08-24 22:48:19 UTC (rev 266090)
@@ -793,9 +793,9 @@
 static void clipSelectionViewRectToContentView(CGRect& rect, UIView *contentView)
 {
     rect = CGRectIntersection(contentView.bounds, rect);
-    // The content view (a WKContentView in WebKit) is expected to implement the optional UITextInputPrivate method -_selectionClipRect.
+    // The content view (a WKContentView in WebKit) is expected to implement the optional text input method -_selectionClipRect.
     ASSERT([contentView respondsToSelector:@selector(_selectionClipRect)]);
-    auto selectionClipRect = [(UIView <UITextInputPrivate> *)contentView _selectionClipRect];
+    auto selectionClipRect = [(UIView <UITextInputInternal> *)contentView _selectionClipRect];
     if (!CGRectIsNull(selectionClipRect))
         rect = CGRectIntersection(selectionClipRect, rect);
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to