Closed
Bug 905687
Opened 12 years ago
Closed 4 years ago
Make nsComboboxDisplayFrame use their font height as their intrinsic height instead of the tallest option
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: mounir, Assigned: mounir)
References
Details
Attachments
(1 file)
|
5.66 KB,
patch
|
Details | Diff | Splinter Review |
This would allow pages that want to show different font for the <select> and the <option> and will fix the bug that the patch in bug 674443 produces.
Attachment #790825 -
Flags: review?(dbaron)
| Assignee | ||
Comment 1•12 years ago
|
||
How this would deal with options that are different sizes?
Consider, for example:
<select>
<option>One</option>
<option>Two</option>
<option style="font-size: 30px">Three</option>
</select>
There are more subtle cases of the same thing when the options
contain mixes of languages that require different fonts to render.
For example, a mix of Chinese and English at 16px can, depending on
vertical alignment, be taller than either alone, because you have to
add the larger ascent above the baseline (Chinese) to the larger
descent below the baseline (English).
Flags: needinfo?(mounir)
| Assignee | ||
Comment 3•12 years ago
|
||
I don't know for different languages but the idea of that patch is that we would not worry about the <option>'s font-size. The <option> list will be shown using the specified font-size but the <select>'s height will be based on its actual font-size (and font then).
Basically, if you do:
<select style="font-size: 12px;">
<option style="font-size: 2px;">foo</option>
<option style="font-size: 22px;">foo</option>
<option style="font-size: 42px;">foo</option>
</select>
It will show a select that will use a 12px font-size even if the option list will be showing various different font-size.
Does that make sense?
Flags: needinfo?(mounir)
Comment 4•4 years ago
|
||
We already implemented this idea, and Bug 1716212 fixed <select>'s auto height if its displayed <option> contains a mixes languages (the subtle case in comment 2).
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•