-
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.
[iOS] [Safari] Contact AutoFill fails to insert text after adopting B…
…ETextInput/BETextSuggestion https://bugs.webkit.org/show_bug.cgi?id=268099 rdar://121604196 Reviewed by Tim Horton. When receiving a `BETextSuggestion` in `-insertTextSuggestion:`, we currently integrate with our SPI clients by asking for the `-inputText`, creating a `UITextSuggestion` from this text, and passing it back to the client in `-_webView:insertTextSuggestion:inInputSession:`. However, this discards any custom classes provided by the SPI client (in this case, Safari's `SFTextSuggestion`). Safari's logic performs a class check on the text suggestion handed back to them in the input delegate SPI, and drops the text suggestion on the floor in the case where the suggestion isn't a subclass of `SFTextSuggestion`. Simply fix this by unwrapping the `BETextSuggestion` to get the backing `UITextSuggestion` to preserve bincompat with SPI clients. Test: WKWebViewAutoFillTests.AutoFillPreservesTextSuggestion * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView insertTextSuggestion:]): * Tools/TestWebKitAPI/Tests/ios/TestInputDelegate.mm: (-[TestInputDelegate _webView:insertTextSuggestion:inInputSession:]): Add an API test and test infrastructure to exercise this fix. * Tools/TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm: Canonical link: https://commits.webkit.org/273535@main
- Loading branch information
Showing
4 changed files
with
63 additions
and
5 deletions.
There are no files selected for viewing
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