Closed Bug 248029 Opened 20 years ago Closed 20 years ago

XUL text with right-to-left text in mixed languages renders wrong

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: smontagu, Assigned: smontagu)

Details

Attachments

(3 files, 1 obsolete file)

I came across this testing bug 91312. With or without the patch, tooltips
containing a right-to-left override character render incorrectly.
Attached file testcase (obsolete) —
Summary: tooltip with RLO renders wrong → XUL text with RLO renders wrong
Attached file testcase
Opening the testcase in a tab and comparing the tab title with the header shows
that the bug is in any XUL text.
Attachment #151408 - Attachment is obsolete: true
It gets worse... Most of the tooltips in this testcase are displayed wrong even
with Ilya's patch from bug 91312.

The good news is that I have a handle on the problem: CalculateCharType() in
nsBidiPresUtils::RenderText needs to scan the text backwards when level is odd.
I think that will solve all the issues.
Summary: XUL text with RLO renders wrong → XUL text with right-to-left text in mixed languages renders wrong
Attached patch patchSplinter Review
Attachment #152448 - Flags: superreview?(roc)
Attachment #152448 - Flags: review?(roc)
Comment on attachment 152448 [details] [diff] [review]
patch

I don't understand this code very well, but the comment and code make sense.
Attachment #152448 - Flags: superreview?(roc)
Attachment #152448 - Flags: superreview+
Attachment #152448 - Flags: review?(roc)
Attachment #152448 - Flags: review+
Fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
This commit have added a warning on brad TBox:

+layout/base/src/nsBidiPresUtils.cpp:1053
+ `nscoord xEndRun' might be used uninitialized in this function
That warning sounds bogus to me. xEndRun is initialized and used inside two
different |if (level & 1)|, and level can't change between the two.
Ilya, this is the bug I mentioned to you on Friday. Can you verify that the bug
is fixed on Linux?
Indeed fixed (Linux 20040821).
Status: RESOLVED → VERIFIED
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: