Closed Bug 513318 Opened 15 years ago Closed 15 years ago

visibility:collapse causes scrollbar issues for XUL elements

Categories

(Core :: Layout, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1
Tracking Status
status1.9.2 --- beta1-fixed
status1.9.1 --- .4-fixed

People

(Reporter: squib, Assigned: MatsPalmgren_bugz)

References

(Depends on 1 open bug)

Details

(Keywords: verified1.9.1, Whiteboard: [no l10n impact][tb3needed])

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080316 Ubuntu/8.04 (hardy) Firefox/3.0.13 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090826 Shredder/3.0b4pre Under normal circumstances, applying the CSS "visibility:collapse;" to a XUL element is functionally equivalent to "display:none;". However, under certain circumstances, the element still contributes to the height of the document for the purposes of scrolling. This also applies to setting the attribute "collapsed" to true. This only seems to happen when an element that wraps text is contained within an hbox, e.g.: <hbox> <label> stuff </label> </hbox> What's more, any elements within the label shown above will be laid out vertically for the purposes of calculating the object's height. This error doesn't occur with inner elements that don't wrap (e.g. <hbox><hbox>stuff</hbox></hbox> wouldn't cause this). Additionally, XBL elements inside the label do *not* contribute to the object's height. They work as you'd expect. Finally, none of this actually affects the layout of elements in the document, only the overall dimensions of the document/containing element. Reproducible: Always Steps to Reproduce: 1. Construct a XUL document like in the attachment Actual Results: A scrollbar appears when the visibility is set to "collapsed". Expected Results: No scrollbar.
Attached file Minimal test case (deleted) —
A test case showing the error in action, because a picture is worth 1000 words.
Blocks: 512036
No longer blocks: 512036
Blocks: 512036
I just talked to roc; he mentioned that he might have time to take a look at this in about a week, so I'm going to ping him then.
I'm seeing this on the testcase here, and I also experienced this in the duped bug. Confirmed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → Trunk
So pretty clearly we're reflowing the contents and not forcing the children's size and position to 0,0, which adds the contents to the overflow area for the frame. I think we need to just set the overflow area of visibility:collapsed XUL elements to empty. Mats, can you take this?
Version: Trunk → unspecified
Sure, I'll have a look...
Assignee: nobody → matspal
Whiteboard: [tb3needs]
For consideration when prioritizing, it would be super helpful if we could get this before Thunderbird 3 ships (currently expected to be early November or sooner) on the 1.9.1 branch.
Flags: blocking1.9.2?
Whiteboard: [tb3needs] → [no l10n impact][tb3needs]
Attached patch Patch rev. 1 (deleted) — Splinter Review
Attachment #400051 - Flags: review?(roc)
FYI, i tested Shredder w/ attachment 400051 [details] [diff] [review] applied, and it totally fixed the problem we're seeing. I'm eagerly awaiting it (on 1.9.1).
Attachment #400051 - Flags: approval1.9.2?
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Version: unspecified → Trunk
Blocks: 464499
Comment on attachment 400051 [details] [diff] [review] Patch rev. 1 a1.9.2=dbaron
Attachment #400051 - Flags: approval1.9.2? → approval1.9.2+
Please checkin to 1.9.2.
Keywords: checkin-needed
Attachment #400051 - Flags: approval1.9.1.4?
Blocks: 515587
Attachment #400051 - Flags: approval1.9.1.4? → approval1.9.1.4+
Comment on attachment 400051 [details] [diff] [review] Patch rev. 1 Approved for 1.9.1.4, a=dveditz
Thanks Mats :-)
Whiteboard: [no l10n impact][tb3needs] → [no l10n impact][tb3needed]
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P1
Verified for 1.9.1 with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.4pre) Gecko/20090929 Shiretoko/3.5.4pre using attached testcase.
Keywords: verified1.9.1
Depends on: 521607
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: