Closed Bug 410503 Opened 14 years ago Closed 14 years ago

Incorrect <li> bullets placement in RTL lists with text-align:justify

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9beta3

People

(Reporter: ehsan, Assigned: uriber)

References

()

Details

(Keywords: regression, rtl, testcase)

Attachments

(3 files)

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b3pre) Gecko/2008010220 Minefield/3.0b3pre

Please check the URL for this bug:
<http://www.mozillafirefox.ir/features.html>

The bullets of <li> items in the big list on that page are placed incorrectly.  The list in question is RTL.  The problem appears in the latest nightly, as well as beta 2, but Firefox 2.0.0.11 displays the page flawlessly.

I'm attaching a screenshot of the problem in the latest nightly.  Beta 2's screenshot is identical.
Flags: blocking1.9?
Attached file Reduced test case
This test case shows the problem to be caused by specifying different text-align values on the <ul> element in the RTL mode.  I have provided two sets of lists: short and long lists.  I've also provided a button to toggle the document direction between ltr and rtl modes.  The long lists demonstrate the problem better.

The problem seems to relate to the reflow of paragraphs as well: try to resize the window when viewing the test case and see how the bullets dance in the justify mode.

The behavior of LTR mode is identical to the behavior of Firefox 2, but the RTL mode behavior differs from that of Firefox 2 except for the text-align:right case.  Of course I suspect the behavior of Gecko 1.9 is correct here, except for the text-align:justify mode, but that's not something I can say for sure.
Keywords: testcase
(In reply to comment #1)
> The behavior of LTR mode is identical to the behavior of Firefox 2, but the RTL
> mode behavior differs from that of Firefox 2 except for the text-align:right
> case.  Of course I suspect the behavior of Gecko 1.9 is correct here, except
> for the text-align:justify mode, but that's not something I can say for sure.
> 

Yes, the bullets in the left- and center-aligned cases are now positioned correctly thanks to the fix for bug 400369.

The only problem I see is with text-align:justify, so modifying title accordingly.
Summary: Incorrect <li> bullets placement in RTL mode → Incorrect <li> bullets placement in RTL lists with text-align:justify
Attached patch patchSplinter Review
This should fix the justified case, which was regressed by bug 400369.
Assignee: nobody → uriber
Status: NEW → ASSIGNED
Attachment #295123 - Flags: superreview?(roc)
Attachment #295123 - Flags: review?(smontagu)
Blocks: 400369
OS: Windows Vista → All
Hardware: PC → All
Attachment #295123 - Flags: superreview?(roc) → superreview+
Attachment #295123 - Flags: review?(smontagu) → review+
Comment on attachment 295123 [details] [diff] [review]
patch

This is a trivial, low risk fix for a recent regression.
Attachment #295123 - Flags: approval1.9?
Comment on attachment 295123 [details] [diff] [review]
patch

Thanks for the patch, uriber!
Attachment #295123 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Uri can land himself... he has CVS access. :)
Keywords: checkin-needed
Checked in:

Checking in mozilla/layout/generic/nsLineLayout.cpp;
/cvsroot/mozilla/layout/generic/nsLineLayout.cpp,v  <--  nsLineLayout.cpp
new revision: 3.294; previous revision: 3.293
done
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: blocking1.9? → in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b3pre) Gecko/2008010414 Minefield/3.0b3pre

Verified on both the test case on this bug and the test URL <http://www.mozillafirefox.ir/features.html>.
Status: RESOLVED → VERIFIED
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
You need to log in before you can comment on or make changes to this bug.