Note: There are a few cases of duplicates in user autocompletion which are being worked on.

make mousethrough more generally useful




10 years ago
10 years ago


(Reporter: Chris Toshok, Assigned: Chris Toshok)


Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)



(1 attachment, 1 obsolete attachment)



10 years ago
mousethrough would be extremely useful in more cases than it's used now.  Imagine translucent divs which overlay the actual user interface without keeping the user from interacting with that interface.

Comment 1

10 years ago
Created attachment 264171 [details] [diff] [review]
first pass

Move the mousethrough handling up to nsFrame from ns{Leaf}BoxFrame, and compute it when we need it instead of updating it only when the attribute is changed (and stuffing the result in an instance variable).
Comment on attachment 264171 [details] [diff] [review]
first pass

+  virtual PRBool GetMouseThrough() const;

This does not need to be virtual.

Post a new version of the patch with that change, then mark this [checkin needed] and get someone to land it.
Attachment #264171 - Flags: superreview+
Attachment #264171 - Flags: review+
Actually, this is slightly annoying because it means if you set mousethrough on the root element then event targeting becomes O(N^2) in the depth of the frame tree. But I don't think that's worth worrying about.

Comment 4

10 years ago
Created attachment 264208 [details] [diff] [review]
round two

made nsFrame::GetMouseThrough non-virtual.
Attachment #264171 - Attachment is obsolete: true


10 years ago
Whiteboard: [checkin needed]

Comment 5

10 years ago
Out of interest, can you describe in plain words what this patch changes for the developer? Is this something that needs changes in the documentation? Can this be tested automatically via mochitest?
Assignee: nobody → toshok
Target Milestone: --- → mozilla1.9alpha5

Comment 6

10 years ago
Checked in, but I'm still interested in the answers to the above questions.

mozilla/layout/generic/nsFrame.cpp              3.730
mozilla/layout/generic/nsFrame.h                3.266
mozilla/layout/xul/base/src/nsBoxFrame.cpp      1.328
mozilla/layout/xul/base/src/nsBoxFrame.h        1.115
mozilla/layout/xul/base/src/nsLeafBoxFrame.cpp  1.61
mozilla/layout/xul/base/src/nsLeafBoxFrame.h    1.29
Last Resolved: 10 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Why is this an attribute rather than a CSS property?  I really don't like attribute handling in frames, and adding a proprietary attribute to all languages without any prefixing seems pretty extreme.
That said, SVG already defines a CSS property for this:
(Although the default value for pointer-events doesn't really match the default value we'd want for non-SVG content for compatibility, which is 'visible' rather than 'visiblePainted'.  But we could work around that with a rule in svg.css, I think.)
(Actually, we'd have to work around it with a new value (-moz-auto?) since it's inherited.)
I filed bug 380573 on that.
I think we should back this patch out, since I think adding a new attribute to every element in every namespace is something we should be very hesitant to do.  (As far as I know, this is the first time we've done it, although we discussed doing it for 'id'.)
(Well, the first time we've done it for things other than elements with XUL display types.)
OK sure. I'll back it out when the tree reopens.
Backed out.
Resolution: FIXED → ---
So, as I said above (and I think in email as well), I don't think we want to do this -- I'd vastly prefer the approach in bug 380573.  Sorry for all the confusion here.
Last Resolved: 10 years ago10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.