We want to be able to preview attachment elements, like we do for links and images. rdar://problem/24806079
Created attachment 273108 [details] Patch
Created attachment 273117 [details] Patch2
Comment on attachment 273117 [details] Patch2 View in context: https://bugs.webkit.org/attachment.cgi?id=273117&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:76 > +- (NSUInteger)_webView:(WKWebView *)webView attachmentIndexElement:(_WKActivatedElementInfo *)element WK_AVAILABLE(NA, WK_IOS_TBA); This name is a bit awkward. I think something like, _webView:indexIntoAttachmentListForElement: or something like that. > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3712 > + enum { UIPreviewItemTypeAttachment = 5 }; Even though I suggested this, it now makes me nervous. I think you should just use the 5 below with a comment, or pick a name that won't conflict with UIKit.
(In reply to comment #3) > Comment on attachment 273117 [details] > Patch2 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=273117&action=review > > > Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:76 > > +- (NSUInteger)_webView:(WKWebView *)webView attachmentIndexElement:(_WKActivatedElementInfo *)element WK_AVAILABLE(NA, WK_IOS_TBA); > > This name is a bit awkward. I think something like, > _webView:indexIntoAttachmentListForElement: or something like that. > I'll change it. > > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3712 > > + enum { UIPreviewItemTypeAttachment = 5 }; > > Even though I suggested this, it now makes me nervous. I think you should > just use the 5 below with a comment, or pick a name that won't conflict with > UIKit. I agree with you, I'll use a different name for the enum.
Committed revision 197656.
Comment on attachment 273117 [details] Patch2 View in context: https://bugs.webkit.org/attachment.cgi?id=273117&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:75 > +- (NSArray *)_attachmentListForWebView:(WKWebView *)webView WK_AVAILABLE(NA, WK_IOS_TBA); Can this be WK_ARRAY<> of a more specific type?