<?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>123018</bug_id>
          
          <creation_ts>2013-10-18 06:38:02 -0700</creation_ts>
          <short_desc>Implement MathML bidi</short_desc>
          <delta_ts>2014-03-27 08:37:49 -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>MathML</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://www.w3.org/TR/MathML3/chapter3.html#presm.bidi</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>130840</dependson>
    
    <dependson>124121</dependson>
    
    <dependson>124572</dependson>
    
    <dependson>130839</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Frédéric Wang Nélar">fred.wang</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>mrobinson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>941173</commentid>
    <comment_count>0</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2013-10-18 06:38:02 -0700</bug_when>
    <thetext>I think just mapping the attribute &quot;dir&quot; (on the math, mstyle, mrow and token elements with the default math@dir=ltr) to the CSS property &quot;direction&quot; will make most constructions work correctly. However, some MathML constructions might need more work.

In particular, stretchy operators must be mirrored. There are Open Type MATH features to do that mirroring but using a scale transform is OK in most cases (except for things like clockwise integrals where mirroring changes the semantic).

Testcase from the Mozilla bug for the &quot;overall directionality&quot;
https://bug534963.bugzilla.mozilla.org/attachment.cgi?id=420334

More advanced testcase:
https://developer.mozilla.org/ar/docs/Mozilla_MathML_Project/Start

See also the MathML test suite:
http://www.w3.org/Math/testsuite/build/main/Topics/BiDi/Complex/Maghreb1-simple.xhtml</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>941174</commentid>
    <comment_count>1</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2013-10-18 06:45:19 -0700</bug_when>
    <thetext>Rationale for why I open this now: MathML bidi is needed on mtext for MathJax error messages in RTL languages. Doing the attribute-to-CSS mapping will help to render the messages correctly when WebKit&apos;s Native MathML is used.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>