Closed Bug 380094 Opened 17 years ago Closed 17 years ago

make mousethrough more generally useful

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
mozilla1.9alpha5

People

(Reporter: toshok, Assigned: toshok)

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached patch first pass (obsolete) — Splinter Review
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.
Attached patch round twoSplinter Review
made nsFrame::GetMouseThrough non-virtual.
Attachment #264171 - Attachment is obsolete: true
Whiteboard: [checkin needed]
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
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
Status: NEW → RESOLVED
Closed: 17 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.
(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 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.
Status: RESOLVED → REOPENED
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.
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: