[Webkit-unassigned] [Bug 155383] Make preview inline navigation work API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 11 21:56:00 PST 2016
https://bugs.webkit.org/show_bug.cgi?id=155383
mitz at webkit.org <mitz at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #273784|review? |review-
Flags| |
--- Comment #4 from mitz at webkit.org <mitz at webkit.org> ---
Comment on attachment 273784
--> https://bugs.webkit.org/attachment.cgi?id=273784
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=273784&action=review
r- because this breaks the Mac build. Some more comments below.
> Source/WebKit2/ChangeLog:16
> + _WKPreviewActionItem is now WKPreviewActionItem, but the _WKPreviewAction
> + class is still a private implementation detail, so it still has an underscore
> + even though the filenames do not.
If itâs an *internal* implementation detail, i.e, the class isnât available even to SPI clients and isnât exposed in a framework header (which I think is the case or at least should be the case), then per our convention it should *not* be underscore-prefixed.
> Source/WebKit2/ChangeLog:19
> + nowWKPreviewActionItemIdentifiers.h/mm and all the the identifiers have been
nowWK
> Source/WebKit2/UIProcess/API/Cocoa/WKElementInfoInternal.h:39
> +#endif // WK_API_ENABLED
I think we normally donât // WK_API_ENABLED.
> Source/WebKit2/UIProcess/API/Cocoa/WKPreviewActionItemInternal.h:32
> + at interface _WKPreviewAction : UIPreviewAction <NSCopying, WKPreviewActionItem>
So the underscore should go.
Not new, but youâre claiming NSCopying conformance here but I donât see that class overrides -copyWithZone:, so at the very least it fails to copy the identifier (and thatâs assuming UIPreviewAction is copyable, in which case, thereâs no need to declare that its subclass is NSCopying-conformant).
> Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h:150
> +- (BOOL)webView:(WKWebView *)webView shouldPreviewElement:(WKPreviewElementInfo *)elementInfo WK_AVAILABLE(NA, WK_IOS_TBA);
> +
> +/*! @abstract Allows your app to provide a custom view controller to show when the given element is peeked.
> + @param webView The web view invoking the delegate method.
> + @param elementInfo The elementInfo for the element the user is peeking.
> + @param defaultActions An array of the actions that WebKit would use as previewActionItems for this element by
> + default. These actions would be used if allowsLinkPreview is YES but these delegate methods have not been
> + implemented, or if this delegate method returns nil.
> + @discussion Returning a view controller will result in that view controller being displayed as a peek preview.
> + To use the defaultActions, your app is responsible for returning whichever of those actions it wants in your
> + view controller's implementation of -previewActionItems.
> +
> + Returning nil will result in WebKit's default preview behavior. webView:commitPreviewingViewController: will only be invoked
> + if a non-nil view controller was returned.
> + */
> +- (nullable UIViewController *)webView:(WKWebView *)webView previewingViewControllerForElement:(WKPreviewElementInfo *)elementInfo defaultActions:(NSArray <id <WKPreviewActionItem>> *)previewActions WK_AVAILABLE(NA, WK_IOS_TBA);
> +
> +/*! @abstract Allows your app to pop to the view controller it created.
> + @param webView The web view invoking the delegate method.
> + @param previewingViewController The view controller that is being popped.
> + */
> +- (void)webView:(WKWebView *)webView commitPreviewingViewController:(UIViewController *)previewingViewController WK_AVAILABLE(NA, WK_IOS_TBA);
These should all be in an #if TARGET_OS_IPHONE block.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160312/39baaea1/attachment-0001.html>
More information about the webkit-unassigned
mailing list