<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>3633</bug_id>
          
          <creation_ts>2005-06-21 05:38:37 -0700</creation_ts>
          <short_desc>Layout order of bidi level runs is incorrect</short_desc>
          <delta_ts>2005-11-04 00:30:48 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>412</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to name="Darin Adler">darin</assigned_to>
          <cc>bugs.mano</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>12790</commentid>
    <comment_count>0</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-06-21 05:38:37 -0700</bug_when>
    <thetext>[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 ()&apos;s implementation of rule L2 of the Unicode bidi algorithm is broken for lines 
where the embedding levels aren&apos;t unimodal (the index variable is advancing too fast).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12791</commentid>
    <comment_count>1</comment_count>
      <attachid>2530</attachid>
    <who name="">mitz</who>
    <bug_when>2005-06-21 05:41:26 -0700</bug_when>
    <thetext>Created attachment 2530
testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12793</commentid>
    <comment_count>2</comment_count>
      <attachid>2531</attachid>
    <who name="">mitz</who>
    <bug_when>2005-06-21 05:55:31 -0700</bug_when>
    <thetext>Created attachment 2531
Proposed fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12796</commentid>
    <comment_count>3</comment_count>
      <attachid>2531</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-06-21 08:47:50 -0700</bug_when>
    <thetext>Comment on attachment 2531
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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12801</commentid>
    <comment_count>4</comment_count>
      <attachid>2535</attachid>
    <who name="">mitz</who>
    <bug_when>2005-06-21 10:21:56 -0700</bug_when>
    <thetext>Created attachment 2535
Proposed fix

Removed the unnecessary if statement.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2530</attachid>
            <date>2005-06-21 05:41:26 -0700</date>
            <delta_ts>2005-06-21 05:41:26 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>L2runReordering.html</filename>
            <type>text/html</type>
            <size>663</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs
Ly9FTiIgCiJodHRwOi8vd3d3LnczLm9yZy9UUi9odG1sNC9sb29zZS5kdGQiPgo8aHRtbD4NCjxo
ZWFkPg0KPHRpdGxlPkwyIHJ1biByZW9yZGVyaW5nIGJ1ZzwvdGl0bGU+DQo8L2hlYWQ+DQo8Ym9k
eT4KPHA+ClRoZSB0aHJlZSBib3hlcyBzaG91bGQgYmUgdGhlIHNhbWUuIFRoZSBvcmRlciBpbiBl
YWNoCmJveCBzaG91bGQgYmU6IFJvbWFuIGxldHRlcnMsIEhlYnJldyBsZXR0ZXJzLCBkaWdpdHMs
IEhlYnJldyBsZXR0ZXJzLCBSb21hbgpsZXR0ZXJzLgo8L3A+CjxwPgo8c3BhbiBzdHlsZT0iYm9y
ZGVyOmdyZWVuIDFweCBzb2xpZDsiPmFiYyAmI3gwNWQwOyYjeDA1ZDE7JiN4MDVkMjsgMTIzICYj
eDA1ZDM7JiN4MDVkNDsmI3gwNWQ1OyBkZWY8L3NwYW4+CjxzcGFuIHN0eWxlPSJib3JkZXI6Z3Jl
ZW4gMXB4IHNvbGlkOyI+YWJjICYjeDA1ZDA7JiN4MDVkMTsmI3gwNWQyOyAxMjMgJiN4MDVkMzsm
I3gwNWQ0OyYjeDA1ZDU7IGRlZjwvc3Bhbj4KPHNwYW4gc3R5bGU9ImJvcmRlcjpncmVlbiAxcHgg
c29saWQ7Ij5hYmMgJiN4MDVkMDsmI3gwNWQxOyYjeDA1ZDI7IDEyMyAmI3gwNWQzOyYjeDA1ZDQ7
JiN4MDVkNTsgZGVmPC9zcGFuPgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2531</attachid>
            <date>2005-06-21 05:55:31 -0700</date>
            <delta_ts>2005-06-21 10:21:56 -0700</delta_ts>
            <desc>Proposed fix</desc>
            <filename>366_patch_r1.txt</filename>
            <type>text/plain</type>
            <size>523</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">SW5kZXg6IGJpZGkuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnMvcm9vdC9XZWJDb3JlL2to
dG1sL3JlbmRlcmluZy9iaWRpLmNwcCx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4xMjcKZGlmZiAt
cCAtdSAtcjEuMTI3IGJpZGkuY3BwCi0tLSBiaWRpLmNwcAkyMDA1LzA1LzI3IDAxOjE3OjMyCTEu
MTI3CisrKyBiaWRpLmNwcAkyMDA1LzA2LzIxIDEyOjU1OjIzCkBAIC0xMjg4LDcgKzEyODgsNiBA
QCB2b2lkIFJlbmRlckJsb2NrOjpiaWRpUmVvcmRlckxpbmUoY29uc3QgCiAgICAgICAgICAgICAg
ICAgfQogICAgICAgICAgICAgICAgIGludCBlbmQgPSBpLTE7CiAgICAgICAgICAgICAgICAgcmV2
ZXJzZVJ1bnMoc3RhcnQsIGVuZCk7Ci0gICAgICAgICAgICAgICAgaSsrOwogICAgICAgICAgICAg
ICAgIGlmKGkgPj0gY291bnQpIGJyZWFrOwogICAgICAgICAgICAgfQogICAgICAgICAgICAgbGV2
ZWxIaWdoLS07Cg==
</data>
<flag name="review"
          id="63"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2535</attachid>
            <date>2005-06-21 10:21:56 -0700</date>
            <delta_ts>2005-06-21 10:28:29 -0700</delta_ts>
            <desc>Proposed fix</desc>
            <filename>3633_patch_r2.txt</filename>
            <type>text/plain</type>
            <size>534</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">SW5kZXg6IGJpZGkuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnMvcm9vdC9XZWJDb3JlL2to
dG1sL3JlbmRlcmluZy9iaWRpLmNwcCx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4xMjcKZGlmZiAt
cCAtdSAtcjEuMTI3IGJpZGkuY3BwCi0tLSBiaWRpLmNwcAkyMDA1LzA1LzI3IDAxOjE3OjMyCTEu
MTI3CisrKyBiaWRpLmNwcAkyMDA1LzA2LzIxIDE3OjE3OjI1CkBAIC0xMjg4LDggKzEyODgsNiBA
QCB2b2lkIFJlbmRlckJsb2NrOjpiaWRpUmVvcmRlckxpbmUoY29uc3QgCiAgICAgICAgICAgICAg
ICAgfQogICAgICAgICAgICAgICAgIGludCBlbmQgPSBpLTE7CiAgICAgICAgICAgICAgICAgcmV2
ZXJzZVJ1bnMoc3RhcnQsIGVuZCk7Ci0gICAgICAgICAgICAgICAgaSsrOwotICAgICAgICAgICAg
ICAgIGlmKGkgPj0gY291bnQpIGJyZWFrOwogICAgICAgICAgICAgfQogICAgICAgICAgICAgbGV2
ZWxIaWdoLS07CiAgICAgICAgIH0K
</data>
<flag name="review"
          id="67"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>