Changeset 248039 in webkit
- Timestamp:
- Jul 31, 2019, 7:41:16 AM (7 years ago)
- Location:
- trunk
- 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
-
trunk/Source/WebKit/ChangeLog
r248038 r248039 1 2019-07-31 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus 4 https://bugs.webkit.org/show_bug.cgi?id=200291 5 <rdar://problem/53717946> 6 7 Reviewed by Megan Gardner. 8 9 Makes -requestAutocorrectionContextWithCompletionHandler: robust in the case where the web page has been closed, 10 and there is no Connection object to use when waiting for a sync IPC response. 11 12 Test: AutocorrectionTests.RequestAutocorrectionContextAfterClosingPage 13 14 * UIProcess/ios/WKContentViewInteraction.mm: 15 (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): 16 1 17 2019-07-31 Chris Fleizach <cfleizach@apple.com> 2 18 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r247936 r248039 3891 3891 #endif 3892 3892 3893 if (!_page->hasRunningProcess()) { 3894 completionHandler(WKAutocorrectionContext.emptyAutocorrectionContext); 3895 return; 3896 } 3897 3893 3898 // FIXME: Remove the synchronous call when <rdar://problem/16207002> is fixed. 3894 3899 const bool useSyncRequest = true; … … 3905 3910 _page->process().connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::HandleAutocorrectionContext>(_page->pageID(), 1_s, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives); 3906 3911 [self _cancelPendingAutocorrectionContextHandler]; 3907 return;3908 3912 } 3909 3913 } -
trunk/Tools/ChangeLog
r248033 r248039 1 2019-07-31 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [iOS 13] Safari crashes when closing a tab with a focused element if the unified field has focus 4 https://bugs.webkit.org/show_bug.cgi?id=200291 5 <rdar://problem/53717946> 6 7 Reviewed by Megan Gardner. 8 9 Add an API test to exercise the scenario of synchronously requesting the autocorrection context immediately 10 after closing the web view, while the web view's content view isn't the first responder. 11 12 * TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm: 13 * TestWebKitAPI/ios/UIKitSPI.h: 14 1 15 2019-07-31 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/Tools/TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm
r245998 r248039 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) -
trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h
r247702 r248039 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.