<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Make preview inline navigation work API"
   href="https://bugs.webkit.org/show_bug.cgi?id=155383#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Make preview inline navigation work API"
   href="https://bugs.webkit.org/show_bug.cgi?id=155383">bug 155383</a>
              from <span class="vcard"><a class="email" href="mailto:bdakin&#64;apple.com" title="Beth Dakin &lt;bdakin&#64;apple.com&gt;"> <span class="fn">Beth Dakin</span></a>
</span></b>
        <pre>Thanks Dan!!

(In reply to <a href="show_bug.cgi?id=155383#c4">comment #4</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=273784&amp;action=diff" name="attach_273784" title="Patch">attachment 273784</a> <a href="attachment.cgi?id=273784&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=273784&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=273784&amp;action=review</a>
&gt; 
&gt; r- because this breaks the Mac build. Some more comments below.
&gt; 
&gt; &gt; Source/WebKit2/ChangeLog:16
&gt; &gt; +        _WKPreviewActionItem is now WKPreviewActionItem, but the _WKPreviewAction 
&gt; &gt; +        class is still a private implementation detail, so it still has an underscore 
&gt; &gt; +        even though the filenames do not.
&gt; 
&gt; If it’s an *internal* implementation detail, i.e, the class isn’t available
&gt; even to SPI clients and isn’t exposed in a framework header (which I think
&gt; is the case or at least should be the case), then per our convention it
&gt; should *not* be underscore-prefixed.
&gt; </span >

Oops! I fixed this.

<span class="quote">&gt; &gt; Source/WebKit2/ChangeLog:19
&gt; &gt; +        nowWKPreviewActionItemIdentifiers.h/mm and all the the identifiers have been 
&gt; 
&gt; nowWK
&gt; </span >

Fixed.

<span class="quote">&gt; &gt; Source/WebKit2/UIProcess/API/Cocoa/WKElementInfoInternal.h:39
&gt; &gt; +#endif // WK_API_ENABLED
&gt; 
&gt; I think we normally don’t // WK_API_ENABLED.
&gt; </span >

I found 173 occurrences of '// WK_API_ENABLED' when I searched for it in the WebKit2 xcoeproj, so I left it in for now. :-O

<span class="quote">&gt; &gt; Source/WebKit2/UIProcess/API/Cocoa/WKPreviewActionItemInternal.h:32
&gt; &gt; +&#64;interface _WKPreviewAction : UIPreviewAction &lt;NSCopying, WKPreviewActionItem&gt;
&gt; 
&gt; So the underscore should go.
&gt; </span >

Gone!

<span class="quote">&gt; Not new, but you’re claiming NSCopying conformance here but I don’t see that
&gt; class overrides -copyWithZone:, so at the very least it fails to copy the
&gt; identifier (and that’s assuming UIPreviewAction is copyable, in which case,
&gt; there’s no need to declare that its subclass is NSCopying-conformant).
&gt; </span >

I haven't fixed this yet since there is a new bug filed about it. Also since it will be easier to review that bit in the context of a smaller patch.

<span class="quote">&gt; &gt; Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegate.h:150
&gt; &gt; +- (BOOL)webView:(WKWebView *)webView shouldPreviewElement:(WKPreviewElementInfo *)elementInfo WK_AVAILABLE(NA, WK_IOS_TBA);
&gt; &gt; +
&gt; &gt; +/*! &#64;abstract Allows your app to provide a custom view controller to show when the given element is peeked.
&gt; &gt; + &#64;param webView The web view invoking the delegate method.
&gt; &gt; + &#64;param elementInfo The elementInfo for the element the user is peeking.
&gt; &gt; + &#64;param defaultActions An array of the actions that WebKit would use as previewActionItems for this element by 
&gt; &gt; + default. These actions would be used if allowsLinkPreview is YES but these delegate methods have not been 
&gt; &gt; + implemented, or if this delegate method returns nil.
&gt; &gt; + &#64;discussion Returning a view controller will result in that view controller being displayed as a peek preview.
&gt; &gt; + To use the defaultActions, your app is responsible for returning whichever of those actions it wants in your 
&gt; &gt; + view controller's implementation of -previewActionItems.
&gt; &gt; + 
&gt; &gt; + Returning nil will result in WebKit's default preview behavior. webView:commitPreviewingViewController: will only be invoked
&gt; &gt; + if a non-nil view controller was returned.
&gt; &gt; + */
&gt; &gt; +- (nullable UIViewController *)webView:(WKWebView *)webView previewingViewControllerForElement:(WKPreviewElementInfo *)elementInfo defaultActions:(NSArray &lt;id &lt;WKPreviewActionItem&gt;&gt; *)previewActions WK_AVAILABLE(NA, WK_IOS_TBA);
&gt; &gt; +
&gt; &gt; +/*! &#64;abstract Allows your app to pop to the view controller it created.
&gt; &gt; + &#64;param webView The web view invoking the delegate method.
&gt; &gt; + &#64;param previewingViewController The view controller that is being popped.
&gt; &gt; + */
&gt; &gt; +- (void)webView:(WKWebView *)webView commitPreviewingViewController:(UIViewController *)previewingViewController WK_AVAILABLE(NA, WK_IOS_TBA);
&gt; 
&gt; These should all be in an #if TARGET_OS_IPHONE block.</span >

Fixed!</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>