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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 21 23:34:23 PDT 2018


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

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

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

> Source/WebKit/UIProcess/ios/forms/WKShareSheet.mm:75
> +    if (!data.shareData.title.isEmpty())

I think it's probably wrong to put the title directly in the share items. Looking at the spec, it seems like 'text' and 'url' are the things you're sharing, and title is sort of metadata *about* the thing you're sharing. So I think we want to be a little smarter here. We have some options:

1. We could just drop the title on the floor. The spec says this is OK.
2. We could use the weird _title SPI on NSURL to smush the title into the URL, if we have one. Not sure any clients will care, but we could consider smartening some of them up.
3. If you only have a title, and no text nor URL-to-smush-into, you could use the title as the text.

I think a combination of 2 and 3 is probably the "smartest" for now, but would also be OK with 1 for the first go-around. But what we have right now is probably not workable (mostly because the share sheet generally has to pick *one* of the items to share, and it would be a shame if it shared the title instead of the more-useful URL or text).

> Source/WebKit/UIProcess/ios/forms/WKShareSheet.mm:82
> +    UIActivityViewController *shareSheetController = [[UIActivityViewController alloc] initWithActivityItems:shareDataArray.get() applicationActivities:nil];

Please put the adoptNS here, sink it into a local RetainPtr, and then assign to the instance variable later. Otherwise this gets everyone's leak spidey-sense tingling.

-- 
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/20180822/039e904a/attachment-0001.html>


More information about the webkit-unassigned mailing list