[webkit-changes] [WebKit/WebKit] 76b879: [UIAsyncTextInput] fast/events/ios/contenteditable...

Wenson Hsieh noreply at github.com
Mon Nov 27 12:51:00 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 76b8798632ec1c107571bdf2c46d140de68e215a
      https://github.com/WebKit/WebKit/commit/76b8798632ec1c107571bdf2c46d140de68e215a
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-11-27 (Mon, 27 Nov 2023)

  Changed paths:
    M LayoutTests/fast/events/ios/contenteditable-autocapitalize-expected.txt
    M LayoutTests/fast/events/ios/contenteditable-autocapitalize.html
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Tools/TestRunnerShared/spi/UIKitSPIForTesting.h
    M Tools/TestWebKitAPI/cocoa/TestWKWebView.mm
    M Tools/WebKitTestRunner/ios/UIScriptControllerIOS.h
    M Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm

  Log Message:
  -----------
  [UIAsyncTextInput] fast/events/ios/contenteditable-autocapitalize.html fails when using async text input
https://bugs.webkit.org/show_bug.cgi?id=265385
rdar://118835028

Reviewed by Megan Gardner.

Address this test failure (as well as some adjacent issues and cleanup). See below for more details.

* LayoutTests/fast/events/ios/contenteditable-autocapitalize-expected.txt:
* LayoutTests/fast/events/ios/contenteditable-autocapitalize.html:

Rewrite this layout test to be easier to follow by using existing `UIHelper` functions to wait for
the keyboard to show and dismiss, and `js-test.js` helper functions.

* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView requestPreferredArrowDirectionForEditMenuWithCompletionHandler:]):

Prevent a self-induced release assertion by replacing an internal call to the legacy
`-_shouldSuppressSelectionCommands` function with the replacment, `-shouldSuppressEditMenu`.

(-[WKContentView _internalSelectTextForContextMenuWithLocationInView:completionHandler:]):
* Tools/TestRunnerShared/spi/UIKitSPIForTesting.h:

Include all of the `UIAsyncTextInput` and related headers, in this test-runner-only SPI header.

* Tools/TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView caretViewRectInContentCoordinates]):
(-[TestWKWebView selectionViewRectsInContentCoordinates]):

Take the opportunity to remove some old codepaths for grabbing selection/caret views that are no
longer relevant to the new selection display interaction codepaths in iOS 17+.

* Tools/WebKitTestRunner/ios/UIScriptControllerIOS.h:
* Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::applyAutocorrection):

Prevent another release assertion here by adopting the async text input version,
`-replaceText:withText:options:withCompletionHandler:`.

(WTR::UIScriptControllerIOS::clipSelectionViewRectToContentView const):
(WTR::UIScriptControllerIOS::selectionStartGrabberViewRect const):
(WTR::UIScriptControllerIOS::selectionEndGrabberViewRect const):
(WTR::UIScriptControllerIOS::selectionEndGrabberViewShapePathDescription const):
(WTR::UIScriptControllerIOS::selectionCaretViewRect const):
(WTR::UIScriptControllerIOS::selectionRangeViewRects const):

Prevent a release assertion by calling `-selectionClipRect` instead of `-_selectionClipRect` when
grabbing the caret or selection view rects for testing.

(WTR::UIScriptControllerIOS::selectionCaretBackgroundColor const):
(WTR::UIScriptControllerIOS::asyncTextInput const):

Add a helper method to return the `WKContentView`, as a `UIAsyncTextInput`.

(WTR::clipSelectionViewRectToContentView): Deleted.

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




More information about the webkit-changes mailing list