[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 ways. 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).
Created attachment 2530 [details] testcase
Created attachment 2531 [details] Proposed fix
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. r=me
Created attachment 2535 [details] Proposed fix Removed the unnecessary if statement.