Closed Bug 84681 Opened 25 years ago Closed 25 years ago

All full-page plug-ins recieve DOUBLE key & context menu events on Mac

Categories

(Core Graveyard :: Plug-ins, defect, P1)

PowerPC
Mac System 9.x

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.3

People

(Reporter: eric.carlson, Assigned: peterlubczynski-bugs)

References

()

Details

(Keywords: regression, Whiteboard: [PDT+])

Attachments

(2 files)

A plug-in's NPP_HandleEvent proc is called with two mouseDown events for each actual mouse click. This makes it impossible to start a movie in the QuickTime plug-in by clicking on the controller's play button because the first click starts it but the second click stops it again. The same build of the QT plug-in does not exhibit this behavior in NN 4.7 or IE 5.5
Note related bug 75582
this is still happening..0626 branch probable testcase here http://slip/shrir/b.swf Right click inside the flash movie and click on 'Zoom In' and observe that movie zooms in twice...( the B gets bigger two times) cc:peter.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This bug is back...ug! Reassign to myself and nominate but I can't get to it till the end of the week and the soonest.
Assignee: av → peterlubczynski
Priority: -- → P1
Whiteboard: [rtm stopper]
Target Milestone: --- → mozilla0.9.2
The bug as described by Eric WFM on today's trunk pull using http://www.apple.com/hardware/ads/ibook-middle_seat.html as a test case. Movie controller functions as expected. The fix was checked in to the trunk via bug 75582 on 6/19. Is there a branch split before 6/19 where this code doesn't exist? I can, reproduce the double zooming bug with shrir's test case. As I (sort of) noted in bug 61955 on 6/12... we are, in essence, double posting control (right) clicks. We dispatch the mouse event to the plugin and then, if it's a control (right) click, we dispatch an NS_CONTEXTMENU message to it also.
pushing out. 0.9.2 is done. (querying for this string will get you the list of the 0.9.2 bugs I moved to 0.9.3)
Target Milestone: mozilla0.9.2 → mozilla0.9.3
clearing rtm stopper
Whiteboard: [rtm stopper]
Okay, now I understand this: Additional Comments From Brian Nesse 2001-06-27 11:43 This one slipped through the covers, looks like rtm stopper was removed, trying again with a nomination and a better explaination of the problem: Basically, looks like a this was already fixed for embedded plugins and not full-page plugins as I can reproduce with today's branch. The likley reason for this problem is code was forgotten to be added to the full-page case of nsPluginInstanceOwner in nsPluginViewer.cpp. It appears the fix is already in nsPluginInstanceOwner in nsObjectFrame.cpp (embedded case) and just needs to be migrated. I'll investigate closer, but I don't think it should be hard to fix and should be low risk. How bad is this? The problem is more visible in Acrobat because that plugin is used more often in a full-page case. In fact, it makes it kind of hard to even use Acrobat because each key stroke or mouse click results in them repeating once.
Status: NEW → ASSIGNED
Keywords: regression
Summary: plug-in recieves 2 mousedown events for each click → plug-in recieves 2 mousedown and keydown events
Whiteboard: PDT
Cleaning things up a bit and attaching a much better testcase that much better shows this problem. Yup, this looks like it can be fixed with coyping the missing lines from the nsObjectFrame.cpp version of nsPluginInstanceOwner::ProcessEvent() to the full page version in nsPluginViewer.cpp. I seem to have the keyboard events fixed, and I'll see about the mouse ones tomorrow.
Summary: plug-in recieves 2 mousedown and keydown events → All full-page plug-ins recieve DOUBLE mouse and key events on Mac
Whiteboard: PDT → [PDT][fix-in-hand]
Marking PDT+. You're a one-in-three winner, Peter, congratulations!
Whiteboard: [PDT][fix-in-hand] → [PDT][fix-in-hand]PDT+
It looks like just trapping the NS_KEY_PRESS NS_CONTEXTMENU_MESSAGE_START seems to make both the typing and context menu work. Looks like mouse events are being sent correctly, with a MOUSE_DOWN and MOUSE_UP. Could I get some reviews?
Whiteboard: [PDT][fix-in-hand]PDT+ → [PDT+][SEEKING REVIEWS]
Peter, you note that this fix is achieved by taking the fix installed in the nsObjectFrame PluginInstanceOwner::ProcessEvent and moving it to the nsPluginViewer PluginInstanceOwner::ProcessEvent. Comparing these two however they seem to have very little in common, including the KEY_PRESS/CONTEXTMENU patch. if ((event == NULL) || (event->what == nullEvent) || (anEvent.message == NS_FOCUS_EVENT_START) || (anEvent.message == NS_BLUR_CONTENT) || (anEvent.message == NS_MOUSE_MOVE) || (anEvent.message == NS_MOUSE_ENTER)) { vs. if (event == NULL || event->what == nullEvent || anEvent.message == NS_KEY_PRESS || anEvent.message == NS_CONTEXTMENU_MESSAGE_START) { I'm confused... What am I missing here?
Right, as I discovered when I looked closer, it wasn't quite the same. But, looks full-page plugins are a bit different. Including these: NS_GOTFOCUS NS_LOSTFOCUS NS_MOUSE_ENTER caused the URL bar to stop working! We don't want that. Besides, it's the keyboard and context menu that's goofy and I havn't found any harm yet in adding just those two lines in my testing.
rephrasing...
Summary: All full-page plug-ins recieve DOUBLE mouse and key events on Mac → All full-page plug-ins recieve DOUBLE key & context menu events on Mac
Whiteboard: [PDT+][SEEKING REVIEWS] → [PDT+][SEEKING SUPER REVIEW]
oops, wrong bug....very sorry for the SPAM...
Whiteboard: [PDT+][SEEKING SUPER REVIEW] → [PDT+]
Granted the patch works great. r = bnesse. I guess maybe my question might be better phrased as "why aren't these 2 items being checked in the nsObjectFrame version?" or maybe "Did I fix this the wrong way when I did this for the embedded plugin?" ;) As I recall my patch took a different tact...something about eating focus events IIRC.
Whiteboard: [PDT+] → [PDT+][SEEKING SUPER REVIEW]
sr=blizzard
Patch in both the TRUNK and the BRANCH, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: [PDT+][SEEKING SUPER REVIEW] → [PDT+]
verif using Eric Carlson's testcase on mac branch build 0718. adding 'vtrunk ' for trunk verification
Keywords: vtrunk
v
Status: RESOLVED → VERIFIED
verif on trunk 0801 mac. removing keyword 'vtrunk'
Keywords: vtrunk
Attached file edittext4.swf —
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: