Closed Bug 102019 Opened 23 years ago Closed 18 years ago

single word on line placed incorrectly for justified right-to-left (RTL) text

Categories

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

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: waterson, Assigned: uriber)

Details

(Keywords: rtl, testcase)

Attachments

(4 files)

When flowing a line of justified, right-to-left text where only a single word can fit on the line, the word is placed flush left, instead of flush right. (Note that things work correctly in the case of the _last_ line flowed.)
Attached file test case (deleted) —
Keywords: testcase
Target Milestone: --- → Future
Status: NEW → ASSIGNED
Moving to bidi. Is this a dupe?
Assignee: waterson → nobody
Status: ASSIGNED → NEW
Component: Layout → Layout: BiDi Hebrew & Arabic
QA Contact: chrispetersen → layout.bidi
Summary: single word on line placed incorrectly for justified right-to-left text → single word on line placed incorrectly for justified right-to-left (RTL) text
I don't think this is a dupe, I don't recall seeing it before.
Attached patch patch (deleted) — Splinter Review
Assignee: nobody → uriber
Status: NEW → ASSIGNED
Attachment #229377 - Flags: superreview?(dbaron)
Attachment #229377 - Flags: review?(smontagu)
Comment on attachment 229377 [details] [diff] [review] patch I don't like the code duplication, especially since I suspect you should duplicate it again in the else of "if (!aShrinkWrapWidth)". (I don't know in what circumstances aAllowJustify and aShrinkWrapWidth can both be true). I would like it better to put a break after ApplyFrameJustification and remove the else from else if (NS_STYLE_DIRECTION_RTL ...
Attached patch Suggested modification (deleted) — Splinter Review
... like this. Uri and I couldn't reach agreement on IRC which version was clearer. At the bottom line, whichever version dbaron prefers has r=smontagu.
Attachment #229379 - Flags: superreview?(dbaron)
I think I prefer neither. Why not move the JUSTIFY case up to before the DEFAULT case, and then only break if justification was performed? Sorry to take so long to get to this.
Attached patch how 'bout this? (deleted) — Splinter Review
This is basically moving code, although I did wrap the overly long line, insert and remove the break statements, and change the comments.
Attachment #248331 - Flags: review?(smontagu)
Note also that aShrinkWrapWidth no longer exists post-reflow-branch.
Comment on attachment 248331 [details] [diff] [review] how 'bout this? That's great.
Attachment #248331 - Flags: review?(smontagu) → review+
Checked in to trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Attachment #229377 - Flags: superreview?(dbaron)
Attachment #229379 - Flags: superreview?(dbaron)
Flags: in-testsuite?
Attachment #229377 - Flags: review?(smontagu)
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: layout.bidi → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: