Closed Bug 971933 Opened 11 years ago Closed 11 years ago

overflow: hidden on fieldsets spills over

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30
Tracking Status
firefox29 --- fixed
firefox30 --- fixed

People

(Reporter: bugs, Assigned: MatsPalmgren_bugz)

References

()

Details

(Keywords: testcase)

Attachments

(3 files, 2 obsolete files)

http://m8y.org/tmp/testcase367.xhtml Encountered this with dl/dt/dd (sometimes) and table (always) under fieldsets. http://m8y.org/tmp/testcase367.png is a screenshot with the dl/dt/dd and tables spilling over on the actual site. Rendered correctly in IE9, Safari, Chrome and Opera 11
Oh, and also happened if display: inline-block was set, which I thought might possibly make it render the fieldset differently.
Does this only happen when there's a <legend>? If so, then this might be a dupe of (or at least strongly related to) bug 971655.
Depends on: 971655
http://m8y.org/tmp/testcase368.xhtml Legend removed. Seems so?
Attached file Testcase #2 (obsolete) —
I think the rendering of the inner frame (grey) is correct. It's just that it's placed wrong - it should overlap the lower half of the green area, i.e. the bottom padding. Alternatively, that the green area is too small and should be extended in this case so its bottom aligns with the grey area in the same way. Alternatively, that the green area should have its current size but be placed lower. I haven't investigated which makes the more sense in this case, or what other UAs do in edge cases like this.
I think it's unrelated to bug 971655 though, which is an abs.pos. issue only.
No longer depends on: 971655
Keywords: testcase
Is this a regression from bug 261037, or have we always rendered it like this?
FYI to mats, as view source thoughtfully highlights, that 2nd testcase is invalid HTML, no idea if it would trigger quirks. (this is the sort of thing that XHTML parsing would immediately warn you about ;) ) For some reason there's a closing tag called "height" in it :)
Oh, and WRT comment #5, while I have no idea as to internals of code, it does seem similar in that the area of overflow clipping seems identical to the area of the top/bottom/left/right 0 containing block, and both are offset by the label for some reason. Soo, internal area of the fieldset pushed down by the label. That seems like it might be the same cause, with the other bug just using position absolute to demo it.
Attached patch wip (obsolete) — Splinter Review
This seems to fix it for me, and a bunch of similar cases too...
Attached file Testcase #2
Attachment #8375478 - Attachment is obsolete: true
This is what Testcase #2 looks like with the patch applied. nemo, does this look like the correct rendering to you?
Flags: needinfo?(bugs)
O_o woooooah that screenshot and patch is making me dizzy. Comparing back and forth between my nightly and the screenshot I see slight differences, but knowing what the "correct" behaviour is is another matter :) I'd have a better idea if it was a screenshot of the original testcase ;) BTW, I loaded up your tons-o-fieldsets testcase in chromium and it did not render the same. Rendered rather oddly in fact. None of C6 had legends. Don't have IE9 handy at the moment to get a 2nd opinion. Could be chrome bugs.
Flags: needinfo?(bugs)
Assignee: nobody → matspal
Hm. IE9 agrees with Chrome on not showing the legend in C6. They have other rendering disagreements like in the display of the blue and grey areas, but they both clip the legend text leaving whitespace above it. I don't know what the correct behaviour is for your testcase, but I can say that 99% of the time I'd want to always see the legend. But, yeah, your screenshot doesn't agree too much w/ existing implementations. bz did say that there's no spec for fieldsets, so I guess that explains it :) Opera 11 BTW renders something totally different, and does display the legends in C6.
Attached patch fix+reftestSplinter Review
Attachment #8375927 - Attachment is obsolete: true
Attachment #8376369 - Flags: review?(roc)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Comment on attachment 8376369 [details] [diff] [review] fix+reftest [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 261037? User impact if declined: layout errors with overflow:hidden on <fieldset> Testing completed (on m-c, etc.): on m-c since 2014-02-15 Risk to taking this patch (and alternatives if risky): low risk String or IDL/UUID changes made by this patch: none
Attachment #8376369 - Flags: approval-mozilla-aurora?
Attachment #8376369 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: