[iOS 13] Safari crashes when closing a tab with a focused element if the unified...
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Jul 2019 14:41:16 +0000 (14:41 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Jul 2019 14:41:16 +0000 (14:41 +0000)
commit566b299bff762f0c87a678b6670c12824409ce49
treeba11f82873a0a269a95330d621243af6c2a597c0
parentf1b82b79c90e8624c932fbfea01f5fc9faf8c5cc
[iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus
https://bugs.webkit.org/show_bug.cgi?id=200291
<rdar://problem/53717946>

Reviewed by Megan Gardner.

Source/WebKit:

Makes -requestAutocorrectionContextWithCompletionHandler: robust in the case where the web page has been closed,
and there is no Connection object to use when waiting for a sync IPC response.

Test: AutocorrectionTests.RequestAutocorrectionContextAfterClosingPage

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):

Tools:

Add an API test to exercise the scenario of synchronously requesting the autocorrection context immediately
after closing the web view, while the web view's content view isn't the first responder.

* TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm:
* TestWebKitAPI/ios/UIKitSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm
Tools/TestWebKitAPI/ios/UIKitSPI.h