<?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>3435</bug_id>
          
          <creation_ts>2005-06-11 06:01:10 -0700</creation_ts>
          <short_desc>Parentheses are backwards in Hebrew text (no bidi mirroring?)</short_desc>
          <delta_ts>2005-08-19 14:07:30 -0700</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>RESOLVED</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 name="Ari">the_great_spam_bin</reporter>
          <assigned_to name="Dave Hyatt">hyatt</assigned_to>
          <cc>mitz</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11442</commentid>
    <comment_count>0</comment_count>
    <who name="Ari">the_great_spam_bin</who>
    <bug_when>2005-06-11 06:01:23 -0700</bug_when>
    <thetext>Parentheses in Hebrew text seem to be displayed in the wrong direction. In the attachment, the 
parentheses should open toward the word (i.e. be around the word), but instead open away from the word.

I think right and left parentheses are among the characters that must be replaced with &quot;mirror&quot; characters 
according to the Unicode spec. From a very brief perusal of the code, it seems that WebKit doesn&apos;t 
implement this.

See:
http://www.unicode.org/reports/tr9/
http://www.unicode.org/Public/UNIDATA/BidiMirroring.txt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11443</commentid>
    <comment_count>1</comment_count>
      <attachid>2247</attachid>
    <who name="Ari">the_great_spam_bin</who>
    <bug_when>2005-06-11 06:03:46 -0700</bug_when>
    <thetext>Created attachment 2247
testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11444</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-06-11 07:37:10 -0700</bug_when>
    <thetext>(In reply to comment #1)

I can&apos;t seem to reproduce this. (I think mirroring is mostly handled by ATSUI, although you can see that 
WebKit/WebCoreSupport.subproj/WebTextRenderer.m:2041 does take it into account in width 
calculations). There are mirroring-related issues in the rendering of &quot;visually-ordered Hebrew&quot;, where 
mirroring happens although it shouldn&apos;t.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11447</commentid>
    <comment_count>3</comment_count>
    <who name="Ari">the_great_spam_bin</who>
    <bug_when>2005-06-11 08:34:46 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; 
&gt; I can&apos;t seem to reproduce this. (I think mirroring is mostly handled by ATSUI, although you can see 
that 
&gt; WebKit/WebCoreSupport.subproj/WebTextRenderer.m:2041 does take it into account in width 
&gt; calculations). There are mirroring-related issues in the rendering of &quot;visually-ordered Hebrew&quot;, where 
&gt; mirroring happens although it shouldn&apos;t.

I&apos;ve done a little more investigating, and it seems that WebTextRenderer.m has two code paths for text 
rendering, CG and ATSUI, and it uses ATSUI to render Hebrew. WebTextRenderer.m:2041 is on the CG 
code path, and so it never gets executed for Hebrew.

The ATSUI code path sets the text direction with kATSULineDirectionTag in 
_createATSUTextLayoutForRun, 
but its unclear whether ATSUI is supposed to do mirroring automatically. If it is, maybe it&apos;s an ATSUI 
bug.

What OS version are you using? I&apos;m on 10.4.1

I&apos;ve actually managed to fix this by putting in a hack that calls u_charMirror() in the ATSUI code path.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11450</commentid>
    <comment_count>4</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-06-11 09:14:58 -0700</bug_when>
    <thetext>(In reply to comment #3)

&gt; What OS version are you using? I&apos;m on 10.4.1

10.4.1, Safari 2.0 (412), Standard Font: Times 16, Default Encoding: Western (ISO Latin 1), and I get the 
same results with the CVS version. I remember mirroring being an issue in early releases, but I also 
remember that it has been fixed some time ago.

This may provide an important clue:
&lt;http://forums.ort.org.il/scripts/showsm.asp?which_forum=307&amp;mess=2242612&gt;
A user reporting that he&apos;s seeing reverse parentheses and that his work around is disabling Arial in Font 
Book. Some Hebrew-speaking Mac users install a version of Arial that comes from Microsoft (and 
includes Hebrew), so maybe that&apos;s the culprit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11459</commentid>
    <comment_count>5</comment_count>
    <who name="Nicholas Shanks">nickshanks</who>
    <bug_when>2005-06-11 10:53:11 -0700</bug_when>
    <thetext>Arabic also has problems. Where 12345 represents arabic characters as encoded in the bytestream, I see:

&lt;p dir=&quot;rtl&quot;&gt;(12345)&lt;/p&gt;

come out as:

                                                                      )(54321

This is not related to Arial Unicode MS as the font used is Geeza Pro.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11490</commentid>
    <comment_count>6</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-06-11 14:02:47 -0700</bug_when>
    <thetext>(In reply to comment #3)

Looks like an ATSUI issue with certain fonts. Here&apos;s how I confirmed this:
Built ATSUIFontPanelDemo from /Developer/Examples/ATSUI/Font Panel Support/, run it, changed the 
text to Hebrew text in parentheses, then tried various fonts. Lucida Grande, New Peninim MT and Arial 
Hebrew do the mirroring fine, while that Arial from Microsoft (Version 2.98; Unique name: Monotype:Arial 
Regular:Version 2.98 (Microsoft)) gives reversed parentheses.

You should probably file a bug against ATSUI on Radar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11491</commentid>
    <comment_count>7</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-06-11 14:16:59 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Arabic also has problems. Where 12345 represents arabic characters as encoded in the bytestream, I 
see:
&gt; 
&gt; &lt;p dir=&quot;rtl&quot;&gt;(12345)&lt;/p&gt;
&gt; 
&gt; come out as:
&gt; 
&gt;                                                                       )(54321
&gt; 
&gt; This is not related to Arial Unicode MS as the font used is Geeza Pro.

I can reproduce this with the latest shipping Safari but not with the latest CVS version (which includes a 
fix for paragraphs beginning with neutrals). What do you get when the paragraph doesn&apos;t begin with a 
neutral, e.g.
&lt;p dir=&quot;rtl&quot;&gt;12 (345) 67&lt;/p&gt;
?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13693</commentid>
    <comment_count>8</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-07-02 09:37:14 -0700</bug_when>
    <thetext>Analysis:

ATSUI is supposed to handle mirroring, but it does so only if the font&apos;s glyph properties table (&apos;prop&apos;) 
contains the mirrored glyph information. Thus mirroring doesn&apos;t happen with fonts that don&apos;t have that 
information in their &apos;prop&apos; (or don&apos;t have a &apos;prop&apos; at all), and when ATSUI uses a fallback font, but the 
original font doesn&apos;t have mirroring information.

There seems to be no way (short of looking at the &apos;prop&apos; table) of finding out what ATSUI is going to do 
with mirrored characters. However, there is a way to force ATSUI to never mirror, and then 
WebTextRenderer could always mirror (like it does for CG). This can be done by reversing the RTL text 
run and prepending an LRE prior to passing to ATSUI, and not to setting the ATSUI line direction to RTL.

Another option is to drop ATSUI altogether for Hebrew (I don&apos;t know about Arabic) and use CG. This 
would solve other issues with Hebrew (such as poor choice of fallback fonts and no support for text 
justification, letter spacing and word spacing).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13818</commentid>
    <comment_count>9</comment_count>
      <attachid>2774</attachid>
    <who name="">mitz</who>
    <bug_when>2005-07-03 12:12:47 -0700</bug_when>
    <thetext>Created attachment 2774
Proposed patch

This patch tries to guess whether ATSUI will perform mirroring or not, based on
the existence of a &apos;prop&apos; table for the font, and applies mirroring itself it
ATSUI will not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14160</commentid>
    <comment_count>10</comment_count>
      <attachid>2774</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2005-07-07 21:37:25 -0700</bug_when>
    <thetext>Comment on attachment 2774
Proposed patch

r=me

Make sure to add the test case to layout tests when landing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14446</commentid>
    <comment_count>11</comment_count>
      <attachid>2927</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2005-07-12 10:26:51 -0700</bug_when>
    <thetext>Created attachment 2927
layout test

The old test lacked a font declaration, so it wasn&apos;t guaranteed to fail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17006</commentid>
    <comment_count>12</comment_count>
    <who name="Adele Peterson">adele</who>
    <bug_when>2005-08-19 14:07:30 -0700</bug_when>
    <thetext>using &lt;rdar://problem/4215911&gt; to track this.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2247</attachid>
            <date>2005-06-11 06:03:46 -0700</date>
            <delta_ts>2005-07-12 10:26:51 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>mirroring.html</filename>
            <type>text/html</type>
            <size>128</size>
            <attacher name="Ari">the_great_spam_bin</attacher>
            
              <data encoding="base64">/v8APABoAHQAbQBsACAAZABpAHIAPQAiAHIAdABsACIAPgAKADwAaABlAGEAZAA+ADwALwBoAGUA
YQBkAD4ACgA8AGIAbwBkAHkAPgAKACgF3AXeBdMF2QXgBdUF6gApAAoAPAAvAGIAbwBkAHkAPgAK
ADwALwBoAHQAbQBsAD4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2774</attachid>
            <date>2005-07-03 12:12:47 -0700</date>
            <delta_ts>2005-07-08 00:27:41 -0700</delta_ts>
            <desc>Proposed patch</desc>
            <filename>3435_patch_r1.txt</filename>
            <type>text/plain</type>
            <size>4643</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYlRleH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LT52aXN1YWxseU9yZGVyZWQpIHsKICAgICAgICAgc3dhcHBlZFJ1biA9IHJldmVyc2VD
aGFyYWN0ZXJzSW5SdW4ocnVuKTsKICAgICAgICAgYVJ1biA9ICZzd2FwcGVkUnVuOworICAgIH0g
ZWxzZSBpZiAoc3R5bGUtPnJ0bCAmJiAhQVRTVU1pcnJvcnMpIHsKKyAgICAgICAgc3dhcHBlZFJ1
biA9IGFwcGx5TWlycm9yaW5nVG9SdW4ocnVuKTsKKyAgICAgICAgYVJ1biA9ICZzd2FwcGVkUnVu
OwogICAgIH0KIAogICAgIGxheW91dCA9IFtzZWxmIF9jcmVhdGVBVFNVVGV4dExheW91dEZvclJ1
bjphUnVuIHN0eWxlOnN0eWxlXTsKQEAgLTE3NDcsNyArMTc4Myw3IEBAIHN0YXRpYyBXZWJDb3Jl
VGV4dFJ1biByZXZlcnNlQ2hhcmFjdGVyc0kKICAgICAgICAgLy8gRmFpbGVkIHRvIGZpbmQgb2Zm
c2V0ISAgUmV0dXJuIDAgb2Zmc2V0LgogICAgIH0KICAgICAgICAKLSAgICBpZiAoc3R5bGUtPnZp
c3VhbGx5T3JkZXJlZCkgeworICAgIGlmIChzdHlsZS0+dmlzdWFsbHlPcmRlcmVkIHx8IChzdHls
ZS0+cnRsICYmICFBVFNVTWlycm9ycykpIHsKICAgICAgICAgZnJlZSAoKHZvaWQgKilzd2FwcGVk
UnVuLmNoYXJhY3RlcnMpOwogICAgIH0KIAo=
</data>
<flag name="review"
          id="158"
          type_id="1"
          status="+"
          setter="mjs"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2927</attachid>
            <date>2005-07-12 10:26:51 -0700</date>
            <delta_ts>2005-07-12 10:26:51 -0700</delta_ts>
            <desc>layout test</desc>
            <filename>bidi-parens.html</filename>
            <type>text/html</type>
            <size>446</size>
            <attacher name="Geoffrey Garen">ggaren</attacher>
            
              <data encoding="base64">77u/PGh0bWw+CjxoZWFkPgo8c3R5bGU+Ci5jb25zb2xlIHsKCWZvbnQtZmFtaWx5OiBBcmlhbCwg
VGltZXMgTmV3IFJvbWFuCn0KPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KPHA+VGhpcyB0ZXN0IGNo
ZWNrcyBmb3IgYSByZWdyZXNzaW9uIGFnYWluc3QgPGEgaHJlZj0iaHR0cDovL2J1Z3ppbGxhLm9w
ZW5kYXJ3aW4ub3JnL3Nob3dfYnVnLmNnaT9pZD0zNDM1Ij4zNDM1IFBhcmVudGhlc2VzIGFyZSBi
YWNrd2FyZHMgaW4gSGVicmV3IHRleHQgKG5vIGJpZGkgbWlycm9yaW5nPyk8L2E+LjwvcD4KPHA+
U3VjY2VzczogcGFyZW50aGVzZXMgZW5jYXBzdWxhdGUgd29yZC48L3A+CjxwPkZhaWx1cmU6IHBh
cmVudGhlc2VzIGZhY2UgYXdheSBmcm9tIHdvcmQuPC9wPgo8aHI+CjxwIGlkPSJjb25zb2xlIiBk
aXI9InJ0bCI+CijXnNee15PXmdeg15XXqikKPC9wPgo8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>