Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 1f6aecd. rdar://120666173
[UIAsyncTextInput] Fix several failing iOS API tests when async text input is enabled https://bugs.webkit.org/show_bug.cgi?id=267064 rdar://120438466 Reviewed by Megan Gardner. Fix 4 failing API tests, when async text input is enabled: • DragAndDropTests.ContentEditableToContentEditable • DragAndDropTests.ContentEditableToTextarea These two tests are failing because they expect WebKit to write RTF and/or FlatRTFD upon starting a drag. This is no longer the case when this feature is enabled, since the system now takes care of lazily coercing web archive and HTML data to RTF/FlatRTFD/`NSAttributedString` as needed. As such, we simply adjust this test to pass as long as HTML data is placed at a higher type fidelity than plain text. • KeyboardInputTests.IsSingleLineDocument This actually caught a real bug, where we're failing to actually set the `singleLineDocument` property on the extended traits delegate (`WKSEExtendedTextInputTraits`), since the call site is guarded by a `-respondsToSelector:` check for `-setIsSingleLineDocument:` (the legacy name on private text input traits) instead of `-setSingleLineDocument:` (the new property name on the extended traits). Fix the test by fixing `-_updateTextInputTraits:`. • KeyboardInputTests.EditableWebViewRequiresKeyboardWhenFirstResponder This test failure is due to the fact that, for a fully-editable web view (i.e. if the embedder sets `-[WKWebView _editable]` to `YES`), `-_requiresKeyboardWhenFirstResponder` now returns `YES` instead of `NO` when focusing a `readonly` text field. Address this and restore shipping behavior by only reverting to the superclass implementation in the case where the web view is not fully editable. * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _requiresKeyboardWhenFirstResponder]): (-[WKContentView _updateTextInputTraits:]): * Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: (checkRichTextTypePrecedesPlainTextType): Canonical link: https://commits.webkit.org/272638@main Canonical link: https://commits.webkit.org/271831.81@safari-7619.0.1-branch
- Loading branch information