Closed Bug 331049 Opened 18 years ago Closed 18 years ago

Drop-down of RTL <select> with scrollbar and wide entry is cut off on the right side

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: uriber, Assigned: dbaron)

References

Details

(Keywords: regression, rtl, Whiteboard: [patch])

Attachments

(3 files)

When an RTL <select> control has more than 20 options, a scroll bar appears on the left of its drop-down box. If, in addition, one or more of the options are wider than the select control itself, then all options are cut off on the right side, by  an amount equal to the width of the scrollbar (it seems).

Also, the select highlight (when hovering an option) appears shifted to the right, leaving a white gap between it and the scrollbar.

this is a regression from bug 192767 / bug 96394 / bug 318116 (not yet sure which of them).
Attached file testcase
Attached image screenshot
I verified that this is a regression from bug 192767 (by backing out the patch locally).
Blocks: 192767
Reproduced on Linux: All/All
OS: MacOS X → All
Hardware: Macintosh → All
This could be related to bug 331052, even though they regressed at different times.
Attached patch patchSplinter Review
The bug here was that 0 is no longer the correct default value to assume when getting ::curpos, due to the translation that nsGfxScrollFrame does; we want the default x and y values to be zero, not the default curpos value.  List control frames (and thus comboboxes) are one of the rare cases where we don't have a scrollbox.  It was easier to fix this by moving the multiplication by mOnePixel into GetIntegerAttribute and renaming it GetCoordAttribute; I likewise renamed SetAttribute to SetCoordAttribute.

It was easier to debug once I made a testcase with a listbox instead of a combobox.

This *mostly* restores the status quo before the patch, although the existing bug of the long option being cut off by the vertical scrollbar is now different -- it's cut off on the left in rtl and on the right in ltr, rather than always being cut off on the right.  Probably that's an improvement.
Assignee: mozilla → dbaron
Status: NEW → ASSIGNED
Attachment #215946 - Flags: superreview?(roc)
Attachment #215946 - Flags: review?(roc)
Attachment #215946 - Flags: superreview?(roc)
Attachment #215946 - Flags: superreview+
Attachment #215946 - Flags: review?(roc)
Attachment #215946 - Flags: review+
Fix checked in to trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: