WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180955
Add WKUIDelegatePrivate equivalent of WKPageContextMenuClient getContextMenuFromProposedMenuAsync
https://bugs.webkit.org/show_bug.cgi?id=180955
Summary
Add WKUIDelegatePrivate equivalent of WKPageContextMenuClient getContextMenuF...
Jeff Miller
Reported
2017-12-18 15:59:24 PST
Add WKUIDelegatePrivate equivalent of WKPageContextMenuClient getContextMenuFromProposedMenuAsync on macOS. The equivalent C SPI was tracked by <
https://bugs.webkit.org/show_bug.cgi?id=163292
>.
Attachments
Patch
(16.73 KB, patch)
2018-04-18 15:25 PDT
,
Jeff Miller
no flags
Details
Formatted Diff
Diff
Patch
(16.79 KB, patch)
2018-04-18 15:38 PDT
,
Jeff Miller
no flags
Details
Formatted Diff
Diff
Patch
(11.49 KB, patch)
2018-04-24 17:09 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-12-18 16:01:57 PST
<
rdar://problem/36118898
>
Jeff Miller
Comment 2
2018-04-18 15:25:30 PDT
Created
attachment 338269
[details]
Patch
Jeff Miller
Comment 3
2018-04-18 15:33:29 PDT
Looks like this broke non-Mac builds, I'll upload a new patch.
Jeff Miller
Comment 4
2018-04-18 15:38:16 PDT
Created
attachment 338270
[details]
Patch
Jeff Miller
Comment 5
2018-04-18 15:51:18 PDT
Now it seems like the builders are failing for other reasons unrelated to this patch.
Alex Christensen
Comment 6
2018-04-24 09:56:48 PDT
Comment on
attachment 338270
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=338270&action=review
> Source/WebKit/UIProcess/API/APIContextMenuClient.h:61 > - virtual RetainPtr<NSMenu> menuFromProposedMenu(WebKit::WebPageProxy&, NSMenu *menu, const WebKit::WebHitTestResultData&, API::Object*) { return menu; } > + virtual bool useGetContextMenuFromProposedNSMenu() { return false; } > + virtual void getContextMenuFromProposedNSMenu(WebKit::WebPageProxy&, NSMenu *proposedMenu, WebKit::WebContextMenuListenerProxy& listener, API::Object* /* userData */) { listener.useContextMenuNSMenu(proposedMenu); }
This feels like the wrong approach. I think the right approach would make menuFromProposedMenu return void and have it have a CompletionHandler<void(RetainPtr<NSMenu>)>&& as its last parameter.
> Source/WebKit/UIProcess/WebContextMenuListenerProxy.cpp:58 > +void WebContextMenuListenerProxy::useContextMenuNSMenu(NSMenu *menu)
The Linux build was indeed failing because it was trying to compile this.
> Source/WebKit/UIProcess/WebContextMenuListenerProxy.h:50 > void useContextMenuItems(Vector<Ref<WebContextMenuItem>>&&); > + void useContextMenuNSMenu(NSMenu *);
It seems like we should package things so we don't need to add another function here.
Alex Christensen
Comment 7
2018-04-24 17:09:18 PDT
Created
attachment 338688
[details]
Patch
WebKit Commit Bot
Comment 8
2018-04-30 15:21:48 PDT
Comment on
attachment 338688
[details]
Patch Clearing flags on attachment: 338688 Committed
r231174
: <
https://trac.webkit.org/changeset/231174
>
WebKit Commit Bot
Comment 9
2018-04-30 15:21:49 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug