Bug 50659

Summary: [Chromium] Enable Chromium mac to display a context menu.
Product: WebKit Reporter: Chris Guillory <ctguil>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: cfleizach, darin, fishd, schenney, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Proposed Patch - Add WebView::showContextMenu(const WebAccessibilityObject&) levin: review-

Description Chris Guillory 2010-12-07 17:23:48 PST
This is needed to support the ShowMenu action on Chromium mac.
http://code.google.com/p/chromium/issues/detail?id=65808
Comment 1 Chris Guillory 2010-12-07 19:05:33 PST
Created attachment 75860 [details]
Patch
Comment 2 Chris Guillory 2010-12-07 19:07:07 PST
Chromium WebKit API change.
Comment 3 Chris Guillory 2010-12-15 19:17:24 PST
Created attachment 76728 [details]
Proposed Patch - Add WebView::showContextMenu(const WebAccessibilityObject&)
Comment 4 WebKit Review Bot 2010-12-15 19:19:23 PST
Attachment 76728 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'WebKit/chromium/ChangeLog', u'WebKit/chromium/public/WebAccessibilityObject.h', u'WebKit/chromium/public/WebView.h', u'WebKit/chromium/src/WebAccessibilityObject.cpp', u'WebKit/chromium/src/WebViewImpl.cpp', u'WebKit/chromium/src/WebViewImpl.h']" exit_code: 1
WebKit/chromium/src/WebViewImpl.cpp:1923:  Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 chris fleizach 2010-12-15 22:00:07 PST
Comment on attachment 76728 [details]
Proposed Patch - Add WebView::showContextMenu(const WebAccessibilityObject&)

how come this can't call into the method in AccessibilityObject to show the context menu?
Comment 6 Darin Fisher (:fishd, Google) 2010-12-16 09:21:27 PST
Comment on attachment 76728 [details]
Proposed Patch - Add WebView::showContextMenu(const WebAccessibilityObject&)

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

> WebKit/chromium/public/WebView.h:278
> +    

nit: avoid adding lines with just spaces

> WebKit/chromium/public/WebView.h:282
> +    virtual void showContextMenu(const WebAccessibilityObject& obj) = 0;

nit: the API header should not refer to implementation details, especially not
things in WebCore.  WebCore could change and no one would know to update this
comment.  it also doesn't help someone use the API correctly.

I think it might be more useful API-wise to generalize this method.  You could
generalize it like this:

  virtual void showContextMenu(const WebNode&, const WebPoint& position);

But, perhaps it would be better to create a sibling to WebNode::simulateClick:

  WEBKIT_API void simulateContextMenu();

Perhaps you should implement it using Node::dispatchSimulatedMouseEvent?  I'm
not certain about that though.
Comment 7 David Levin 2011-01-03 08:59:34 PST
Comment on attachment 76728 [details]
Proposed Patch - Add WebView::showContextMenu(const WebAccessibilityObject&)

r- based on comments from Darin and stylebot issue.
Comment 8 Stephen Chenney 2013-04-11 12:59:07 PDT
I have to assume this has been dealt with by now.