Cocoa widgets do not sent NS_MOUSE_ENTER/NS_MOUSE_EXIT events.
Comment on attachment 215904 [details] [diff] [review] fix v1.0 do the x/y coords need to be moved from bottom right to top left? otherwise, seems fine to me.
Created attachment 215987 [details] [diff] [review] fix v2.0 Cocoa sends enter/exit events for all views in a hierarchy, Gecko wants enter/exit for only the top-level views. That makes things really fairly complicated, the logic in this patch is a bit of a brain twister. This makes our behavior for NS_MOUSE_ENTER/EXIT match up with GTK2 and Windows. I'm going to test it a bit more tomorrow (I need to sleep!) before requesting review. This patch also fixes 330594.
Attachment #215904 - Attachment is obsolete: true
Created attachment 216038 [details] [diff] [review] fix v2.1 This is the same as the last patch, but includes fixes in the debug code. If you want to test this patch, just uncomment the NSLog statements in the patch.
Comment on attachment 216038 [details] [diff] [review] fix v2.1 Dropping my review request - I want to investigate something I discovered.
Created attachment 216102 [details] [diff] [review] nsChildView cleanup, v1.0 When looking through nsChildView.mm, I saw some existing stuff about mouse enter/exit, also the tracking rect stuff. I was curious about what that was doing, so I cancelled my review request until I understood it. I understand it now, I cleaned it up in this patch and I'm requesting review on my "fix v2.1" patch again. While I was looking around I found some unused/unnecessary variables. This patch removes them. We will no longer be supporting Mac OS X 10.2.x on the trunk, so I removed support for that from nsChildView as well. This is cleanup, I'd like to land it before the fix to this bug.
Created attachment 216103 [details] [diff] [review] nsChildView cleanup, v1.1 forgot to include some changes in the last patch
Comment on attachment 216038 [details] [diff] [review] fix v2.1 I've been looking at this code for a while now, to really understand. Instead of re-using mouseEntered and mouseExited for the messy mouse event logic of parent/subviews, how about creating a mouseDidEnterSubview and mouseDidExitSubview to handle those cases?
*** Bug 330594 has been marked as a duplicate of this bug. ***
Comment on attachment 216038 [details] [diff] [review] fix v2.1 Nice work! +static nsEventStatus sendMouseEvent(PRBool isTrusted, PRUint32 msg, nsIWidget *w, nsMouseEvent::reasonType aReason, + NSPoint localEventLocation, nsChildView* receiver) C/C++ functions should have a leading capital letter.
Attachment #216038 - Flags: review?(mark) → review+
Comment on attachment 216103 [details] [diff] [review] nsChildView cleanup, v1.1 Thanks for separating the cleanup. r=me on both.
Attachment #216103 - Flags: review?(mark) → review+
Comment on attachment 216038 [details] [diff] [review] fix v2.1 r=me conditional on isDescendantOf: check or tests that show it's unneded, as discussed.
Created attachment 216653 [details] [diff] [review] fix v2.2 Fix another edge case Mark caught, cleanup. This was checked in.
Attachment #216038 - Attachment is obsolete: true
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
"nsChildView cleanup, v1.1" was also landed
landed followup to set sLastViewEntered to nil when sLastViewEntered gets released/destroyed
Duplicate of this bug: 374926
You need to log in before you can comment on or make changes to this bug.