Closed
Bug 380062
Opened 18 years ago
Closed 18 years ago
Uneven justification with new textframe when multiple text runs on one line
Categories
(Core :: Graphics, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: smontagu, Assigned: smontagu)
References
Details
Attachments
(3 files)
67.32 KB,
image/png
|
Details | |
758 bytes,
text/html
|
Details | |
1.29 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
This is hard to describe in words, but I hope the attached screenshot will make it clear. When there is only one text run on a line, justification spaces are added evenly across the line, but when there is more than one (because of a font change or a change of direction in bidirectional text) all the justification spaces are added between text runs creating an uneven effect.
Assignee | ||
Comment 1•18 years ago
|
||
Assignee | ||
Comment 2•18 years ago
|
||
This is caused by the condition
if (!(mFrame->GetStateBits() & TEXT_END_OF_LINE))
return;
at the beginning of PropertyProvider::FindEndOfJustificationRange() http://mxr.mozilla.org/seamonkey/source/layout/generic/nsTextFrameThebes.cpp#2135
As it stands, that is clearly wrong, but I don't know if we want to just remove it or add some other condition to cover the case that is failing here (e.g. the first frame on the second and fourth lines in the screenshot). Roc, can you advise?
FindEndOfJustificationRange should return the end of the text when the frame is not at the end of the line. So that END_OF_LINE check should move below the call to SetOriginalOffset that's setting aIter to the end of the text.
Assignee | ||
Comment 4•18 years ago
|
||
Yeah, that works.
Assignee: nobody → smontagu
Status: NEW → ASSIGNED
Attachment #264161 -
Flags: superreview?(roc)
Attachment #264161 -
Flags: review?(roc)
Attachment #264161 -
Flags: superreview?(roc)
Attachment #264161 -
Flags: superreview+
Attachment #264161 -
Flags: review?(roc)
Attachment #264161 -
Flags: review+
You seem to have checked this in ... thanks!
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 6•18 years ago
|
||
An idea for how to test this would be to do a not-equals test between:
- a single justified line of text with two different text runs, each
containing whitespace
- the same two text runs, except floated left and floated right
If the floating is done correctly, I *think* this would produce the same rendering with the bug in effect but would not if the bug were not in effect.
Flags: in-testsuite?
Updated•18 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•