Closed Bug 300474 Opened 19 years ago Closed 19 years ago

[FIX] <SELECT> with the MULTIPLE attribute and <OPTGROUP> item don't display properly

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: okin7, Assigned: MatsPalmgren_bugz)

Details

(Keywords: testcase)

Attachments

(7 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

When displaying this code :

<select multiple="multiple">
    <optgroup label="Label">
        <option label="a">a</option>
        <option label="a">a</option>
        <option label="a">a</option>
    </optgroup>
</select>

The height of the widget is set to 3 rows although there is 4 rows in the box.
The width also is to small, as the scrollbar is not over the end of the label.

Reproducible: Always

Steps to Reproduce:
Attached file Shows the display bug (deleted) —
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.0 Branch
I'm also seeing this in the latest trunk build.
It seems to me that Mozilla doesn't look at the eventuel presence of an
<optgroup> here.
Status: UNCONFIRMED → NEW
Component: Layout → Layout: Form Controls
Ever confirmed: true
QA Contact: layout → layout.form-controls
Version: 1.0 Branch → Trunk
Assignee: nobody → mats.palmgren
Keywords: testcase
OS: Windows XP → All
Hardware: PC → All
Summary: <SELECT> with the MULTIPLE attribute and <OPTGROUP> item don't display properly → [FIX] <SELECT> with the MULTIPLE attribute and <OPTGROUP> item don't display properly
Attached file Testcase (deleted) —
Attached image Screenshot, IE6 (deleted) —
Attached image Screenshot, Opera 8.01 (deleted) —
Attached patch Patch rev. 1 (deleted) — Splinter Review
These two changes are not needed to fix this bug:
Removed an unused parameter from GetMaxOptionHeight().
Make sure GetNumberOfOptions() assigns the out parameter even if it fails.
Attachment #189490 - Flags: superreview?(bzbarsky)
Attachment #189490 - Flags: review?(bzbarsky)
Attached image Screenshot, SeaMonkey + Patch rev. 1 (deleted) —
Comment on attachment 189490 [details] [diff] [review]
Patch rev. 1

>Index: layout/forms/nsListControlFrame.cpp
>+      nsIPresShell* shell = aPresContext->GetPresShell();

I think you can safely use aPresContext->PresShell() and skip the null-check.

r+sr=bzbarsky with that.
Attachment #189490 - Flags: superreview?(bzbarsky)
Attachment #189490 - Flags: superreview+
Attachment #189490 - Flags: review?(bzbarsky)
Attachment #189490 - Flags: review+
Attached patch Patch rev. 2 (deleted) — Splinter Review
Right, fixed that.
Attachment #189533 - Flags: approval1.8b4?
Attachment #189533 - Flags: approval1.8b4? → approval1.8b4+
Checked in to trunk 2005-07-23 18:02 PDT

-> FIXED
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: