Open Bug 465900 Opened 16 years ago Updated 2 years ago

description tag doesn't respect max-height and/or overflow:hidden

Categories

(Core :: XUL, defect)

x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: marty, Unassigned)

References

Details

(Keywords: regression, testcase)

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.18) Gecko/20081029 Firefox/2.0.0.18
Build Identifier: 

Even though a max-height for a description tag (with multiline=true) is specified, the contents will still exceed this height. And this problem cannot be fixed with overflow-y: hidden;

This bug is new in FF 3.x - it seemed to work correctly in 2.x versions

Reproducible: Always

Steps to Reproduce:
1. Create a <description multiline="true"> and set a max-height in the stylesheet of a certain amount of pixels.
2. Fill the description-tag with content; put this between the opening and closing tag, like this: <description multiline="true">content</description> (don't use the value="" method)
3. Make sure the content is bigger then what fits given the max-height.
4. Optionally set overflow-y: hidden in the stylesheet - this doens't have any effect though
Actual Results:  
The contents spill over the border defined by the max-height.

Expected Results:  
In FF 2.x the contents that exceed the max-height were not shown. I expected the same behaviour in FF 3.x
I can understand though, that the contents outside this region are also shown - but in this case i would expect the overflow-y: hidden to prevent this from being shown.
This testcase shows the difference between how it was rendered in Firefox 2.x and how it is now rendered in Firefox 3.x
I would expect both to be the same and how it was done in Firefox 2.x
The bug here is really that overflow-y:hidden doesn't work.
Flags: blocking1.9.1? → wanted1.9.1+
Wrapping the block frame in an nsHTMLScrollFrame is easy enough. But it leads to some weirdness in the box/block interaction code, which is a real disaster area.
Attached patch fix (deleted) — Splinter Review
Here's a patch. I think it's a logical change, but I'm reluctant to land it because it changes other behaviour, and I'm afraid that will lead to a cascade of regressions as we try to patch around the completely broken box/block interaction. I'll attach a testcase in a moment.
Attached patch testcase (deleted) — Splinter Review
The patch sort-of regresses this testcase. On trunk the max-height does limit the element height to 50px, although we don't clip to overflow:hidden (and the width is not limited to 10px). With the patch, the element height becomes the height of a single line.
Another option here is to allow box-wrapped blocks to clip for overflow:hidden but not support overflow:scroll/auto. But that seems not really worth doing. I think I'd rather leave this until we have sane box/block interaction.
So, taking off wanted list.
Flags: wanted1.9.1+
Attached file overflowhide.html (deleted) —
Hi Robert: I am miss-understanding the issue? Please let me know if I can assist with testing this issue.
Version 	47.0.1
Build ID 	20160623154057
User Agent 	Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: