Closed Bug 375403 Opened 19 years ago Closed 19 years ago

Want more triggers for translucency support

Categories

(Core :: Web Painting, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

References

Details

Attachments

(2 files, 4 obsolete files)

Currently windows and popups are only translucent if their background colour is transparent and they aren't natively themed. I'd like to add extra conditions. Ones I've thought of so far are: a) Opacity < 1 b) RGBA background colour (A < 1 of course) c) non-zero border radius Unfortunately these tests have to be made at two places in the code, one in nsContainerFrame.cpp for windows and one in nsMenuPopupFrame.cpp for popups.
Can't we have a utility method used in both places?
Attached patch First draft (obsolete) — — Splinter Review
Assignee: roc → neil
Status: NEW → ASSIGNED
Attachment #259803 - Flags: superreview?(roc)
Attachment #259803 - Flags: review?(roc)
Can you define another nsLayoutUtils method, say HasNonZeroCoord(const nsStyleSides&), and use it here and from nsDisplayList.cpp? FrameHasTransparency returns true for frames with image backgrounds. Is that a good idea? I guess it's OK. Probably you should move the "if (aFrame->IsThemed())" check down below the border-radius check, since we should clip theme backgrounds to the border-radius even if we currently don't.
>FrameHasTransparency returns true for frames with image backgrounds. Is that a >good idea? I guess it's OK. It's not just OK, it's vital!
Attached patch Updated for comment 3 and bitrot (obsolete) — — Splinter Review
Attachment #259803 - Attachment is obsolete: true
Attachment #263449 - Flags: superreview?(roc)
Attachment #263449 - Flags: review?(roc)
Attachment #259803 - Flags: superreview?(roc)
Attachment #259803 - Flags: review?(roc)
You haven't shared HasNonZeroCoord with nsDisplayList.cpp...
Attached patch Really updated for comment 3... (obsolete) — — Splinter Review
Silly me, had different versions of the same patch in different trees...
Attachment #263449 - Attachment is obsolete: true
Attachment #264225 - Flags: superreview?(roc)
Attachment #264225 - Flags: review?(roc)
Attachment #263449 - Flags: superreview?(roc)
Attachment #263449 - Flags: review?(roc)
HasNonZeroSide should be shared as well. Sorry...
Attached patch More sharing (obsolete) — — Splinter Review
Attachment #264225 - Attachment is obsolete: true
Attachment #264225 - Flags: superreview?(roc)
Attachment #264225 - Flags: review?(roc)
IMHO this is starting to get out of hand...
Attachment #264352 - Flags: superreview?(roc)
Attachment #264352 - Flags: review?(roc)
Comment on attachment 264352 [details] [diff] [review] With extra nsContainerFrame cleanup mmm, just right :-)
Attachment #264352 - Flags: superreview?(roc)
Attachment #264352 - Flags: superreview+
Attachment #264352 - Flags: review?(roc)
Attachment #264352 - Flags: review+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Attached patch Missing link — — Splinter Review
Because noone noticed that the previous attachments were identical. These are the changes that were supposed to have been incorporated. I have provided them for completeness, in case you still want them.
Attachment #264351 - Attachment is obsolete: true
Attachment #264425 - Flags: superreview?(roc)
Attachment #264425 - Flags: review?(roc)
Attachment #264425 - Flags: superreview?(roc)
Attachment #264425 - Flags: superreview+
Attachment #264425 - Flags: review?(roc)
Attachment #264425 - Flags: review+
This might require manual tests (i.e. Litmus).
Flags: in-testsuite?
Flags: in-testsuite? → in-litmus?
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: