Bug 111040 - Add new webkit API to invoke a context menu.
Summary: Add new webkit API to invoke a context menu.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Varun Jain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-27 22:32 PST by Varun Jain
Modified: 2013-02-28 11:13 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.03 KB, patch)
2013-02-27 22:33 PST, Varun Jain
no flags Details | Formatted Diff | Diff
Patch (2.96 KB, patch)
2013-02-28 10:21 PST, Varun Jain
no flags Details | Formatted Diff | Diff
Patch (2.96 KB, patch)
2013-02-28 10:41 PST, Varun Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Varun Jain 2013-02-27 22:32:32 PST
Add new webkit API to invoke a context menu.
Comment 1 Varun Jain 2013-02-27 22:33:29 PST
Created attachment 190656 [details]
Patch
Comment 2 WebKit Review Bot 2013-02-27 22:35:09 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 3 Adam Barth 2013-02-28 00:28:27 PST
Comment on attachment 190656 [details]
Patch

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

> Source/WebKit/chromium/public/WebView.h:409
> +    virtual void showContextMenu() = 0;

Should we add a comment saying that this command is directed at the current focus?

> Source/WebKit/chromium/src/WebViewImpl.cpp:3676
> +    if (!page() || !page()->focusController())

How can a page not have a focusController?  It looks like its created in the constructor and never cleared.

> Source/WebKit/chromium/src/WebViewImpl.cpp:3682
> +    Frame* focusedFrame = page()->focusController()->focusedOrMainFrame();
> +    if (focusedFrame)

You can combine these two lines.

> Source/WebKit/chromium/src/WebViewImpl.h:306
> +    virtual void showContextMenu() OVERRIDE;

None of these other methods have OVERRIDE.  Perhaps we should skip it here too?
Comment 4 Varun Jain 2013-02-28 10:21:25 PST
Created attachment 190749 [details]
Patch
Comment 5 Varun Jain 2013-02-28 10:21:39 PST
Comment on attachment 190656 [details]
Patch

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

>> Source/WebKit/chromium/public/WebView.h:409
>> +    virtual void showContextMenu() = 0;
> 
> Should we add a comment saying that this command is directed at the current focus?

Done

>> Source/WebKit/chromium/src/WebViewImpl.cpp:3676
>> +    if (!page() || !page()->focusController())
> 
> How can a page not have a focusController?  It looks like its created in the constructor and never cleared.

I had the same though but it was being checked in other places. Removed.

>> Source/WebKit/chromium/src/WebViewImpl.cpp:3682
>> +    if (focusedFrame)
> 
> You can combine these two lines.

Done

>> Source/WebKit/chromium/src/WebViewImpl.h:306
>> +    virtual void showContextMenu() OVERRIDE;
> 
> None of these other methods have OVERRIDE.  Perhaps we should skip it here too?

Done
Comment 6 Terry Anderson 2013-02-28 10:26:44 PST
Comment on attachment 190749 [details]
Patch

Previous patch had r+ from Adam Barth. Setting cq+.
Comment 7 WebKit Review Bot 2013-02-28 10:38:07 PST
Comment on attachment 190749 [details]
Patch

Rejecting attachment 190749 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-03', 'validate-changelog', '--non-interactive', 190749, '--port=chromium-xvfb']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

/mnt/git/webkit-commit-queue/Source/WebKit/chromium/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://webkit-commit-queue.appspot.com/results/16855119
Comment 8 Varun Jain 2013-02-28 10:41:13 PST
Created attachment 190756 [details]
Patch
Comment 9 WebKit Review Bot 2013-02-28 11:13:00 PST
Comment on attachment 190756 [details]
Patch

Clearing flags on attachment: 190756

Committed r144332: <http://trac.webkit.org/changeset/144332>
Comment 10 WebKit Review Bot 2013-02-28 11:13:04 PST
All reviewed patches have been landed.  Closing bug.