Closed Bug 247662 Opened 21 years ago Closed 17 years ago

selectbox with percentage value for css-property 'max-width' and nested inside a table

Categories

(Core :: Layout: Form Controls, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: webkocher, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 selectbox nested inside a table is not displayed or doesn't show all options when its css-property 'max-width' has a percentage value Reproducible: Always Steps to Reproduce: 1. nest a select inside a table 2. give the select a sufficent size for all options and a'max-width' style with a percentuage value 3. select an option and reload the page Actual Results: the selected option and all options above aren't displayed
Summary: selectbox with percentage value for css-property 'max-width' and nested inside a table → selectbox with percentage value for css-property 'max-width' and nested inside a table
Confirming bug, 2004-08-01-07 trunk Linux. Funny, if I shift-reload a few times the select disappears altogether, using DOM Inspector at that point shows a computed width of -4px (!) for the select
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Windows 2000 → All
I may be wrong, but I thought that percentage length values were relative to the containing element. See <http://www.w3.org/TR/REC-CSS2/syndata.html#percentage-units>. Since no width was provided for the second td in the second table, putting max-width:100% on the select group means that the maximum width of the select element is 100% of the td, which of course isn't anything since there is no width attribute and no other content in the td.
The first table is definitely a bug. The others are arguably correct. In particular, Grant's right about the second one: it's a recursive definition --- the max-content-width of the <select> is 100% of the table cell width, which is going to be the desired width of the <select>, but the desired width is constrained to be no more than the max-content-width + any border/padding. So there is no well defined rendering there.
In any case, this didn't work in FF 1.0, so this is not a regression, and we won't be fixing it for 1.8. dbaron's reflow refactoring might fix it.
First table got fixed by something in this range: http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=MozillaTinderboxAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-02-28+01&maxdate=2006-03-01+01&cvsroot=%2Fcvsroot The second got fixed (or at least changed behavior) by the reflow branch landing. Worksforme. We need to add testcases for this, though...
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: