Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 8a1e52b41985bc3ea4e492dab50ec6c544243ca2 https://github.com/WebKit/WebKit/commit/8a1e52b41985bc3ea4e492dab50ec6c544243ca2 Author: Aditya Keerthi <akeer...@apple.com> Date: 2024-04-26 (Fri, 26 Apr 2024)
Changed paths: M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj A Tools/TestWebKitAPI/Tests/ios/DataListTextSuggestionTests.mm M Tools/TestWebKitAPI/cocoa/TestWKWebView.h M Tools/TestWebKitAPI/cocoa/TestWKWebView.mm Log Message: ----------- REGRESSION (iOS 17.4): Tapping on a `<datalist>` suggestion in the keyboard does not update the input's value https://bugs.webkit.org/show_bug.cgi?id=273327 rdar://124784204 Reviewed by Abrar Rahman Protyasha and Wenson Hsieh. Following BrowserEngineKit adoption in WebKit, `<datalist>` suggestions are now sent to UIKit as `BETextSuggestion`s rather than `UITextSuggestion`s. However, underlying infrastructure in UIKit only deals with `UITextSuggestion`s. As a result, UIKit unwraps the `BETextSuggestion` into a `UITextSuggestion` upon reception, and then converts back to a `BETextSuggestion` at insertion time. The conversion between `BETextSuggestion` and `UITextSuggestion` breaks the existing insertion logic, which performs a class check for `WKDataListTextSuggestion` (a `BETextSuggestion` subclass) prior to performing insertion. Since a class check can no longer be relied upon, insertion is now gated upon whether the content view is aware of any active `<datalist>` suggestions and whether the text of selected suggestion matches the text of a known `<datalist>` suggestion. * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView insertTextSuggestion:]): * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/ios/DataListTextSuggestionTests.mm: Added. (-[DataListTextSuggestionInputDelegate suggestions]): (-[DataListTextSuggestionInputDelegate setSuggestions:]): (-[DataListTextSuggestionInputDelegate selectionDidChange:]): (-[DataListTextSuggestionInputDelegate selectionWillChange:]): (-[DataListTextSuggestionInputDelegate textDidChange:]): (-[DataListTextSuggestionInputDelegate textWillChange:]): (-[DataListTextSuggestionInputDelegate handleWebViewCredentialsSaveForWebsiteURL:user:password:passwordIsAutoGenerated:]): (-[DataListTextSuggestionInputDelegate invalidateTextEntryContextForTextInput:]): (-[DataListTextSuggestionInputDelegate selectionDidChangeForTextInput:]): (-[DataListTextSuggestionInputDelegate selectionWillChangeForTextInput:]): (-[DataListTextSuggestionInputDelegate shouldDeferEventHandlingToSystemForTextInput:context:]): (-[DataListTextSuggestionInputDelegate textInput:deferReplaceTextActionToSystem:]): (-[DataListTextSuggestionInputDelegate textInput:setCandidateSuggestions:]): (-[DataListTextSuggestionTestView initWithFrame:]): (TestWebKitAPI::TEST(DataListTextSuggestionTestView, InsertSuggestion)): * Tools/TestWebKitAPI/cocoa/TestWKWebView.h: * Tools/TestWebKitAPI/cocoa/TestWKWebView.mm: (-[WKWebView insertTextSuggestion:]): Canonical link: https://commits.webkit.org/278062@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes