full page mac plugin mousedown event handling broken

VERIFIED FIXED in mozilla0.9.2

Status

()

Core
Plug-ins
P1
critical
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: sean echevarria, Assigned: Peter Lubczynski)

Tracking

Trunk
mozilla0.9.2
PowerPC
Mac System 9.x
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [need sr= a=], URL)

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
full page plugins on mac get 2 mousedown events when they should only get 1.  
Possible cause (?): nsPluginViewer.cpp does not translate 
nsEventStatus_eConsumeNoDefault to NS_ERROR_FAILURE like nsObjectFrame.cpp does 
in nsPluginInstanceOwner::MouseDown.

To test, (requires Beatnik player http://www.beatnik.com/to/?player ), load 
http://www.beatnik.com/software/documentation/music_object34/music/trance.rmf.  
A single click in the scope should switch the display from a waveform scope to 
voice meters.  The player is getting the mousedown twice, so it switches to 
from scope to meters back to scope.  Likewise with green/red mute button on the 
top right.
(Reporter)

Comment 1

17 years ago
assigning to Peter.
Assignee: av → peterlubczynski
(Assignee)

Comment 2

17 years ago
This important and should be easy to fix.
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9
(Assignee)

Comment 3

17 years ago
Looks like this may be a little harder to fix as events in nsPluginViewer come 
directly from the view system whereas events in nsObjectFrame come from the DOM. 

I'm starting a fresh pull on my Mac to debug why this event doesn't get 
consumed.
(Assignee)

Comment 4

17 years ago
I put some printf's in and it looks like we are doing the right thing. I'm 
getting:

NS_MOUSE_ACTIVATE
NS_MOUSE_LEFT_BUTTON_DOWN
NS_MOUSE_LEFT_BUTTON_UP

Am I missing something? I tested with a PDF file. I'll double check with Beatnik 
 later before marking WFM.

Moving to Mozilla 1.0.
Target Milestone: mozilla0.9 → mozilla1.0
(Reporter)

Comment 5

17 years ago
I did a pull this morning and still see the same behavior.  Also tested with 
full page Flash and see similar problems.  Rt-click on flash content and select 
Zoom In.  The Flash plugin does 2 zoom ins.
(Assignee)

Comment 6

17 years ago
-->mozilla 0.9.1
Target Milestone: mozilla1.0 → mozilla0.9.1

Updated

17 years ago
Severity: normal → critical
Keywords: nsbeta1
Priority: P3 → P1

Updated

17 years ago
Blocks: 74980

Comment 7

17 years ago
Moving to m0.9.2
Target Milestone: mozilla0.9.1 → mozilla0.9.2
(Assignee)

Comment 8

17 years ago
Hey Brian, if you have some spare time, can you look at this?
(Assignee)

Comment 9

17 years ago
Confirming and accpeting...this bad an needs to be fixed for mozilla 0.9.2

The problem here is that in nsObjectFrame::Destroy, mInstanceOwner has a 
refcount of 4 but it's instance is blown away. The vtable is bad. Need to figure 
out some way to be sure we have a valid instance in the owner.
Keywords: crash, mozilla0.9.2
(Assignee)

Comment 10

17 years ago
wrong bug, sorry for the SPAM.
(Assignee)

Updated

17 years ago
Keywords: crash, mozilla0.9.2, nsbeta1

Comment 11

17 years ago
Ok, what's going on here is that nsMacEventHandler is sending nsPluginViewer an 
NS_MOUSE_ACTIVATE event followed by a mouse down event. The plugin viewer, which 
is looking for the Windows translated NS_PLUGIN_EVENT, blindly passes both events 
to the plugin as mouse clicks.

The attached patch fixes the double events on Mac and attemps to set the focus on 
other platforms as well.

Comment 12

17 years ago
Created attachment 37261 [details] [diff] [review]
Patch to eliminate double mouse clicks on Mac
(Assignee)

Updated

17 years ago
Keywords: patch
Whiteboard: [fix-in-hand]
(Assignee)

Comment 13

17 years ago
r=peterl
Whiteboard: [fix-in-hand] → [need sr= a=]

Comment 14

17 years ago
sr=attinasi

Updated

17 years ago
Blocks: 83989

Comment 15

17 years ago
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
(Assignee)

Comment 16

17 years ago
Patch checked in, marking FIXED:

new revision: 1.57; previous revision: 1.56
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 17

17 years ago
this no longer happens. verif  on mac trunk 0619.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.