Closed Bug 314879 Opened 19 years ago Closed 19 years ago

[FIX]Remove QIs to nsIDOMHTMLSelectElement for adding/removing the dummy frame

Categories

(Core :: Layout, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

()

Details

Attachments

(1 file)

See discussion in bug 313496
Testcase in URL field shows that we can get the same effect with a min-width style rule...
Priority: -- → P2
Summary: Remove QIs to nsIDOMHTMLSelectElement for adding/removing the dummy frame → [FIX]Remove QIs to nsIDOMHTMLSelectElement for adding/removing the dummy frame
Target Milestone: --- → mozilla1.9alpha
Same thing with listboxes:

data:text/html,<select size=10></select><select size=10 style="min-width:2.5em"><option style="display:none"></select>
Attached patch Proposed patchSplinter Review
Summary of changes:

1)  Remove dummy select stuff completely
2)  Change the code that calculates a height for something like <select size="10"> to use the <select>'s font if there are no usable options.  This makes select heights happy.
3)  Make the code that draws the focus outline do the same thing to determine the height of the focus rect when there are no child frames.
4)  Add a rule to forms.css that sets a width on empty selects.  I decided that this was better than setting a min-width, since doing it this way plays nice with author style sheets setting all three of width, min-width, max-width.

This setup is not dynamic on option removal/addition (unlike what we used to have) because the :empty selector is not dynamic, but that's something I think we should fix by fixing :empty.
Attachment #201723 - Flags: superreview?(dbaron)
Attachment #201723 - Flags: review?(dbaron)
Blocks: 313496
Attachment #201723 - Flags: superreview?(dbaron)
Attachment #201723 - Flags: superreview+
Attachment #201723 - Flags: review?(dbaron)
Attachment #201723 - Flags: review+
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Depends on: 315264
Depends on: 325321
Depends on: 362995
Blocks: 240470
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: