Bug 50659 - [Chromium] Enable Chromium mac to display a context menu.
Summary: [Chromium] Enable Chromium mac to display a context menu.
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 17:23 PST by Chris Guillory
Modified: 2013-04-11 12:59 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.87 KB, patch)
2010-12-07 19:05 PST, Chris Guillory
no flags Details | Formatted Diff | Diff
Proposed Patch - Add WebView::showContextMenu(const WebAccessibilityObject&) (5.74 KB, patch)
2010-12-15 19:17 PST, Chris Guillory
levin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.