Bug 3618 - RTL runs drawn by CG not reversed properly
Summary: RTL runs drawn by CG not reversed properly
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-20 06:44 PDT by mitz
Modified: 2005-11-04 00:29 PST (History)
3 users (show)

See Also:


Attachments
testcase (295 bytes, text/html)
2005-06-20 06:46 PDT, mitz
no flags Details
Proposed fix (1.30 KB, patch)
2005-06-20 06:52 PDT, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2005-06-20 06:44:56 PDT
Summary: In the rare case that CG gets to draw an RTL run, it applies order-swapping to all but the last 
glyph in the run.

To reproduce: make sure "Use ATSUI For All Text" is off and open the testcase.

Expected: to see ?!* on the second line. (To get expected behavior, switch on Use ATSUI and reload, or 
open in Firefox).

Actual: see !*? on the second line.

Analysis: the order-swapping loops in _CG_drawRun:style:geometry start with the next-to-last glyph 
instead of the last one, so the last glyph doesn't move to the beginning as it should.
Comment 1 mitz 2005-06-20 06:46:17 PDT
Created attachment 2499 [details]
testcase
Comment 2 mitz 2005-06-20 06:52:54 PDT
Created attachment 2500 [details]
Proposed fix

Just changed (actually restored) the initial value of end in those three loops.
Comment 3 Darin Adler 2005-06-20 08:32:54 PDT
Comment on attachment 2500 [details]
Proposed fix

r=me