Changeset 258684 in webkit
- Timestamp:
- Mar 19, 2020 1:14:12 AM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r258682 r258684 1 2020-03-19 Megan Gardner <megan_gardner@apple.com> 2 3 Correctly set up context for Data Detectors 4 https://bugs.webkit.org/show_bug.cgi?id=209258 5 6 Reviewed by Tim Horton. 7 8 * pal/spi/ios/DataDetectorsUISPI.h: 9 1 10 2020-03-18 Peng Liu <peng.liu6@apple.com> 2 11 -
trunk/Source/WebCore/PAL/pal/spi/ios/DataDetectorsUISPI.h
r258102 r258684 53 53 @class UIContextMenuConfiguration; 54 54 @interface DDContextMenuAction 55 + (NSDictionary *)updateContext:(NSDictionary *)context withSourceRect:(CGRect)sourceRect; 55 56 + (UIContextMenuConfiguration *)contextMenuConfigurationForURL:(NSURL *)URL identifier:(NSString *)identifier selectedText:(NSString *)selectedText results:(NSArray *) results inView: (UIView *) view context:(NSDictionary *)context menuIdentifier:(NSString *)menuIdentifier; 56 57 + (UIContextMenuConfiguration *)contextMenuConfigurationWithResult:(DDResultRef)result inView:(UIView *)view context:(NSDictionary *)context menuIdentifier:(NSString *)menuIdentifier; -
trunk/Source/WebKit/ChangeLog
r258679 r258684 1 2020-03-19 Megan Gardner <megan_gardner@apple.com> 2 3 Correctly set up context for Data Detectors 4 https://bugs.webkit.org/show_bug.cgi?id=209258 5 <rdar://problem/60612327> 6 7 Reviewed by Tim Horton. 8 9 Stop passing in a nil context. This is OK now, but won't be in the near future. 10 Also, call -updateContext:withSourceRect: so that DataDetectors can populate the context appropriately. 11 12 * UIProcess/ios/WKActionSheetAssistant.mm: 13 (-[WKActionSheetAssistant contextMenuInteraction:configurationForMenuAtLocation:]): 14 * UIProcess/ios/WKContentViewInteraction.mm: 15 (-[WKContentView dataDetectionContextForPositionInformation:]): 16 1 17 2020-03-18 Simon Fraser <simon.fraser@apple.com> 2 18 -
trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm
r258183 r258684 734 734 DDResultRef ddResult = [controller resultForURL:_positionInformation->url identifier:_positionInformation->dataDetectorIdentifier selectedText:textAtSelection results:_positionInformation->dataDetectorResults.get() context:context extendedContext:&newContext]; 735 735 736 737 CGRect sourceRect; 738 if (_positionInformation->isLink) 739 sourceRect = _positionInformation->linkIndicator.textBoundingRectInRootViewCoordinates; 740 else 741 sourceRect = _positionInformation->bounds; 742 736 743 auto ddContextMenuActionClass = getDDContextMenuActionClass(); 744 auto finalContext = [ddContextMenuActionClass updateContext:newContext withSourceRect:sourceRect]; 745 737 746 if (ddResult) 738 return [ddContextMenuActionClass contextMenuConfigurationWithResult:ddResult inView:_view.getAutoreleased() context: context menuIdentifier:nil];739 return [ddContextMenuActionClass contextMenuConfigurationWithURL:_positionInformation->url inView:_view.getAutoreleased() context: context menuIdentifier:nil];747 return [ddContextMenuActionClass contextMenuConfigurationWithResult:ddResult inView:_view.getAutoreleased() context:finalContext menuIdentifier:nil]; 748 return [ddContextMenuActionClass contextMenuConfigurationWithURL:_positionInformation->url inView:_view.getAutoreleased() context:finalContext menuIdentifier:nil]; 740 749 } 741 750 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r258659 r258684 6751 6751 6752 6752 CGRect frameInContainerViewCoordinates = [self convertRect:sourceRect toView:self.containerForContextMenuHintPreviews]; 6753 context.get()[getkDataDetectorsSourceRectKey()] = [NSValue valueWithCGRect:frameInContainerViewCoordinates]; 6754 #endif 6755 6753 return [getDDContextMenuActionClass() updateContext:context.get() withSourceRect:frameInContainerViewCoordinates]; 6754 #else 6756 6755 return context.autorelease(); 6756 #endif 6757 6757 } 6758 6758
Note: See TracChangeset
for help on using the changeset viewer.