Changeset 249693 in webkit
- Timestamp:
- Sep 9, 2019, 8:19:42 PM (7 years ago)
- Location:
- branches/safari-608-branch
- Files:
-
- 5 edited
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm (modified) (2 diffs)
-
Tools/TestWebKitAPI/ios/UIKitSPI.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608-branch/Source/WebKit/ChangeLog
r249691 r249693 1 2019-09-09 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r249514. rdar://problem/55182886 4 5 MobileSafari may crash when invoking the C++ lambda in -[WKContentView _shareForWebView:] 6 https://bugs.webkit.org/show_bug.cgi?id=201479 7 <rdar://problem/51511834> 8 9 Reviewed by Tim Horton. 10 11 Source/WebKit: 12 13 Fix the crash by making -_shareForWebView: robust in the case where there are no selection rects 14 known in the UI process when -[WKContentView _share:] is invoked. 15 16 * UIProcess/ios/WKContentViewInteraction.mm: 17 (-[WKContentView _shareForWebView:]): 18 19 Tools: 20 21 Add a test to verify that the UI process doesn't crash when invoking `_share:` while there's no selection. 22 23 * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: 24 * TestWebKitAPI/ios/UIKitSPI.h: 25 26 27 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249514 268f45cc-cd09-0410-ab3c-d52691b4dbfc 28 29 2019-09-04 Wenson Hsieh <wenson_hsieh@apple.com> 30 31 MobileSafari may crash when invoking the C++ lambda in -[WKContentView _shareForWebView:] 32 https://bugs.webkit.org/show_bug.cgi?id=201479 33 <rdar://problem/51511834> 34 35 Reviewed by Tim Horton. 36 37 Fix the crash by making -_shareForWebView: robust in the case where there are no selection rects 38 known in the UI process when -[WKContentView _share:] is invoked. 39 40 * UIProcess/ios/WKContentViewInteraction.mm: 41 (-[WKContentView _shareForWebView:]): 42 1 43 2019-09-09 Kocsen Chung <kocsen_chung@apple.com> 2 44 -
branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r249550 r249693 2806 2806 if (error != WebKit::CallbackBase::Error::None) 2807 2807 return; 2808 if (!string) 2808 2809 if (!view->_textSelectionAssistant || !string || view->_page->editorState().isMissingPostLayoutData) 2809 2810 return; 2810 2811 2811 CGRect presentationRect = view->_page->editorState().postLayoutData().selectionRects[0].rect(); 2812 2813 if (view->_textSelectionAssistant) 2814 [view->_textSelectionAssistant showShareSheetFor:string fromRect:presentationRect]; 2812 auto& selectionRects = view->_page->editorState().postLayoutData().selectionRects; 2813 if (selectionRects.isEmpty()) 2814 return; 2815 2816 [view->_textSelectionAssistant showShareSheetFor:string fromRect:selectionRects.first().rect()]; 2815 2817 }); 2816 2818 } -
branches/safari-608-branch/Tools/ChangeLog
r249550 r249693 1 2019-09-09 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r249514. rdar://problem/55182886 4 5 MobileSafari may crash when invoking the C++ lambda in -[WKContentView _shareForWebView:] 6 https://bugs.webkit.org/show_bug.cgi?id=201479 7 <rdar://problem/51511834> 8 9 Reviewed by Tim Horton. 10 11 Source/WebKit: 12 13 Fix the crash by making -_shareForWebView: robust in the case where there are no selection rects 14 known in the UI process when -[WKContentView _share:] is invoked. 15 16 * UIProcess/ios/WKContentViewInteraction.mm: 17 (-[WKContentView _shareForWebView:]): 18 19 Tools: 20 21 Add a test to verify that the UI process doesn't crash when invoking `_share:` while there's no selection. 22 23 * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: 24 * TestWebKitAPI/ios/UIKitSPI.h: 25 26 27 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249514 268f45cc-cd09-0410-ab3c-d52691b4dbfc 28 29 2019-09-04 Wenson Hsieh <wenson_hsieh@apple.com> 30 31 MobileSafari may crash when invoking the C++ lambda in -[WKContentView _shareForWebView:] 32 https://bugs.webkit.org/show_bug.cgi?id=201479 33 <rdar://problem/51511834> 34 35 Reviewed by Tim Horton. 36 37 Add a test to verify that the UI process doesn't crash when invoking `_share:` while there's no selection. 38 39 * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: 40 * TestWebKitAPI/ios/UIKitSPI.h: 41 1 42 2019-09-05 Kocsen Chung <kocsen_chung@apple.com> 2 43 -
branches/safari-608-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm
r243354 r249693 32 32 #import "TestNavigationDelegate.h" 33 33 #import "TestWKWebView.h" 34 #import "UIKitSPI.h" 34 35 #import <WebKit/WebKit.h> 35 36 #import <wtf/RetainPtr.h> … … 63 64 } 64 65 66 TEST(WebKit, InvokeShareWithoutSelection) 67 { 68 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 568)]); 69 [webView synchronouslyLoadTestPageNamed:@"simple"]; 70 [[webView textInputContentView] _share:nil]; 71 [webView waitForNextPresentationUpdate]; 72 } 73 65 74 #endif -
branches/safari-608-branch/Tools/TestWebKitAPI/ios/UIKitSPI.h
r248620 r249693 250 250 @end 251 251 252 @interface UIResponder (Internal) 253 - (void)_share:(id)sender; 254 @end 255 252 256 #endif // PLATFORM(IOS_FAMILY)
Note:
See TracChangeset
for help on using the changeset viewer.