Bug 236823 - Use async NSSharingServicePicker menu if available
Summary: Use async NSSharingServicePicker menu if available
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kate Cheney
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-17 21:06 PST by Kate Cheney
Modified: 2022-02-18 14:41 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.68 KB, patch)
2022-02-17 21:08 PST, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (3.78 KB, patch)
2022-02-18 09:43 PST, Kate Cheney
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (3.79 KB, patch)
2022-02-18 09:57 PST, Kate Cheney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Cheney 2022-02-17 21:06:05 PST
Use async sharingServicePicker menu if available
Comment 1 Kate Cheney 2022-02-17 21:08:41 PST
Created attachment 452477 [details]
Patch
Comment 2 Kate Cheney 2022-02-17 21:13:43 PST
rdar://88858606
Comment 3 Dean Jackson 2022-02-18 08:41:11 PST
Comment on attachment 452477 [details]
Patch

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

> Source/WebKit/UIProcess/Cocoa/WKShareSheet.h:45
> +- (void)showPickerAsync:(NSSharingServicePicker *)picker showRelativeToRect:(NSRect)presentationRect ofView:(WKWebView *)webView completion:(void (^)(void))completionHandler;
>  @property (nonatomic, weak) id <WKShareSheetDelegate> delegate;

Nit: I think we usually put a blank line between the methods and the @property(s).
Comment 4 Dean Jackson 2022-02-18 08:42:14 PST
Comment on attachment 452477 [details]
Patch

It seems NSSharingServicePicker is an unknown type.
Comment 5 Kate Cheney 2022-02-18 09:19:31 PST
(In reply to Dean Jackson from comment #4)
> Comment on attachment 452477 [details]
> Patch
> 
> It seems NSSharingServicePicker is an unknown type.

Oops, I think the SPI is Mac only, need to add some #if PLATFORM(MAC) tags. And then mac failures are because I changed the function but didn't update the non-internal-sdk declarations. New patch coming
Comment 6 Kate Cheney 2022-02-18 09:19:40 PST
(In reply to Dean Jackson from comment #3)
> Comment on attachment 452477 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=452477&action=review
> 
> > Source/WebKit/UIProcess/Cocoa/WKShareSheet.h:45
> > +- (void)showPickerAsync:(NSSharingServicePicker *)picker showRelativeToRect:(NSRect)presentationRect ofView:(WKWebView *)webView completion:(void (^)(void))completionHandler;
> >  @property (nonatomic, weak) id <WKShareSheetDelegate> delegate;
> 
> Nit: I think we usually put a blank line between the methods and the
> @property(s).

Will fix in new patch!
Comment 7 Kate Cheney 2022-02-18 09:43:43 PST
Created attachment 452530 [details]
Patch
Comment 8 Kate Cheney 2022-02-18 09:57:51 PST
Created attachment 452533 [details]
Patch
Comment 9 EWS 2022-02-18 14:41:50 PST
Committed r290173 (247504@main): <https://commits.webkit.org/247504@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452533 [details].