[webkit-changes] [WebKit/WebKit] a40641: Prepare WebKit for several new UIKit SPI class and...

Wenson Hsieh noreply at github.com
Tue Dec 5 15:50:45 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a4064186be517400dc0829c712c87242e2f15c52
      https://github.com/WebKit/WebKit/commit/a4064186be517400dc0829c712c87242e2f15c52
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-12-05 (Tue, 05 Dec 2023)

  Changed paths:
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebKit/Platform/spi/ios/UIKitSPI.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Tools/TestRunnerShared/spi/UIKitSPIForTesting.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm

  Log Message:
  -----------
  Prepare WebKit for several new UIKit SPI class and symbol names
https://bugs.webkit.org/show_bug.cgi?id=265893
rdar://119206020

Reviewed by Aditya Keerthi, Tim Horton and Megan Gardner.

In the continued effort to clean up the SPI boundaries between WebKit and UIKit, several classes
are being renamed:

```
UIWKDocumentRequest         UITextDocumentRequest
UIWKDocumentContext         UITextDocumentContext
UIWKSelectionFlags          UITextSelectionFlags
UIWKSelectionTouch          UITextSelectionTouch
UIWKGestureType             UITextGestureType
_UITextCursorDragAnimator   UITextCursorDropPositionAnimator
```

This patch prepares the WebKit stack for these changes in UIKit, by:

1.  Moving off the soon-to-be-deprecated `_UITextCursorDragAnimator`, in favor of
    `UITextCursorDropPositionAnimator`.

2.  Making our API tests compatible with the new `UITextDocument*` names, in place of
    `UIWKDocument*`.

3.  Maintaining source and binary compatibility with both the iOS 17 SDK, as well as older versions
    of the newer SDK, which don't contain these `UITextDocument*` names yet.

* Source/WTF/wtf/PlatformHave.h:
* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _shouldUseTextCursorDragAnimator]):
(-[WKContentView _insertDropCaret:]):
(-[WKContentView _removeDropCaret]):
(-[WKContentView _didChangeDragCaretRect:currentRect:]):
* Tools/TestRunnerShared/spi/UIKitSPIForTesting.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
(makeRequest):
(-[TestWKWebView synchronouslyRequestDocumentContext:]):
(TEST):
(-[UIWKDocumentContext markedTextRects]): Deleted.
(-[UIWKDocumentContext contextBeforeLength]): Deleted.
(-[UIWKDocumentContext markedTextLength]): Deleted.
(-[UIWKDocumentContext markedTextRange]): Deleted.
(-[UIWKDocumentContext textRects]): Deleted.
(-[UIWKDocumentContext boundingRectForCharacterRange:]): Deleted.

Canonical link: https://commits.webkit.org/271578@main




More information about the webkit-changes mailing list