Add new webkit API to invoke a context menu.
Created attachment 190656 [details] Patch
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 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?
Created attachment 190749 [details] Patch
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 on attachment 190749 [details] Patch Previous patch had r+ from Adam Barth. Setting cq+.
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
Created attachment 190756 [details] Patch
Comment on attachment 190756 [details] Patch Clearing flags on attachment: 190756 Committed r144332: <http://trac.webkit.org/changeset/144332>
All reviewed patches have been landed. Closing bug.