Closed Bug 453617 Opened 16 years ago Closed 16 years ago

right-click on windowless plugins shows Firefox context menu

Categories

(Core Graveyard :: Plug-ins, defect)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: otte, Assigned: masayuki)

References

()

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9.0.1) Gecko/20080528 Epiphany/2.22 Firefox/3.0
Build Identifier: 

Right-clicking on a windowless plugin causes the right click to be handled by both Mozilla and the plugin in certain circumstances, while it should only be handled by the plugin.

Reproducible: Always

Steps to Reproduce:
1) set dom.event.contextmenu.enabled to false in your configuration
2) install swfdec-mozilla 0.7.x or newer (likely any other windowless plugin such as Adobe's Flash 10 beta will also work)
3) open http://www.comedycentral.com/shows/the_colbert_report/index.jhtml (most other sites don't exhibit this problem)
4) right-click on the big Flash in the centre (likely a huge gray rectangle with a play button)
Actual Results:  
Two context menus pop up: The one from Flash is below Mozilla's

Expected Results:  
Only the Flash context menu shows up.

This had been filed as https://bugs.launchpad.net/ubuntu/+source/ubufox/+bug/242223 and also contains a screenshot of the problem.

I think this bug is Linux-specific, as I've never noted any similar issues on Windows (I'm having that preference set to false there).

I'm setting this to major because there's a GUI to change this preference (Content / Advanced Javascript settings / Disable or replace context menus)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch Patch v1.0 (obsolete) — Splinter Review
We should not recover the context menu event on plug-ins even if "dom.event.contextmenu.enabled" is false.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Attachment #344801 - Flags: review?(enndeakin)
Version: unspecified → Trunk
(In reply to comment #1)
> Created an attachment (id=344801) [details]
> Patch v1.0
> 
> We should not recover the context menu event on plug-ins even if
> "dom.event.contextmenu.enabled" is false.

I tried this patch.
It seems good for me.
Thanks.
Comment on attachment 344801 [details] [diff] [review]
Patch v1.0

>+          type == nsIObjectLoadingContent::TYPE_PLUGIN) {
>+        eventEnabled = PR_TRUE;
>+      }

It would be clearer if this just returned directly instead of setting eventEnabled.
Attached patch Patch v1.1 (obsolete) — Splinter Review
Attachment #344801 - Attachment is obsolete: true
Attachment #344899 - Flags: review?(enndeakin)
Attachment #344801 - Flags: review?(enndeakin)
Attached patch Patch v1.2Splinter Review
oops, this is better.
Attachment #344899 - Attachment is obsolete: true
Attachment #344900 - Flags: review?(enndeakin)
Attachment #344899 - Flags: review?(enndeakin)
Attachment #344900 - Flags: review?(enndeakin) → review+
Attachment #344900 - Flags: superreview?(neil)
Attachment #344900 - Flags: superreview?(neil) → superreview+
Comment on attachment 344900 [details] [diff] [review]
Patch v1.2

>+          type == nsIObjectLoadingContent::TYPE_PLUGIN) {
This is only true for a genuine plugin, right? Is it worth removing the nsPluginDOMContextMenuListener in nsObjectFrame.cpp and just using code here to block context menus on plugins? Hmm, I guess that doesn't work for embedders.
(In reply to comment #6)
> (From update of attachment 344900 [details] [diff] [review])
> >+          type == nsIObjectLoadingContent::TYPE_PLUGIN) {
> This is only true for a genuine plugin, right? Is it worth removing the
> nsPluginDOMContextMenuListener in nsObjectFrame.cpp and just using code here to
> block context menus on plugins? Hmm, I guess that doesn't work for embedders.

landed the patch. I'll check your suggestion after I go back to my town.
oops, sorry for the spam.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: