Bug 3618

Summary: RTL runs drawn by CG not reversed properly
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Darin Adler <darin>
Status: CLOSED FIXED    
Severity: Normal CC: bugs.mano, nirs, xslf
Priority: P2    
Version: 412   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
testcase
none
Proposed fix darin: review+

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