Changeset 248461 in webkit
- Timestamp:
- Aug 8, 2019, 10:01:29 PM (7 years ago)
- Location:
- branches/safari-608.1-branch
- Files:
-
- 5 edited
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (modified) (2 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm (modified) (1 diff)
-
Tools/TestWebKitAPI/ios/UIKitSPI.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608.1-branch/Source/WebKit/ChangeLog
r248460 r248461 1 2019-08-08 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r248039. rdar://problem/54087592 4 5 [iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus 6 https://bugs.webkit.org/show_bug.cgi?id=200291 7 <rdar://problem/53717946> 8 9 Reviewed by Megan Gardner. 10 11 Source/WebKit: 12 13 Makes -requestAutocorrectionContextWithCompletionHandler: robust in the case where the web page has been closed, 14 and there is no Connection object to use when waiting for a sync IPC response. 15 16 Test: AutocorrectionTests.RequestAutocorrectionContextAfterClosingPage 17 18 * UIProcess/ios/WKContentViewInteraction.mm: 19 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): 20 21 Tools: 22 23 Add an API test to exercise the scenario of synchronously requesting the autocorrection context immediately 24 after closing the web view, while the web view's content view isn't the first responder. 25 26 * TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm: 27 * TestWebKitAPI/ios/UIKitSPI.h: 28 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248039 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2019-07-31 Wenson Hsieh <wenson_hsieh@apple.com> 33 34 [iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus 35 https://bugs.webkit.org/show_bug.cgi?id=200291 36 <rdar://problem/53717946> 37 38 Reviewed by Megan Gardner. 39 40 Makes -requestAutocorrectionContextWithCompletionHandler: robust in the case where the web page has been closed, 41 and there is no Connection object to use when waiting for a sync IPC response. 42 43 Test: AutocorrectionTests.RequestAutocorrectionContextAfterClosingPage 44 45 * UIProcess/ios/WKContentViewInteraction.mm: 46 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): 47 1 48 2019-08-08 Kocsen Chung <kocsen_chung@apple.com> 2 49 -
branches/safari-608.1-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r248460 r248461 3886 3886 #endif 3887 3887 3888 if (!_page->hasRunningProcess()) { 3889 completionHandler(WKAutocorrectionContext.emptyAutocorrectionContext); 3890 return; 3891 } 3892 3888 3893 // FIXME: Remove the synchronous call when <rdar://problem/16207002> is fixed. 3889 3894 const bool useSyncRequest = true; … … 3900 3905 _page->process().connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::HandleAutocorrectionContext>(_page->pageID(), 1_s, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives); 3901 3906 [self _cancelPendingAutocorrectionContextHandler]; 3902 return;3903 3907 } 3904 3908 } -
branches/safari-608.1-branch/Tools/ChangeLog
r248458 r248461 1 2019-08-08 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r248039. rdar://problem/54087592 4 5 [iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus 6 https://bugs.webkit.org/show_bug.cgi?id=200291 7 <rdar://problem/53717946> 8 9 Reviewed by Megan Gardner. 10 11 Source/WebKit: 12 13 Makes -requestAutocorrectionContextWithCompletionHandler: robust in the case where the web page has been closed, 14 and there is no Connection object to use when waiting for a sync IPC response. 15 16 Test: AutocorrectionTests.RequestAutocorrectionContextAfterClosingPage 17 18 * UIProcess/ios/WKContentViewInteraction.mm: 19 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): 20 21 Tools: 22 23 Add an API test to exercise the scenario of synchronously requesting the autocorrection context immediately 24 after closing the web view, while the web view's content view isn't the first responder. 25 26 * TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm: 27 * TestWebKitAPI/ios/UIKitSPI.h: 28 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248039 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2019-07-31 Wenson Hsieh <wenson_hsieh@apple.com> 33 34 [iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus 35 https://bugs.webkit.org/show_bug.cgi?id=200291 36 <rdar://problem/53717946> 37 38 Reviewed by Megan Gardner. 39 40 Add an API test to exercise the scenario of synchronously requesting the autocorrection context immediately 41 after closing the web view, while the web view's content view isn't the first responder. 42 43 * TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm: 44 * TestWebKitAPI/ios/UIKitSPI.h: 45 1 46 2019-08-08 Kocsen Chung <kocsen_chung@apple.com> 2 47 -
branches/safari-608.1-branch/Tools/TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm
r248429 r248461 95 95 } 96 96 97 TEST(AutocorrectionTests, RequestAutocorrectionContextAfterClosingPage) 98 { 99 auto webView = adoptNS([[TestWKWebView alloc] init]); 100 [webView synchronouslyLoadTestPageNamed:@"autofocused-text-input"]; 101 102 auto contentView = [webView textInputContentView]; 103 [contentView resignFirstResponder]; 104 [webView _close]; 105 106 bool done = false; 107 [contentView requestAutocorrectionContextWithCompletionHandler:[&] (UIWKAutocorrectionContext *) { 108 done = true; 109 }]; 110 TestWebKitAPI::Util::run(&done); 111 } 112 97 113 #endif // PLATFORM(IOS_FAMILY) -
branches/safari-608.1-branch/Tools/TestWebKitAPI/ios/UIKitSPI.h
r248429 r248461 157 157 @end 158 158 159 @interface UIWKAutocorrectionContext : NSObject 160 @end 161 159 162 @protocol UIWKInteractionViewProtocol 160 163 - (void)requestAutocorrectionRectsForString:(NSString *)input withCompletionHandler:(void (^)(UIWKAutocorrectionRects *rectsForInput))completionHandler; 164 - (void)requestAutocorrectionContextWithCompletionHandler:(void (^)(UIWKAutocorrectionContext *autocorrectionContext))completionHandler; 161 165 @end 162 166
Note:
See TracChangeset
for help on using the changeset viewer.