[Webkit-unassigned] [Bug 171100] Implement the Web Share API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 23 18:09:12 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=171100

--- Comment #20 from Tim Horton <thorton at apple.com> ---
Comment on attachment 347979
  --> https://bugs.webkit.org/attachment.cgi?id=347979
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=347979&action=review

> Source/WebCore/ChangeLog:9
> +        No new tests (OOPS!).

Except for "No new tests", this is quite close to being ready!

> Source/WebCore/page/Navigator.cpp:108
> +        

unnecessary newline

> Source/WebCore/page/Navigator.cpp:130
> +        promise->reject(Exception { AbortError, "Share sheet cancelled, rejecting promise with abort."_s });

I don't think we should use the word "share sheet" in shared code, that's kind of an iOSism. Maybe just remove the word "sheet"? I'm not sure. Also not totally sure you need to describe that you're rejecting the promise in the promise rejection, but follow whatever you see other people doing.

> Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:575
> +bool PageClientImpl::handleRunShareSheet(WebPageProxy*, const ShareDataWithParsedURL& shareData, WTF::CompletionHandler<void(bool)>&& completionHandler)

Let's just call it showShareSheet here too!

> Source/WebKit/UIProcess/ios/forms/WKShareSheet.h:37
> +namespace WTF {
> +}

??

> Source/WebKit/UIProcess/ios/forms/WKShareSheet.h:46
> +namespace API {
> +}
> +
> +namespace WebKit {
> +}

?????

> Source/WebKit/UIProcess/ios/forms/WKShareSheet.mm:84
> +            url._title = data.shareData.title;

You'll need to import UIKitSPI.h (hopefully it already knows about _title).

> Source/WebKit/UIProcess/ios/forms/WKShareSheet.mm:93
> +    NSURL *urlWithTitle = (NSURL *)data.url;
> +    urlWithTitle._title = data.shareData.title;

I think this is not still real. urlWithTitle goes nowhere, and the real code for this is above in the !data.url.isNull() block

> Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h:176
> +#define WebKitWebShareEnabledPreferenceKey @"WebKitWebShareEnabled"

You don't need this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180824/e2675eef/attachment.html>


More information about the webkit-unassigned mailing list