[webkit-reviews] review granted: [Bug 208779] Adopt Context Menus for Data Detectors : [Attachment 392937] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Mar 7 22:38:33 PST 2020
Tim Horton <thorton at apple.com> has granted Megan Gardner
<megan_gardner at apple.com>'s request for review:
Bug 208779: Adopt Context Menus for Data Detectors
https://bugs.webkit.org/show_bug.cgi?id=208779
Attachment 392937: Patch
https://bugs.webkit.org/attachment.cgi?id=392937&action=review
--- Comment #8 from Tim Horton <thorton at apple.com> ---
Comment on attachment 392937
--> https://bugs.webkit.org/attachment.cgi?id=392937
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=392937&action=review
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.h:65
> +-
(CGPoint)contextMenuDisplayLocationForActionSheetAssistant:(WKActionSheetAssist
ant *)assistant;
Maybe "presentation" or "origin" instead of "display", but I don't really care.
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:719
> +- (UIContextMenuConfiguration
*)contextMenuInteraction:(UIContextMenuInteraction *)interaction
configurationForMenuAtLocation:(CGPoint)location
USE(UICONTEXTMENU)?
> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:747
> + if ([delegate
respondsToSelector:@selector(contextMenuDisplayLocationForActionSheetAssistant:
)])
> + center = [delegate
contextMenuDisplayLocationForActionSheetAssistant:self];
> + RetainPtr<UIPreviewParameters> unusedPreviewParameters =
adoptNS([[UIPreviewParameters alloc] init]);
> + RetainPtr<UIPreviewTarget> previewTarget = adoptNS([[UIPreviewTarget
alloc] initWithContainer:_view.getAutoreleased() center:center]);
> + RetainPtr<UITargetedPreview> preview = adoptNS([[UITargetedPreview
alloc] initWithView:_view.getAutoreleased()
parameters:unusedPreviewParameters.get() target:previewTarget.get()]);
How ugly is the hint? We probably want to share some of this with the better
code in WKContentViewInteraction, but that can be in a follow-up
More information about the webkit-reviews
mailing list