Closed Bug 204531 Opened 22 years ago Closed 22 years ago

rtl selectbox appears empty (probably css "width" related)

Categories

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

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: neokuwait, Assigned: roc)

References

()

Details

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

Attachments

(2 files)

Gecko/20030429 The rtl select box on the 2nd line in URL is empty. The only exception is the initial (or first) option. It is present inside the selectbox but NOT in the white box that shows the full list of available options. This bug is not reproducible on older builds (e.g. 20030407) On a side note, The url is a testcase from Bug 203353. 1. go to URL 2. rtl select box on the 2nd line has zero elements
roc, this sounds like you. :(
Yep. Constrained-width RTL comboboxes are broken.
Assignee: mkaply → roc+moz
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Note that my change did fix one RTL bug: scrollbars now appear on the left side of the dropdown, when they appear at all.
Attached patch fixSplinter Review
This patch fixes two bugs. The main thing it does is remove the BIDI hack that reflows the scrollframe with a hacked width for RTL listboxes/comboboxes. I'm not sure what that was for, since it's not commented, but it does not seem to be necessary, and removing it fixes the bug. Certainly nsGfxScrollFrame is more Bidi friendly than nsScrollFrame ever was, plus the testcases look good. Perhaps smontagu can tell me why this code was there in the first place? This patch also fixes a small bug where borders and padding were sometimes not being included in the desired size for the listbox/combobox dropdown. This shows up in the "constrained width" comboboxes in the testcase I'm about to attach.
Attached file testcase
This is like the previous testcase (which was excellent, thanks!) but adds listbox versions of all the tests.
Attachment #123238 - Flags: superreview?(dbaron)
Attachment #123238 - Flags: review?(smontagu)
I'm *guessing* that BIDI code was supposed to move RTL content to the left when a vertical scrollbar was added by nsScrollFrame. I have no idea why that was needed. It's certainly not needed now.
Comment on attachment 123238 [details] [diff] [review] fix >+ // The nsGfxScrollFrame::Reflow adds border and padding to the You could drop the "The " while you're reformatting this.
Attachment #123238 - Flags: superreview?(dbaron) → superreview+
Comment on attachment 123238 [details] [diff] [review] fix Originally we needed the extra reflow to align the items correctly in right-to-left select boxes, plus what you said about adjusting for the scrollbar. If it's now unnecessary, fine.
Attachment #123238 - Flags: review?(smontagu) → review+
Comment on attachment 123238 [details] [diff] [review] fix without this patch, RTL (e.g. Hebrew) comboboxes with constrained width are totally horked.
Attachment #123238 - Flags: approval1.4?
Attachment #123238 - Flags: approval1.4? → approval1.4+
This was checked in a while ago
Status: NEW → RESOLVED
Closed: 22 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: