-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UIAsyncTextInput] fast/events/ios/contenteditable-autocapitalize.htm…
…l 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
- Loading branch information
Showing
7 changed files
with
97 additions
and
74 deletions.
There are no files selected for viewing
12 changes: 9 additions & 3 deletions
12
LayoutTests/fast/events/ios/contenteditable-autocapitalize-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
To manually test, type 't' into the contenteditable. The 't' should not be autocapitalized. | ||
|
||
With autocapitalize: none, the output is: "to" | ||
With autocapitalize: sentences, the output is: "To" | ||
With autocapitalize: characters, the output is: "TO" | ||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS With autocapitalize: none, the output is: "to" | ||
PASS With autocapitalize: sentences, the output is: "To" | ||
PASS With autocapitalize: characters, the output is: "TO" | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters