<?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>118738</bug_id>
          
          <creation_ts>2013-07-16 10:03:11 -0700</creation_ts>
          <short_desc>Improve how the script size is determined</short_desc>
          <delta_ts>2024-10-09 00:57:32 -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>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>49309</dup_id>
          
          <bug_file_loc>http://www.w3.org/TR/2010/REC-MathML3-20101021/chapter3.html#presm.scriptlevel</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>124907</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Frédéric Wang Nélar">fred.wang</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>908933</commentid>
    <comment_count>0</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2013-07-16 10:03:11 -0700</bug_when>
    <thetext>Currently the script size is determined by the following CSS rule in WebCore/css/mathml.css:

msub &gt; * + *, msup &gt; * + *, msubsup &gt; * + *, munder &gt; * + *, mover &gt; * + *, munderover &gt; * + * {
    font-size: 0.75em; /* FIXME: MathML standard is 0.71em */
}

The MathML specification describes a more complicated way to compute that size using the scriptlevel, scriptminsize and  scriptsizemultiplier attributes. In Gecko these are implemented in the text rendering using private -moz-* CSS properties and then these properties are set by the MathML code. Some elements like scripts, fractions or roots increment the scriptlevel (the exact rules rely on the displaystyle value, see bug 118737).

See also bucket 3 of the MathML Acid3 tests:
http://fred-wang.github.io/AcidTestsMathML/acid3/d
http://fred-wang.github.io/AcidTestsMathML/acid3/description.html

and chapter 3 of the MathML spec for details:
http://www.w3.org/TR/2010/REC-MathML3-20101021/chapter3.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>908948</commentid>
    <comment_count>1</comment_count>
      <attachid>206795</attachid>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2013-07-16 10:24:56 -0700</bug_when>
    <thetext>Created attachment 206795
testcase

Here is a testcase. The scriptsizemultiplier is .5, mroot increments the scriptlevel of its script by 2 and there is no scriptminsize constraint (set to 0). So the size of &quot;SCRIPT&quot; should be 0.5 ^ 2 = 25%, which is the size of &quot;REFERENCE&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2066440</commentid>
    <comment_count>2</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2024-10-09 00:57:32 -0700</bug_when>
    <thetext>We should follow MathML Core. marking as duplicate of bug 49309

*** This bug has been marked as a duplicate of bug 49309 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>206795</attachid>
            <date>2013-07-16 10:24:56 -0700</date>
            <delta_ts>2013-07-16 10:24:56 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>scriptlevel.html</filename>
            <type>text/html</type>
            <size>361</size>
            <attacher name="Frédéric Wang Nélar">fred.wang</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPHRpdGxlPnRlc3RjYXNlPC90aXRs
ZT4KICAgIDxtZXRhIGNoYXJzZXQ9InV0Zi04Ii8+CiAgPC9oZWFkPgogIDxib2R5PgoKICAgPG1h
dGggc3R5bGU9ImZvbnQtc2l6ZTogODAwJTsiPgogICAgICA8bXRleHQgc3R5bGU9ImZvbnQtc2l6
ZTogMjUlOyI+UkVGRVJFTkNFPC9tdGV4dD4KICAgICAgPG1zdHlsZSBzY3JpcHRzaXplbXVsdGlw
bGllcj0iLjUiIHNjcmlwdG1pbnNpemU9IjAiPgoJPG1yb290PgoJICA8bW4+MDwvbW4+CgkgIDxt
dGV4dD5TQ1JJUFQ8L210ZXh0PgoJPC9tcm9vdD4KICAgICAgPC9tc3R5bGU+CiAgIDwvbWF0aD4K
CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>