Changeset 245915 in webkit
- Timestamp:
- May 30, 2019, 5:29:35 PM (7 years ago)
- Location:
- branches/safari-607-branch/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/mac/WKImmediateActionController.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/Source/WebKit/ChangeLog
r245356 r245915 1 2019-05-30 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r244781. rdar://problem/51264871 4 5 Long-standing rare crash under -[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal...] 6 https://bugs.webkit.org/show_bug.cgi?id=197404 7 <rdar://problem/24589331> 8 9 Reviewed by Wenson Hsieh. 10 11 * UIProcess/mac/WKImmediateActionController.mm: 12 (-[WKImmediateActionController _updateImmediateActionItem]): 13 (-[WKImmediateActionController menuItem:previewItemAtPoint:]): 14 (-[WKImmediateActionController menuItem:itemFrameForPoint:]): 15 (-[WKImmediateActionController _animationControllerForDataDetectedLink]): 16 Add some null checks; _webHitTestResult can be null if we (somehow) get 17 an immediate action gesture without having previously gotten a 18 mouseDidMoveOverElement from the Web Content process. Cover all our bases. 19 20 21 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244781 268f45cc-cd09-0410-ab3c-d52691b4dbfc 22 23 2019-04-30 Tim Horton <timothy_horton@apple.com> 24 25 Long-standing rare crash under -[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal...] 26 https://bugs.webkit.org/show_bug.cgi?id=197404 27 <rdar://problem/24589331> 28 29 Reviewed by Wenson Hsieh. 30 31 * UIProcess/mac/WKImmediateActionController.mm: 32 (-[WKImmediateActionController _updateImmediateActionItem]): 33 (-[WKImmediateActionController menuItem:previewItemAtPoint:]): 34 (-[WKImmediateActionController menuItem:itemFrameForPoint:]): 35 (-[WKImmediateActionController _animationControllerForDataDetectedLink]): 36 Add some null checks; _webHitTestResult can be null if we (somehow) get 37 an immediate action gesture without having previously gotten a 38 mouseDidMoveOverElement from the Web Content process. Cover all our bases. 39 1 40 2019-05-14 Kocsen Chung <kocsen_chung@apple.com> 2 41 -
branches/safari-607-branch/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm
r238771 r245915 329 329 330 330 RefPtr<API::HitTestResult> hitTestResult = [self _webHitTestResult]; 331 if (!hitTestResult) { 332 [self _cancelImmediateAction]; 333 return; 334 } 335 331 336 id customClientAnimationController = _page->immediateActionAnimationControllerForHitTestResult(hitTestResult, _type, _userData); 332 337 if (customClientAnimationController == [NSNull null]) { … … 354 359 355 360 RefPtr<API::HitTestResult> hitTestResult = [self _webHitTestResult]; 361 if (!hitTestResult) 362 return nil; 363 356 364 return [NSURL _web_URLWithWTFString:hitTestResult->absoluteLinkURL()]; 357 365 } … … 373 381 374 382 RefPtr<API::HitTestResult> hitTestResult = [self _webHitTestResult]; 383 if (!hitTestResult) 384 return NSZeroRect; 385 375 386 return [_view convertRect:hitTestResult->elementBoundingBox() toView:nil]; 376 387 } … … 450 461 451 462 RefPtr<API::HitTestResult> hitTestResult = [self _webHitTestResult]; 463 if (!hitTestResult) 464 return nil; 465 452 466 NSArray *menuItems = [[getDDActionsManagerClass() sharedManager] menuItemsForTargetURL:hitTestResult->absoluteLinkURL() actionContext:_currentActionContext.get()]; 453 467
Note:
See TracChangeset
for help on using the changeset viewer.