Title: [262917] trunk/Source/WebKit
Revision
262917
Author
[email protected]
Date
2020-06-11 12:41:59 -0700 (Thu, 11 Jun 2020)

Log Message

WebKit: Guard requestDocumentContext with HAVE(UI_WK_DOCUMENT_CONTEXT)
https://bugs.webkit.org/show_bug.cgi?id=213076
<rdar://problem/64254698>

Reviewed by Tim Horton.

No new tests, behavior unchanged.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/ios/WKWebViewTestingIOS.mm:
(-[WKWebView _requestDocumentContext:completionHandler:]): Guard requestDocumentContext with HAVE(UI_WK_DOCUMENT_CONTEXT).
(-[WKWebView _adjustSelectionWithDelta:completionHandler:]): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (262916 => 262917)


--- trunk/Source/WebKit/ChangeLog	2020-06-11 19:23:01 UTC (rev 262916)
+++ trunk/Source/WebKit/ChangeLog	2020-06-11 19:41:59 UTC (rev 262917)
@@ -1,5 +1,20 @@
 2020-06-11  Jonathan Bedard  <[email protected]>
 
+        WebKit: Guard requestDocumentContext with HAVE(UI_WK_DOCUMENT_CONTEXT)
+        https://bugs.webkit.org/show_bug.cgi?id=213076
+        <rdar://problem/64254698>
+
+        Reviewed by Tim Horton.
+
+        No new tests, behavior unchanged.
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * UIProcess/API/ios/WKWebViewTestingIOS.mm:
+        (-[WKWebView _requestDocumentContext:completionHandler:]): Guard requestDocumentContext with HAVE(UI_WK_DOCUMENT_CONTEXT).
+        (-[WKWebView _adjustSelectionWithDelta:completionHandler:]): Ditto.
+
+2020-06-11  Jonathan Bedard  <[email protected]>
+
         WebKit: Add UIKit SPI for watchOS and tvOS
         https://bugs.webkit.org/show_bug.cgi?id=213077
         <rdar://problem/64255131>

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


--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2020-06-11 19:23:01 UTC (rev 262916)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2020-06-11 19:41:59 UTC (rev 262917)
@@ -697,9 +697,12 @@
 @class UIWKDocumentContext;
 
 @protocol UIWKInteractionViewProtocol
+#if HAVE(UI_WK_DOCUMENT_CONTEXT)
 - (void)adjustSelectionWithDelta:(NSRange)deltaRange completionHandler:(void (^)(void))completionHandler;
 - (void)requestDocumentContext:(UIWKDocumentRequest *)request completionHandler:(void (^)(UIWKDocumentContext *))completionHandler;
 - (void)selectPositionAtPoint:(CGPoint)point withContextRequest:(UIWKDocumentRequest *)request completionHandler:(void (^)(UIWKDocumentContext *))completionHandler;
+#endif
+
 - (void)changeSelectionWithGestureAt:(CGPoint)point withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)state;
 - (void)changeSelectionWithTouchAt:(CGPoint)point withSelectionTouch:(UIWKSelectionTouch)touch baseIsStart:(BOOL)baseIsStart withFlags:(UIWKSelectionFlags)flags;
 - (void)changeSelectionWithTouchesFrom:(CGPoint)from to:(CGPoint)to withGesture:(UIWKGestureType)gestureType withState:(UIGestureRecognizerState)gestureState;

Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm (262916 => 262917)


--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm	2020-06-11 19:23:01 UTC (rev 262916)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm	2020-06-11 19:41:59 UTC (rev 262917)
@@ -80,12 +80,20 @@
 
 - (void)_requestDocumentContext:(UIWKDocumentRequest *)request completionHandler:(void (^)(UIWKDocumentContext *))completionHandler
 {
+#if HAVE(UI_WK_DOCUMENT_CONTEXT)
     [_contentView requestDocumentContext:request completionHandler:completionHandler];
+#else
+    completionHandler(nil);
+#endif
 }
 
 - (void)_adjustSelectionWithDelta:(NSRange)deltaRange completionHandler:(void (^)(void))completionHandler
 {
+#if HAVE(UI_WK_DOCUMENT_CONTEXT)
     [_contentView adjustSelectionWithDelta:deltaRange completionHandler:completionHandler];
+#else
+    completionHandler();
+#endif
 }
 
 - (BOOL)_mayContainEditableElementsInRect:(CGRect)rect
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to