Bug 111552

Summary: [WK2] Add new callbacks and a function for WebKit2 context menu API
Product: WebKit Reporter: Michal Pakula vel Rutka <mpakulavelrutka>
Component: WebKit2Assignee: Michal Pakula vel Rutka <mpakulavelrutka>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, ap, benjamin, cgarcia, commit-queue, gustavo, gyuyoung.kim, kenneth, mrobinson, rakuco, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 109698, 113582    
Attachments:
Description Flags
proposed patch
none
fixes
none
fixes
andersca: review-, buildbot: commit-queue-
applied andersca's comment none

Description Michal Pakula vel Rutka 2013-03-06 03:15:35 PST
This patch will add two callbacks for showing and hiding context menus and an API function for selecting context menu items.
Comment 1 Michal Pakula vel Rutka 2013-03-06 03:28:12 PST
Created attachment 191704 [details]
proposed patch
Comment 2 WebKit Review Bot 2013-03-06 03:30:37 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Kenneth Rohde Christiansen 2013-03-20 04:59:06 PDT
Comment on attachment 191704 [details]
proposed patch

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

> Source/WebKit2/UIProcess/API/C/WKPage.cpp:871
> +void WKPageContextMenuItemSelected(WKPageRef page, WKContextMenuItemRef item)

the name gives me the idea that it will return a bool (Selected). Should this be called WKPageSelectContextMenuItem( ??
Comment 4 Kenneth Rohde Christiansen 2013-03-20 04:59:56 PDT
Cc'ing some owners who might have comments
Comment 5 Michal Pakula vel Rutka 2013-03-23 16:09:53 PDT
(In reply to comment #3)
> (From update of attachment 191704 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=191704&action=review
> 
> > Source/WebKit2/UIProcess/API/C/WKPage.cpp:871
> > +void WKPageContextMenuItemSelected(WKPageRef page, WKContextMenuItemRef item)
> 
> the name gives me the idea that it will return a bool (Selected). Should this be called WKPageSelectContextMenuItem( ??

OK, I will change it to WKPageSelectContextMenuItem
Comment 6 Michal Pakula vel Rutka 2013-03-25 06:42:49 PDT
Created attachment 194844 [details]
fixes
Comment 7 Michal Pakula vel Rutka 2013-03-27 06:40:30 PDT
Created attachment 195303 [details]
fixes

fixed conditional in WebPagProxy
Comment 8 Build Bot 2013-03-27 09:15:05 PDT
Comment on attachment 195303 [details]
fixes

Attachment 195303 [details] did not pass win-ews (win):
Output: http://webkit-commit-queue.appspot.com/results/17221833
Comment 9 Michal Pakula vel Rutka 2013-03-27 15:57:33 PDT
(In reply to comment #8)
> (From update of attachment 195303 [details])
> Attachment 195303 [details] did not pass win-ews (win):
> Output: http://webkit-commit-queue.appspot.com/results/17221833

The patch does not change WebKit1 code, so this is a false positive error.
Comment 10 Carlos Garcia Campos 2013-04-03 10:09:07 PDT
Comment on attachment 195303 [details]
fixes

This looks good to me. What port does need this? Callbacks are unimplemented in both EFL and GTK+, or is it implemented in a another patch?
Comment 11 Michal Pakula vel Rutka 2013-04-03 10:19:40 PDT
(In reply to comment #10)
> (From update of attachment 195303 [details])
> This looks good to me. What port does need this? Callbacks are unimplemented in both EFL and GTK+, or is it implemented in a another patch?

They are implemented in EFL port in https://bugs.webkit.org/show_bug.cgi?id=109698.
Comment 12 Anders Carlsson 2013-04-12 06:29:26 PDT
Comment on attachment 195303 [details]
fixes

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

> Source/WebKit2/UIProcess/WebPageContextMenuClient.cpp:107
> +        menuItems.append(WebContextMenuItem::create(menuItemsVector[i]).get());

This should be uncheckedAppend.
Comment 13 Michal Pakula vel Rutka 2013-04-12 07:07:52 PDT
Created attachment 197846 [details]
applied andersca's comment
Comment 14 WebKit Commit Bot 2013-04-15 02:01:03 PDT
Comment on attachment 197846 [details]
applied andersca's comment

Clearing flags on attachment: 197846

Committed r148420: <http://trac.webkit.org/changeset/148420>
Comment 15 WebKit Commit Bot 2013-04-15 02:01:11 PDT
All reviewed patches have been landed.  Closing bug.