Bug 3633 - Layout order of bidi level runs is incorrect
Summary: Layout order of bidi level runs is incorrect
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
Depends on:
Reported: 2005-06-21 05:38 PDT by mitz
Modified: 2005-11-04 00:30 PST (History)
1 user (show)

See Also:

testcase (663 bytes, text/html)
2005-06-21 05:41 PDT, mitz
no flags Details
Proposed fix (523 bytes, patch)
2005-06-21 05:55 PDT, mitz
darin: review+
Details | Formatted Diff | Diff
Proposed fix (534 bytes, patch)
2005-06-21 10:21 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-21 05:38:37 PDT
[Note: this issue was previously covered by bug 3599 ].

Summary: The final layout order of text runs with different bidi embedding levels is incorrect.

To Reproduce: See testcase.

Expected/Actual: Testcase includes a description of expected rendering. Firefox renders as expected. 
WebKit renders the first (leftmost) box as expected, the second and third boxes are broken in different 

Analysis: bidiReorderLine ()'s implementation of rule L2 of the Unicode bidi algorithm is broken for lines 
where the embedding levels aren't unimodal (the index variable is advancing too fast).
Comment 1 mitz 2005-06-21 05:41:26 PDT
Created attachment 2530 [details]
Comment 2 mitz 2005-06-21 05:55:31 PDT
Created attachment 2531 [details]
Proposed fix
Comment 3 Darin Adler 2005-06-21 08:47:50 PDT
Comment on attachment 2531 [details]
Proposed fix

Patch looks fine. Clearly we should remove the bogus if statement too, since it
does the same thing the while loop already does.

This test case will work as a layout test too, which is great.

Comment 4 mitz 2005-06-21 10:21:56 PDT
Created attachment 2535 [details]
Proposed fix

Removed the unnecessary if statement.