Changeset 246544 in webkit
- Timestamp:
- Jun 18, 2019 9:48:34 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r246538 r246544 1 2019-06-18 Truitt Savell <tsavell@apple.com> 2 3 Unreviewed, rolling out r246531. 4 5 Broke internal builds. 6 7 Reverted changeset: 8 9 "Expose DataDetectors context generation on 10 WKContentViewInteraction" 11 https://bugs.webkit.org/show_bug.cgi?id=198950 12 https://trac.webkit.org/changeset/246531 13 1 14 2019-06-18 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.h
r246531 r246544 83 83 - (void)interactionDidStartWithPositionInformation:(const WebKit::InteractionInformationAtPosition&)information; 84 84 - (NSArray *)currentAvailableActionTitles; 85 - (Optional<WebKit::InteractionInformationAtPosition>)currentPositionInformation;86 85 @end 87 86 -
trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm
r246531 r246544 326 326 } 327 327 328 - (Optional<WebKit::InteractionInformationAtPosition>)currentPositionInformation329 {330 return _positionInformation;331 }332 333 328 - (void)_createSheetWithElementActions:(NSArray *)actions defaultTitle:(NSString *)defaultTitle showLinkTitle:(BOOL)showLinkTitle 334 329 { … … 652 647 NSDictionary *context = nil; 653 648 NSString *textAtSelection = nil; 649 RetainPtr<NSMutableDictionary> extendedContext; 654 650 655 651 if ([_delegate respondsToSelector:@selector(dataDetectionContextForActionSheetAssistant:)]) … … 657 653 if ([_delegate respondsToSelector:@selector(selectedTextForActionSheetAssistant:)]) 658 654 textAtSelection = [_delegate selectedTextForActionSheetAssistant:self]; 655 if (!_positionInformation->textBefore.isEmpty() || !_positionInformation->textAfter.isEmpty()) { 656 extendedContext = adoptNS([@{ 657 getkDataDetectorsLeadingText() : _positionInformation->textBefore, 658 getkDataDetectorsTrailingText() : _positionInformation->textAfter, 659 } mutableCopy]); 660 661 if (context) 662 [extendedContext addEntriesFromDictionary:context]; 663 context = extendedContext.get(); 664 } 659 665 660 666 if ([controller respondsToSelector:@selector(shouldImmediatelyLaunchDefaultActionForURL:)] && [controller shouldImmediatelyLaunchDefaultActionForURL:targetURL]) { -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r246531 r246544 471 471 - (WKFormInputSession *)_formInputSession; 472 472 - (void)_didChangeWebViewEditability; 473 - (NSDictionary *)dataDetectionContextForPositionInformation:(WebKit::InteractionInformationAtPosition)positionInformation;474 473 475 474 - (void)willFinishIgnoringCalloutBarFadeAfterPerformingAction; -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r246531 r246544 6140 6140 } 6141 6141 6142 - (NSDictionary *)dataDetectionContextFor PositionInformation:(WebKit::InteractionInformationAtPosition)positionInformation6143 { 6144 RetainPtr<NSMutableDictionary> context;6142 - (NSDictionary *)dataDetectionContextForActionSheetAssistant:(WKActionSheetAssistant *)assistant 6143 { 6144 NSDictionary *context = nil; 6145 6145 id <WKUIDelegatePrivate> uiDelegate = static_cast<id <WKUIDelegatePrivate>>([_webView UIDelegate]); 6146 6146 if ([uiDelegate respondsToSelector:@selector(_dataDetectionContextForWebView:)]) 6147 context = adoptNS([[uiDelegate _dataDetectionContextForWebView:_webView] mutableCopy]); 6148 6149 if (!context) 6150 context = adoptNS([[NSMutableDictionary alloc] init]); 6151 6152 if (!positionInformation.textBefore.isEmpty()) 6153 context.get()[getkDataDetectorsLeadingText()] = positionInformation.textBefore; 6154 if (!positionInformation.textAfter.isEmpty()) 6155 context.get()[getkDataDetectorsTrailingText()] = positionInformation.textAfter; 6156 6157 return context.autorelease(); 6158 } 6159 6160 - (NSDictionary *)dataDetectionContextForActionSheetAssistant:(WKActionSheetAssistant *)assistant 6161 { 6162 return [self dataDetectionContextForPositionInformation:assistant.currentPositionInformation.valueOr(_positionInformation)]; 6147 context = [uiDelegate _dataDetectionContextForWebView:_webView]; 6148 return context; 6163 6149 } 6164 6150
Note: See TracChangeset
for help on using the changeset viewer.