Changeset 203289 in webkit


Ignore:
Timestamp:
Jul 15, 2016 11:47:16 AM (8 years ago)
Author:
fred.wang@free.fr
Message:

MathOperator: Improve alignment for vertical size variant
https://bugs.webkit.org/show_bug.cgi?id=158866

Patch by Frederic Wang <fwang@igalia.com> on 2016-07-15
Reviewed by Brent Fulgham.

Source/WebCore:

The MathOperator class may stretch operators with either a large glyph or a glyph assembly.
In the latter case, the assembly is adjusted to match the stretch ascent and descent
requested by the callers. But in the former case the glyph ascent and descent are used
instead. We solve this by making MathOperator::stretchTo only take a targetSize and let
callers do the vertical alignment they want. This improves the rendering of fences with some
math fonts (e.g. XITS) and allows to pass the two cases of mo-axis-height-1.html.

Test: imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html

  • rendering/mathml/MathOperator.cpp:

(WebCore::MathOperator::stretchTo): Merge vertical and horizontal stretching into the same
function with only the targetSize as a parameter.

  • rendering/mathml/RenderMathMLOperator.cpp:

(WebCore::RenderMathMLOperator::stretchTo): Updated to use the new signature.
(WebCore::RenderMathMLOperator::verticalStretchedOperatorShift): Helper function to calculate
the shift necessary to align the baseline of the MathOperator instance with the one of the
RenderMathMLOperator.
(WebCore::RenderMathMLOperator::firstLineBaseline): Adjust the baseline.

  • rendering/mathml/RenderMathMLOperator.h: Declare verticalStretchedOperatorShift.
  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::layoutBlock): Use the new signature. This function aligns the top
of the radical with the overbar so we do not need to adjust baseline alignment here.

LayoutTests:

We import the latest version of mo-axis-height-1.html and update the expectation now that we
pass the two cases (size variant and glyph assembly). We also rebaseline some pixel tests.

  • imported/mathml-in-html5/fonts/math/axisheight5000-verticalarrow14000.woff: Updated.
  • imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt: Updated to expect PASS.
  • imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html: Updated to include the two tests.
  • platform/gtk/mathml/opentype/vertical-expected.png: Rebaseline to take into account better alignment of size variant.
  • platform/gtk/mathml/opentype/vertical-expected.txt: Ditto.
  • platform/gtk/mathml/presentation/mo-stretch-expected.png: Ditto.
  • platform/gtk/mathml/presentation/mo-stretch-expected.txt: Ditto.
  • platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt: Ditto.
  • platform/ios-simulator/mathml/presentation/mo-stretch-expected.txt: Ditto.
  • platform/mac/mathml/opentype/opentype-stretchy-expected.txt: Ditto.
  • platform/mac/mathml/presentation/mo-stretch-expected.txt: Ditto.
Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r203288 r203289  
     12016-07-15  Frederic Wang  <fwang@igalia.com>
     2
     3        MathOperator: Improve alignment for vertical size variant
     4        https://bugs.webkit.org/show_bug.cgi?id=158866
     5
     6        Reviewed by Brent Fulgham.
     7
     8        We import the latest version of mo-axis-height-1.html and update the expectation now that we
     9        pass the two cases (size variant and glyph assembly). We also rebaseline some pixel tests.
     10
     11        * imported/mathml-in-html5/fonts/math/axisheight5000-verticalarrow14000.woff: Updated.
     12        * imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt: Updated to expect PASS.
     13        * imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html: Updated to include the two tests.
     14        * platform/gtk/mathml/opentype/vertical-expected.png: Rebaseline to take into account better alignment of size variant.
     15        * platform/gtk/mathml/opentype/vertical-expected.txt: Ditto.
     16        * platform/gtk/mathml/presentation/mo-stretch-expected.png: Ditto.
     17        * platform/gtk/mathml/presentation/mo-stretch-expected.txt: Ditto.
     18        * platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt: Ditto.
     19        * platform/ios-simulator/mathml/presentation/mo-stretch-expected.txt: Ditto.
     20        * platform/mac/mathml/opentype/opentype-stretchy-expected.txt: Ditto.
     21        * platform/mac/mathml/presentation/mo-stretch-expected.txt: Ditto.
     22
    1232016-07-15  Brady Eidson  <beidson@apple.com>
    224
  • trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt

    r202973 r203289  
     1
     2 
    13
    24
    35
    4 FAIL AxisHeight assert_approx_equals: mo: axis height expected 50 +/- 1 but got 70
     6PASS AxisHeight (size variant)
     7PASS AxisHeight (glyph assembly)
    58
  • trunk/LayoutTests/imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html

    r202973 r203289  
    1919<script>
    2020  var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
    21   var epsilon = 1;
     21  var epsilon = 5;
    2222
    2323  function getBox(aId) {
     
    3535    test(function() {
    3636      var v1 = 5000 * emToPx;
    37       var moMiddle = (getBox("mo").bottom + getBox("mo").top) / 2;
    38       assert_approx_equals(getBox("baseline").bottom - moMiddle,
     37      var moMiddle = (getBox("mo1").bottom + getBox("mo1").top) / 2;
     38      assert_approx_equals(getBox("mo1").height,
     39                           14000 * emToPx, epsilon, "mo: size");
     40      assert_approx_equals(getBox("baseline1").bottom - moMiddle,
    3941                           v1, epsilon, "mo: axis height");
    40     }, "AxisHeight");
     42    }, "AxisHeight (size variant)");
     43
     44    test(function() {
     45      var v1 = 5000 * emToPx;
     46      var moMiddle = (getBox("mo2").bottom + getBox("mo2").top) / 2;
     47      assert_approx_equals(getBox("mo2").height,
     48                           2 * (getBox("target2").height - v1),
     49                           epsilon, "mo: size");
     50      assert_approx_equals(getBox("baseline2").bottom - moMiddle,
     51                           v1, epsilon, "mo: axis height");
     52    }, "AxisHeight (glyph assembly)");
    4153
    4254    done();
     
    4860    <math style="font-family: axisheight5000-verticalarrow14000;">
    4961      <mrow>
    50         <mspace id="baseline" mathbackground="blue" width="100px" height="1px"/>
    51         <mo id="mo" mathcolor="green">&#x21A8;</mo>
    52         <mspace mathbackground="black" width="10px" height="100px"/>
     62        <mspace id="baseline1" mathbackground="blue" width="50px" height="1px"/>
     63        <mpadded voffset="50px"><mspace mathbackground="cyan" width="50px" height="1px"/></mpadded>
     64        <mo id="mo1" symmetric="true" mathcolor="green">&#x21A8;</mo>
     65        <mspace mathbackground="gray" width="10px" height="50px"/>
     66      </mrow>
     67    </math>
     68    <math style="font-family: axisheight5000-verticalarrow14000;">
     69      <mrow>
     70        <mspace id="baseline2" mathbackground="blue" width="50px" height="1px"/>
     71        <mpadded voffset="50px"><mspace mathbackground="cyan" width="50px" height="1px"/></mpadded>
     72        <mo id="mo2" symmetric="true" mathcolor="green">&#x21A8;</mo>
     73        <mspace id="target2" mathbackground="gray" width="10px" height="200px"/>
    5374      </mrow>
    5475    </math>
  • trunk/LayoutTests/platform/gtk/mathml/opentype/vertical-expected.txt

    r203171 r203289  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x358
    4   RenderBlock {HTML} at (0,0) size 800x358
    5     RenderBody {BODY} at (8,16) size 784x326
    6       RenderBlock {P} at (0,0) size 784x18
    7         RenderMathMLMath {math} at (0,2) size 98x16
     3layer at (0,0) size 800x362
     4  RenderBlock {HTML} at (0,0) size 800x362
     5    RenderBody {BODY} at (8,16) size 784x330
     6      RenderBlock {P} at (0,0) size 784x19
     7        RenderMathMLMath {math} at (0,0) size 98x16
    88          RenderMathMLOperator {mo} at (0,0) size 4x16
    99            RenderBlock (anonymous) at (0,0) size 4x16
     
    6666              RenderText {#text} at (0,-45) size 6x106
    6767                text run at (0,-45) width 6: "\x{27E9}"
    68           RenderMathMLSpace {mspace} at (97,4) size 0x8
     68          RenderMathMLSpace {mspace} at (97,8) size 0x8
    6969        RenderText {#text} at (0,0) size 0x0
    70       RenderBlock {P} at (0,34) size 784x24
    71         RenderMathMLMath {math} at (0,0) size 126x24
     70      RenderBlock {P} at (0,35) size 784x27
     71        RenderMathMLMath {math} at (0,3) size 126x24
    7272          RenderMathMLOperator {mo} at (0,0) size 7x24
    7373            RenderBlock (anonymous) at (0,0) size 4x16
     
    131131                text run at (0,-45) width 6: "\x{27E9}"
    132132          RenderMathMLSpace {mspace} at (125,0) size 0x16
    133         RenderText {#text} at (125,2) size 5x17
    134           text run at (125,2) width 5: " "
    135         RenderMathMLMath {math} at (129,0) size 210x23
    136           RenderMathMLOperator {mo} at (0,1) size 17x22
     133        RenderText {#text} at (125,5) size 5x17
     134          text run at (125,5) width 5: " "
     135        RenderMathMLMath {math} at (129,0) size 210x22
     136          RenderMathMLOperator {mo} at (0,0) size 17x22
    137137            RenderBlock (anonymous) at (0,0) size 8x15
    138138              RenderText {#text} at (0,-46) size 8x106
    139139                text run at (0,-46) width 8: "\x{2191}"
    140           RenderMathMLOperator {mo} at (16,1) size 18x22
     140          RenderMathMLOperator {mo} at (16,0) size 18x22
    141141            RenderBlock (anonymous) at (0,0) size 8x15
    142142              RenderText {#text} at (0,-45) size 8x106
    143143                text run at (0,-45) width 8: "\x{2193}"
    144           RenderMathMLOperator {mo} at (33,3) size 18x18
     144          RenderMathMLOperator {mo} at (33,2) size 18x18
    145145            RenderBlock (anonymous) at (0,0) size 8x18
    146146              RenderText {#text} at (0,-44) size 8x106
    147147                text run at (0,-44) width 8: "\x{2195}"
    148           RenderMathMLOperator {mo} at (50,1) size 20x22
     148          RenderMathMLOperator {mo} at (50,0) size 20x22
    149149            RenderBlock (anonymous) at (0,0) size 10x14
    150150              RenderText {#text} at (0,-46) size 10x106
    151151                text run at (0,-46) width 10: "\x{21A5}"
    152           RenderMathMLOperator {mo} at (69,1) size 20x22
     152          RenderMathMLOperator {mo} at (69,0) size 20x22
    153153            RenderBlock (anonymous) at (0,0) size 10x14
    154154              RenderText {#text} at (0,-46) size 10x106
    155155                text run at (0,-46) width 10: "\x{21A7}"
    156           RenderMathMLOperator {mo} at (88,4) size 17x16
     156          RenderMathMLOperator {mo} at (88,3) size 17x16
    157157            RenderBlock (anonymous) at (0,0) size 7x16
    158158              RenderText {#text} at (0,-45) size 7x106
    159159                text run at (0,-45) width 7: "\x{21BE}"
    160           RenderMathMLOperator {mo} at (104,4) size 17x16
     160          RenderMathMLOperator {mo} at (104,3) size 17x16
    161161            RenderBlock (anonymous) at (0,0) size 7x16
    162162              RenderText {#text} at (0,-45) size 7x106
    163163                text run at (0,-45) width 7: "\x{21C2}"
    164           RenderMathMLOperator {mo} at (120,4) size 16x16
     164          RenderMathMLOperator {mo} at (120,3) size 16x16
    165165            RenderBlock (anonymous) at (0,0) size 7x16
    166166              RenderText {#text} at (0,-45) size 7x106
    167167                text run at (0,-45) width 7: "\x{21BF}"
    168           RenderMathMLOperator {mo} at (136,4) size 16x16
     168          RenderMathMLOperator {mo} at (136,3) size 16x16
    169169            RenderBlock (anonymous) at (0,0) size 7x16
    170170              RenderText {#text} at (0,-45) size 7x106
    171171                text run at (0,-45) width 7: "\x{21C3}"
    172           RenderMathMLOperator {mo} at (151,1) size 20x22
     172          RenderMathMLOperator {mo} at (151,0) size 20x22
    173173            RenderBlock (anonymous) at (0,0) size 10x15
    174174              RenderText {#text} at (0,-46) size 10x106
    175175                text run at (0,-46) width 10: "\x{21D1}"
    176           RenderMathMLOperator {mo} at (170,1) size 20x22
     176          RenderMathMLOperator {mo} at (170,0) size 20x22
    177177            RenderBlock (anonymous) at (0,0) size 10x15
    178178              RenderText {#text} at (0,-45) size 10x106
    179179                text run at (0,-45) width 10: "\x{21D3}"
    180           RenderMathMLOperator {mo} at (189,4) size 20x16
     180          RenderMathMLOperator {mo} at (189,3) size 20x16
    181181            RenderBlock (anonymous) at (0,0) size 10x16
    182182              RenderText {#text} at (0,-45) size 10x106
    183183                text run at (0,-45) width 10: "\x{21D5}"
    184           RenderMathMLSpace {mspace} at (208,0) size 0x16
     184          RenderMathMLSpace {mspace} at (208,3) size 0x16
    185185        RenderText {#text} at (0,0) size 0x0
    186       RenderBlock {P} at (0,74) size 784x42
     186      RenderBlock {P} at (0,78) size 784x42
    187187        RenderMathMLMath {math} at (0,0) size 158x42
    188188          RenderMathMLOperator {mo} at (0,1) size 8x40
     
    248248          RenderMathMLSpace {mspace} at (157,1) size 0x24
    249249        RenderText {#text} at (0,0) size 0x0
    250       RenderBlock {P} at (0,132) size 784x58
     250      RenderBlock {P} at (0,136) size 784x58
    251251        RenderMathMLMath {math} at (0,0) size 192x58
    252252          RenderMathMLOperator {mo} at (0,1) size 11x56
     
    364364          RenderMathMLSpace {mspace} at (209,0) size 0x32
    365365        RenderText {#text} at (0,0) size 0x0
    366       RenderBlock {P} at (0,206) size 784x120
     366      RenderBlock {P} at (0,210) size 784x120
    367367        RenderMathMLMath {math} at (0,0) size 192x120
    368368          RenderMathMLOperator {mo} at (0,0) size 11x120
  • trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt

    r203171 r203289  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x268
    4   RenderBlock {HTML} at (0,0) size 800x268
    5     RenderBody {BODY} at (8,8) size 784x252
     3layer at (0,0) size 800x269
     4  RenderBlock {HTML} at (0,0) size 800x269
     5    RenderBody {BODY} at (8,8) size 784x253
    66      RenderMathMLMath {math} at (0,0) size 130x36
    77        RenderMathMLRow {mrow} at (0,0) size 130x36
     
    5454              RenderText {#text} at (0,-45) size 4x106
    5555                text run at (0,-45) width 4: "|"
    56           RenderMathMLOperator {mo} at (106,10) size 7x16
    57             RenderBlock (anonymous) at (0,0) size 6x16
    58               RenderText {#text} at (0,-45) size 6x106
    59                 text run at (0,-45) width 6: "\x{2016}"
    60           RenderMathMLOperator {mo} at (112,10) size 18x16
     56          RenderMathMLOperator {mo} at (106,6) size 7x16
     57            RenderBlock (anonymous) at (0,0) size 6x16
     58              RenderText {#text} at (0,-45) size 6x106
     59                text run at (0,-45) width 6: "\x{2016}"
     60          RenderMathMLOperator {mo} at (112,6) size 18x16
    6161            RenderBlock (anonymous) at (0,0) size 8x16
    6262              RenderText {#text} at (0,-45) size 8x106
     
    126126      RenderText {#text} at (169,97) size 5x17
    127127        text run at (169,97) width 5: " "
    128       RenderMathMLMath {math} at (173,61) size 170x92
    129         RenderMathMLRow {mrow} at (0,0) size 170x92
    130           RenderMathMLOperator {mo} at (0,0) size 14x92
    131             RenderBlock (anonymous) at (0,0) size 6x16
    132               RenderText {#text} at (0,-45) size 6x106
    133                 text run at (0,-45) width 6: "("
    134           RenderMathMLOperator {mo} at (14,0) size 14x92
    135             RenderBlock (anonymous) at (0,0) size 6x16
    136               RenderText {#text} at (0,-45) size 6x106
    137                 text run at (0,-45) width 6: ")"
    138           RenderMathMLOperator {mo} at (28,0) size 14x92
    139             RenderBlock (anonymous) at (0,0) size 8x16
    140               RenderText {#text} at (0,-45) size 8x106
    141                 text run at (0,-45) width 8: "{"
    142           RenderMathMLOperator {mo} at (42,0) size 14x92
    143             RenderBlock (anonymous) at (0,0) size 8x16
    144               RenderText {#text} at (0,-45) size 8x106
    145                 text run at (0,-45) width 8: "}"
    146           RenderMathMLOperator {mo} at (56,0) size 11x92
    147             RenderBlock (anonymous) at (0,0) size 4x16
    148               RenderText {#text} at (0,-45) size 4x106
    149                 text run at (0,-45) width 4: "["
    150           RenderMathMLOperator {mo} at (67,0) size 11x92
    151             RenderBlock (anonymous) at (0,0) size 4x16
    152               RenderText {#text} at (0,-45) size 4x106
    153                 text run at (0,-45) width 4: "]"
    154           RenderMathMLOperator {mo} at (78,0) size 11x92
    155             RenderBlock (anonymous) at (0,0) size 7x16
    156               RenderText {#text} at (0,-45) size 7x106
    157                 text run at (0,-45) width 7: "\x{2308}"
    158           RenderMathMLOperator {mo} at (89,0) size 11x92
    159             RenderBlock (anonymous) at (0,0) size 7x16
    160               RenderText {#text} at (0,-45) size 7x106
    161                 text run at (0,-45) width 7: "\x{2309}"
    162           RenderMathMLOperator {mo} at (100,0) size 11x92
    163             RenderBlock (anonymous) at (0,0) size 7x16
    164               RenderText {#text} at (0,-45) size 7x106
    165                 text run at (0,-45) width 7: "\x{230A}"
    166           RenderMathMLOperator {mo} at (111,0) size 11x92
    167             RenderBlock (anonymous) at (0,0) size 7x16
    168               RenderText {#text} at (0,-45) size 7x106
    169                 text run at (0,-45) width 7: "\x{230B}"
    170           RenderMathMLOperator {mo} at (122,28) size 17x36
    171             RenderBlock (anonymous) at (0,0) size 11x18
    172               RenderText {#text} at (0,-44) size 11x106
    173                 text run at (0,-44) width 11: "\x{222B}"
    174           RenderMathMLOperator {mo} at (138,0) size 9x92
    175             RenderBlock (anonymous) at (0,0) size 4x16
    176               RenderText {#text} at (0,-45) size 4x106
    177                 text run at (0,-45) width 4: "|"
    178           RenderMathMLOperator {mo} at (146,17) size 8x58
    179             RenderBlock (anonymous) at (0,0) size 6x16
    180               RenderText {#text} at (0,-45) size 6x106
    181                 text run at (0,-45) width 6: "\x{2016}"
    182           RenderMathMLOperator {mo} at (153,17) size 17x58
    183             RenderBlock (anonymous) at (0,0) size 8x16
    184               RenderText {#text} at (0,-45) size 8x106
    185                 text run at (0,-45) width 8: "\x{2225}"
    186           RenderMathMLSpace {mspace} at (169,0) size 0x51
     128      RenderMathMLMath {math} at (173,57) size 170x96
     129        RenderMathMLRow {mrow} at (0,0) size 170x96
     130          RenderMathMLOperator {mo} at (0,4) size 14x92
     131            RenderBlock (anonymous) at (0,0) size 6x16
     132              RenderText {#text} at (0,-45) size 6x106
     133                text run at (0,-45) width 6: "("
     134          RenderMathMLOperator {mo} at (14,4) size 14x92
     135            RenderBlock (anonymous) at (0,0) size 6x16
     136              RenderText {#text} at (0,-45) size 6x106
     137                text run at (0,-45) width 6: ")"
     138          RenderMathMLOperator {mo} at (28,4) size 14x92
     139            RenderBlock (anonymous) at (0,0) size 8x16
     140              RenderText {#text} at (0,-45) size 8x106
     141                text run at (0,-45) width 8: "{"
     142          RenderMathMLOperator {mo} at (42,4) size 14x92
     143            RenderBlock (anonymous) at (0,0) size 8x16
     144              RenderText {#text} at (0,-45) size 8x106
     145                text run at (0,-45) width 8: "}"
     146          RenderMathMLOperator {mo} at (56,4) size 11x92
     147            RenderBlock (anonymous) at (0,0) size 4x16
     148              RenderText {#text} at (0,-45) size 4x106
     149                text run at (0,-45) width 4: "["
     150          RenderMathMLOperator {mo} at (67,4) size 11x92
     151            RenderBlock (anonymous) at (0,0) size 4x16
     152              RenderText {#text} at (0,-45) size 4x106
     153                text run at (0,-45) width 4: "]"
     154          RenderMathMLOperator {mo} at (78,4) size 11x92
     155            RenderBlock (anonymous) at (0,0) size 7x16
     156              RenderText {#text} at (0,-45) size 7x106
     157                text run at (0,-45) width 7: "\x{2308}"
     158          RenderMathMLOperator {mo} at (89,4) size 11x92
     159            RenderBlock (anonymous) at (0,0) size 7x16
     160              RenderText {#text} at (0,-45) size 7x106
     161                text run at (0,-45) width 7: "\x{2309}"
     162          RenderMathMLOperator {mo} at (100,4) size 11x92
     163            RenderBlock (anonymous) at (0,0) size 7x16
     164              RenderText {#text} at (0,-45) size 7x106
     165                text run at (0,-45) width 7: "\x{230A}"
     166          RenderMathMLOperator {mo} at (111,4) size 11x92
     167            RenderBlock (anonymous) at (0,0) size 7x16
     168              RenderText {#text} at (0,-45) size 7x106
     169                text run at (0,-45) width 7: "\x{230B}"
     170          RenderMathMLOperator {mo} at (122,32) size 17x36
     171            RenderBlock (anonymous) at (0,0) size 11x18
     172              RenderText {#text} at (0,-44) size 11x106
     173                text run at (0,-44) width 11: "\x{222B}"
     174          RenderMathMLOperator {mo} at (138,4) size 9x92
     175            RenderBlock (anonymous) at (0,0) size 4x16
     176              RenderText {#text} at (0,-45) size 4x106
     177                text run at (0,-45) width 4: "|"
     178          RenderMathMLOperator {mo} at (146,0) size 8x58
     179            RenderBlock (anonymous) at (0,0) size 6x16
     180              RenderText {#text} at (0,-45) size 6x106
     181                text run at (0,-45) width 6: "\x{2016}"
     182          RenderMathMLOperator {mo} at (153,0) size 17x58
     183            RenderBlock (anonymous) at (0,0) size 8x16
     184              RenderText {#text} at (0,-45) size 8x106
     185                text run at (0,-45) width 8: "\x{2225}"
     186          RenderMathMLSpace {mspace} at (169,4) size 0x51
    187187      RenderText {#text} at (342,97) size 5x17
    188188        text run at (342,97) width 5: " "
     
    237237              RenderText {#text} at (0,-45) size 4x106
    238238                text run at (0,-45) width 4: "|"
    239           RenderMathMLOperator {mo} at (120,6) size 7x24
    240             RenderBlock (anonymous) at (0,0) size 6x16
    241               RenderText {#text} at (0,-45) size 6x106
    242                 text run at (0,-45) width 6: "\x{2016}"
    243           RenderMathMLOperator {mo} at (126,6) size 16x24
     239          RenderMathMLOperator {mo} at (120,0) size 7x24
     240            RenderBlock (anonymous) at (0,0) size 6x16
     241              RenderText {#text} at (0,-45) size 6x106
     242                text run at (0,-45) width 6: "\x{2016}"
     243          RenderMathMLOperator {mo} at (126,0) size 16x24
    244244            RenderBlock (anonymous) at (0,0) size 8x16
    245245              RenderText {#text} at (0,-45) size 8x106
     
    249249        text run at (487,97) width 5: " "
    250250      RenderBR {BR} at (0,0) size 0x0
    251       RenderMathMLMath {math} at (0,178) size 185x75
    252         RenderMathMLRoot {msqrt} at (0,0) size 185x75
    253           RenderMathMLOperator {mo} at (17,2) size 14x73
    254             RenderBlock (anonymous) at (0,0) size 6x16
    255               RenderText {#text} at (0,-45) size 6x106
    256                 text run at (0,-45) width 6: "("
    257           RenderMathMLOperator {mo} at (31,2) size 14x73
    258             RenderBlock (anonymous) at (0,0) size 6x16
    259               RenderText {#text} at (0,-45) size 6x106
    260                 text run at (0,-45) width 6: ")"
    261           RenderMathMLOperator {mo} at (45,2) size 14x73
    262             RenderBlock (anonymous) at (0,0) size 8x16
    263               RenderText {#text} at (0,-45) size 8x106
    264                 text run at (0,-45) width 8: "{"
    265           RenderMathMLOperator {mo} at (59,2) size 14x73
    266             RenderBlock (anonymous) at (0,0) size 8x16
    267               RenderText {#text} at (0,-45) size 8x106
    268                 text run at (0,-45) width 8: "}"
    269           RenderMathMLOperator {mo} at (73,2) size 11x73
    270             RenderBlock (anonymous) at (0,0) size 4x16
    271               RenderText {#text} at (0,-45) size 4x106
    272                 text run at (0,-45) width 4: "["
    273           RenderMathMLOperator {mo} at (84,2) size 11x73
    274             RenderBlock (anonymous) at (0,0) size 4x16
    275               RenderText {#text} at (0,-45) size 4x106
    276                 text run at (0,-45) width 4: "]"
    277           RenderMathMLOperator {mo} at (95,2) size 11x73
    278             RenderBlock (anonymous) at (0,0) size 7x16
    279               RenderText {#text} at (0,-45) size 7x106
    280                 text run at (0,-45) width 7: "\x{2308}"
    281           RenderMathMLOperator {mo} at (106,2) size 11x73
    282             RenderBlock (anonymous) at (0,0) size 7x16
    283               RenderText {#text} at (0,-45) size 7x106
    284                 text run at (0,-45) width 7: "\x{2309}"
    285           RenderMathMLOperator {mo} at (117,2) size 11x73
    286             RenderBlock (anonymous) at (0,0) size 7x16
    287               RenderText {#text} at (0,-45) size 7x106
    288                 text run at (0,-45) width 7: "\x{230A}"
    289           RenderMathMLOperator {mo} at (128,2) size 11x73
    290             RenderBlock (anonymous) at (0,0) size 7x16
    291               RenderText {#text} at (0,-45) size 7x106
    292                 text run at (0,-45) width 7: "\x{230B}"
    293           RenderMathMLOperator {mo} at (139,20) size 17x37
    294             RenderBlock (anonymous) at (0,0) size 11x18
    295               RenderText {#text} at (0,-44) size 11x106
    296                 text run at (0,-44) width 11: "\x{222B}"
    297           RenderMathMLOperator {mo} at (155,2) size 9x73
    298             RenderBlock (anonymous) at (0,0) size 4x16
    299               RenderText {#text} at (0,-45) size 4x106
    300                 text run at (0,-45) width 4: "|"
    301           RenderMathMLOperator {mo} at (163,17) size 7x43
    302             RenderBlock (anonymous) at (0,0) size 6x16
    303               RenderText {#text} at (0,-45) size 6x106
    304                 text run at (0,-45) width 6: "\x{2016}"
    305           RenderMathMLOperator {mo} at (169,17) size 16x43
    306             RenderBlock (anonymous) at (0,0) size 8x16
    307               RenderText {#text} at (0,-45) size 8x106
    308                 text run at (0,-45) width 8: "\x{2225}"
    309           RenderMathMLSpace {mspace} at (184,2) size 0x42
     251      RenderMathMLMath {math} at (0,178) size 185x76
     252        RenderMathMLRoot {msqrt} at (0,0) size 185x76
     253          RenderMathMLOperator {mo} at (17,3) size 14x73
     254            RenderBlock (anonymous) at (0,0) size 6x16
     255              RenderText {#text} at (0,-45) size 6x106
     256                text run at (0,-45) width 6: "("
     257          RenderMathMLOperator {mo} at (31,3) size 14x73
     258            RenderBlock (anonymous) at (0,0) size 6x16
     259              RenderText {#text} at (0,-45) size 6x106
     260                text run at (0,-45) width 6: ")"
     261          RenderMathMLOperator {mo} at (45,3) size 14x73
     262            RenderBlock (anonymous) at (0,0) size 8x16
     263              RenderText {#text} at (0,-45) size 8x106
     264                text run at (0,-45) width 8: "{"
     265          RenderMathMLOperator {mo} at (59,3) size 14x73
     266            RenderBlock (anonymous) at (0,0) size 8x16
     267              RenderText {#text} at (0,-45) size 8x106
     268                text run at (0,-45) width 8: "}"
     269          RenderMathMLOperator {mo} at (73,3) size 11x73
     270            RenderBlock (anonymous) at (0,0) size 4x16
     271              RenderText {#text} at (0,-45) size 4x106
     272                text run at (0,-45) width 4: "["
     273          RenderMathMLOperator {mo} at (84,3) size 11x73
     274            RenderBlock (anonymous) at (0,0) size 4x16
     275              RenderText {#text} at (0,-45) size 4x106
     276                text run at (0,-45) width 4: "]"
     277          RenderMathMLOperator {mo} at (95,3) size 11x73
     278            RenderBlock (anonymous) at (0,0) size 7x16
     279              RenderText {#text} at (0,-45) size 7x106
     280                text run at (0,-45) width 7: "\x{2308}"
     281          RenderMathMLOperator {mo} at (106,3) size 11x73
     282            RenderBlock (anonymous) at (0,0) size 7x16
     283              RenderText {#text} at (0,-45) size 7x106
     284                text run at (0,-45) width 7: "\x{2309}"
     285          RenderMathMLOperator {mo} at (117,3) size 11x73
     286            RenderBlock (anonymous) at (0,0) size 7x16
     287              RenderText {#text} at (0,-45) size 7x106
     288                text run at (0,-45) width 7: "\x{230A}"
     289          RenderMathMLOperator {mo} at (128,3) size 11x73
     290            RenderBlock (anonymous) at (0,0) size 7x16
     291              RenderText {#text} at (0,-45) size 7x106
     292                text run at (0,-45) width 7: "\x{230B}"
     293          RenderMathMLOperator {mo} at (139,21) size 17x37
     294            RenderBlock (anonymous) at (0,0) size 11x18
     295              RenderText {#text} at (0,-44) size 11x106
     296                text run at (0,-44) width 11: "\x{222B}"
     297          RenderMathMLOperator {mo} at (155,3) size 9x73
     298            RenderBlock (anonymous) at (0,0) size 4x16
     299              RenderText {#text} at (0,-45) size 4x106
     300                text run at (0,-45) width 4: "|"
     301          RenderMathMLOperator {mo} at (163,2) size 7x43
     302            RenderBlock (anonymous) at (0,0) size 6x16
     303              RenderText {#text} at (0,-45) size 6x106
     304                text run at (0,-45) width 6: "\x{2016}"
     305          RenderMathMLOperator {mo} at (169,2) size 16x43
     306            RenderBlock (anonymous) at (0,0) size 8x16
     307              RenderText {#text} at (0,-45) size 8x106
     308                text run at (0,-45) width 8: "\x{2225}"
     309          RenderMathMLSpace {mspace} at (184,3) size 0x42
    310310      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt

    r203171 r203289  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x342
    4   RenderBlock {HTML} at (0,0) size 800x342
    5     RenderBody {BODY} at (8,16) size 784x310
    6       RenderBlock {P} at (0,0) size 784x36
    7         RenderMathMLMath {math} at (0,21) size 26x11
     3layer at (0,0) size 800x341
     4  RenderBlock {HTML} at (0,0) size 800x341
     5    RenderBody {BODY} at (8,16) size 784x309
     6      RenderBlock {P} at (0,0) size 784x35
     7        RenderMathMLMath {math} at (0,20) size 26x11
    88          RenderMathMLRow {mrow} at (0,0) size 26x11
    99            RenderMathMLOperator {mo} at (0,0) size 26x11
     
    1111                RenderText {#text} at (0,-3) size 3x0
    1212                  text run at (0,-3) width 3: "\x{219F}"
    13         RenderText {#text} at (26,16) size 4x19
    14           text run at (26,16) width 4: " "
    15         RenderMathMLMath {math} at (30,11) size 26x21
     13        RenderText {#text} at (26,15) size 4x19
     14          text run at (26,15) width 4: " "
     15        RenderMathMLMath {math} at (30,10) size 26x21
    1616          RenderMathMLRow {mrow} at (0,0) size 26x21
    1717            RenderMathMLOperator {mo} at (0,0) size 26x21
     
    1919                RenderText {#text} at (0,-3) size 3x0
    2020                  text run at (0,-3) width 3: "\x{219F}"
    21         RenderText {#text} at (56,16) size 4x19
    22           text run at (56,16) width 4: " "
     21        RenderText {#text} at (56,15) size 4x19
     22          text run at (56,15) width 4: " "
    2323        RenderMathMLMath {math} at (60,0) size 26x31
    2424          RenderMathMLRow {mrow} at (0,0) size 26x31
     
    2828                  text run at (0,-3) width 3: "\x{219F}"
    2929        RenderText {#text} at (0,0) size 0x0
    30       RenderBlock {P} at (0,52) size 784x155
     30      RenderBlock {P} at (0,51) size 784x155
    3131        RenderMathMLMath {math} at (0,0) size 47x150
    3232          RenderMathMLRow {mrow} at (0,0) size 47x150
     
    3636                  text run at (0,-3) width 3: "\x{219F}"
    3737        RenderText {#text} at (0,0) size 0x0
    38       RenderBlock {P} at (0,223) size 784x87
     38      RenderBlock {P} at (0,222) size 784x87
    3939        RenderMathMLMath {math} at (0,0) size 84x82
    4040          RenderMathMLRow {mrow} at (0,0) size 84x82
  • trunk/LayoutTests/platform/ios-simulator/mathml/presentation/mo-stretch-expected.txt

    r203171 r203289  
    44  RenderBlock {HTML} at (0,0) size 800x252
    55    RenderBody {BODY} at (8,8) size 784x236
    6       RenderMathMLMath {math} at (0,2) size 58x18
     6      RenderMathMLMath {math} at (0,3) size 58x18
    77        RenderMathMLRow {mrow} at (0,0) size 58x18
    88          RenderMathMLOperator {mo} at (0,1) size 6x15
     
    1414              RenderText {#text} at (0,0) size 6x17
    1515                text run at (0,0) width 6: ")"
    16           RenderMathMLOperator {mo} at (10,1) size 9x16
    17             RenderBlock (anonymous) at (0,0) size 8x17
    18               RenderText {#text} at (0,1) size 8x17
    19                 text run at (0,1) width 8: "{"
    20           RenderMathMLOperator {mo} at (18,1) size 8x16
     16          RenderMathMLOperator {mo} at (10,0) size 9x16
     17            RenderBlock (anonymous) at (0,0) size 8x17
     18              RenderText {#text} at (0,1) size 8x17
     19                text run at (0,1) width 8: "{"
     20          RenderMathMLOperator {mo} at (18,0) size 8x16
    2121            RenderBlock (anonymous) at (0,0) size 8x17
    2222              RenderText {#text} at (0,1) size 8x17
     
    3030              RenderText {#text} at (0,0) size 6x17
    3131                text run at (0,0) width 6: "]"
    32           RenderMathMLOperator {mo} at (36,13) size 0x0
    33             RenderBlock (anonymous) at (0,0) size 7x16
    34               RenderText {#text} at (0,1) size 7x17
    35                 text run at (0,1) width 7: "\x{2308}"
    36           RenderMathMLOperator {mo} at (36,13) size 0x0
    37             RenderBlock (anonymous) at (0,0) size 7x16
    38               RenderText {#text} at (0,1) size 7x17
    39                 text run at (0,1) width 7: "\x{2309}"
    40           RenderMathMLOperator {mo} at (36,13) size 0x0
    41             RenderBlock (anonymous) at (0,0) size 7x16
    42               RenderText {#text} at (0,1) size 7x17
    43                 text run at (0,1) width 7: "\x{230A}"
    44           RenderMathMLOperator {mo} at (36,13) size 0x0
     32          RenderMathMLOperator {mo} at (36,8) size 0x0
     33            RenderBlock (anonymous) at (0,0) size 7x16
     34              RenderText {#text} at (0,1) size 7x17
     35                text run at (0,1) width 7: "\x{2308}"
     36          RenderMathMLOperator {mo} at (36,8) size 0x0
     37            RenderBlock (anonymous) at (0,0) size 7x16
     38              RenderText {#text} at (0,1) size 7x17
     39                text run at (0,1) width 7: "\x{2309}"
     40          RenderMathMLOperator {mo} at (36,8) size 0x0
     41            RenderBlock (anonymous) at (0,0) size 7x16
     42              RenderText {#text} at (0,1) size 7x17
     43                text run at (0,1) width 7: "\x{230A}"
     44          RenderMathMLOperator {mo} at (36,8) size 0x0
    4545            RenderBlock (anonymous) at (0,0) size 7x16
    4646              RenderText {#text} at (0,1) size 7x17
     
    5454              RenderText {#text} at (0,1) size 4x17
    5555                text run at (0,1) width 4: "|"
    56           RenderMathMLOperator {mo} at (48,13) size 0x0
    57             RenderBlock (anonymous) at (0,0) size 5x13
    58               RenderText {#text} at (0,0) size 5x17
    59                 text run at (0,0) width 5: "\x{2016}"
    60           RenderMathMLOperator {mo} at (48,13) size 10x0
     56          RenderMathMLOperator {mo} at (48,4) size 0x0
     57            RenderBlock (anonymous) at (0,0) size 5x13
     58              RenderText {#text} at (0,0) size 5x17
     59                text run at (0,0) width 5: "\x{2016}"
     60          RenderMathMLOperator {mo} at (48,4) size 10x0
    6161            RenderBlock (anonymous) at (0,0) size 11x13
    6262              RenderText {#text} at (0,0) size 11x17
     
    9191              RenderText {#text} at (0,0) size 6x17
    9292                text run at (0,0) width 6: "]"
    93           RenderMathMLOperator {mo} at (40,75) size 0x0
    94             RenderBlock (anonymous) at (0,0) size 7x16
    95               RenderText {#text} at (0,1) size 7x17
    96                 text run at (0,1) width 7: "\x{2308}"
    97           RenderMathMLOperator {mo} at (40,75) size 0x0
    98             RenderBlock (anonymous) at (0,0) size 7x16
    99               RenderText {#text} at (0,1) size 7x17
    100                 text run at (0,1) width 7: "\x{2309}"
    101           RenderMathMLOperator {mo} at (40,75) size 0x0
    102             RenderBlock (anonymous) at (0,0) size 7x16
    103               RenderText {#text} at (0,1) size 7x17
    104                 text run at (0,1) width 7: "\x{230A}"
    105           RenderMathMLOperator {mo} at (40,75) size 0x0
     93          RenderMathMLOperator {mo} at (40,71) size 0x0
     94            RenderBlock (anonymous) at (0,0) size 7x16
     95              RenderText {#text} at (0,1) size 7x17
     96                text run at (0,1) width 7: "\x{2308}"
     97          RenderMathMLOperator {mo} at (40,71) size 0x0
     98            RenderBlock (anonymous) at (0,0) size 7x16
     99              RenderText {#text} at (0,1) size 7x17
     100                text run at (0,1) width 7: "\x{2309}"
     101          RenderMathMLOperator {mo} at (40,71) size 0x0
     102            RenderBlock (anonymous) at (0,0) size 7x16
     103              RenderText {#text} at (0,1) size 7x17
     104                text run at (0,1) width 7: "\x{230A}"
     105          RenderMathMLOperator {mo} at (40,71) size 0x0
    106106            RenderBlock (anonymous) at (0,0) size 7x16
    107107              RenderText {#text} at (0,1) size 7x17
     
    115115              RenderText {#text} at (0,1) size 4x17
    116116                text run at (0,1) width 4: "|"
    117           RenderMathMLOperator {mo} at (58,75) size 0x0
    118             RenderBlock (anonymous) at (0,0) size 5x13
    119               RenderText {#text} at (0,0) size 5x17
    120                 text run at (0,0) width 5: "\x{2016}"
    121           RenderMathMLOperator {mo} at (58,75) size 10x0
     117          RenderMathMLOperator {mo} at (58,38) size 0x0
     118            RenderBlock (anonymous) at (0,0) size 5x13
     119              RenderText {#text} at (0,0) size 5x17
     120                text run at (0,0) width 5: "\x{2016}"
     121          RenderMathMLOperator {mo} at (58,38) size 10x0
    122122            RenderBlock (anonymous) at (0,0) size 11x13
    123123              RenderText {#text} at (0,0) size 11x17
     
    152152              RenderText {#text} at (0,0) size 6x17
    153153                text run at (0,0) width 6: "]"
    154           RenderMathMLOperator {mo} at (40,50) size 0x0
    155             RenderBlock (anonymous) at (0,0) size 7x16
    156               RenderText {#text} at (0,1) size 7x17
    157                 text run at (0,1) width 7: "\x{2308}"
    158           RenderMathMLOperator {mo} at (40,50) size 0x0
    159             RenderBlock (anonymous) at (0,0) size 7x16
    160               RenderText {#text} at (0,1) size 7x17
    161                 text run at (0,1) width 7: "\x{2309}"
    162           RenderMathMLOperator {mo} at (40,50) size 0x0
    163             RenderBlock (anonymous) at (0,0) size 7x16
    164               RenderText {#text} at (0,1) size 7x17
    165                 text run at (0,1) width 7: "\x{230A}"
    166           RenderMathMLOperator {mo} at (40,50) size 0x0
     154          RenderMathMLOperator {mo} at (40,46) size 0x0
     155            RenderBlock (anonymous) at (0,0) size 7x16
     156              RenderText {#text} at (0,1) size 7x17
     157                text run at (0,1) width 7: "\x{2308}"
     158          RenderMathMLOperator {mo} at (40,46) size 0x0
     159            RenderBlock (anonymous) at (0,0) size 7x16
     160              RenderText {#text} at (0,1) size 7x17
     161                text run at (0,1) width 7: "\x{2309}"
     162          RenderMathMLOperator {mo} at (40,46) size 0x0
     163            RenderBlock (anonymous) at (0,0) size 7x16
     164              RenderText {#text} at (0,1) size 7x17
     165                text run at (0,1) width 7: "\x{230A}"
     166          RenderMathMLOperator {mo} at (40,46) size 0x0
    167167            RenderBlock (anonymous) at (0,0) size 7x16
    168168              RenderText {#text} at (0,1) size 7x17
     
    176176              RenderText {#text} at (0,1) size 4x17
    177177                text run at (0,1) width 4: "|"
    178           RenderMathMLOperator {mo} at (58,50) size 0x0
    179             RenderBlock (anonymous) at (0,0) size 5x13
    180               RenderText {#text} at (0,0) size 5x17
    181                 text run at (0,0) width 5: "\x{2016}"
    182           RenderMathMLOperator {mo} at (58,50) size 10x0
     178          RenderMathMLOperator {mo} at (58,25) size 0x0
     179            RenderBlock (anonymous) at (0,0) size 5x13
     180              RenderText {#text} at (0,0) size 5x17
     181                text run at (0,0) width 5: "\x{2016}"
     182          RenderMathMLOperator {mo} at (58,25) size 10x0
    183183            RenderBlock (anonymous) at (0,0) size 11x13
    184184              RenderText {#text} at (0,0) size 11x17
     
    213213              RenderText {#text} at (0,0) size 6x17
    214214                text run at (0,0) width 6: "]"
    215           RenderMathMLOperator {mo} at (39,20) size 0x0
    216             RenderBlock (anonymous) at (0,0) size 7x16
    217               RenderText {#text} at (0,1) size 7x17
    218                 text run at (0,1) width 7: "\x{2308}"
    219           RenderMathMLOperator {mo} at (39,20) size 0x0
    220             RenderBlock (anonymous) at (0,0) size 7x16
    221               RenderText {#text} at (0,1) size 7x17
    222                 text run at (0,1) width 7: "\x{2309}"
    223           RenderMathMLOperator {mo} at (39,20) size 0x0
    224             RenderBlock (anonymous) at (0,0) size 7x16
    225               RenderText {#text} at (0,1) size 7x17
    226                 text run at (0,1) width 7: "\x{230A}"
    227           RenderMathMLOperator {mo} at (39,20) size 0x0
     215          RenderMathMLOperator {mo} at (39,16) size 0x0
     216            RenderBlock (anonymous) at (0,0) size 7x16
     217              RenderText {#text} at (0,1) size 7x17
     218                text run at (0,1) width 7: "\x{2308}"
     219          RenderMathMLOperator {mo} at (39,16) size 0x0
     220            RenderBlock (anonymous) at (0,0) size 7x16
     221              RenderText {#text} at (0,1) size 7x17
     222                text run at (0,1) width 7: "\x{2309}"
     223          RenderMathMLOperator {mo} at (39,16) size 0x0
     224            RenderBlock (anonymous) at (0,0) size 7x16
     225              RenderText {#text} at (0,1) size 7x17
     226                text run at (0,1) width 7: "\x{230A}"
     227          RenderMathMLOperator {mo} at (39,16) size 0x0
    228228            RenderBlock (anonymous) at (0,0) size 7x16
    229229              RenderText {#text} at (0,1) size 7x17
     
    233233              RenderText {#text} at (0,1) size 5x17
    234234                text run at (0,1) width 5: "\x{222B}"
    235           RenderMathMLOperator {mo} at (51,7) size 8x18
    236             RenderBlock (anonymous) at (0,0) size 4x18
    237               RenderText {#text} at (0,1) size 4x17
    238                 text run at (0,1) width 4: "|"
    239           RenderMathMLOperator {mo} at (58,20) size 0x0
    240             RenderBlock (anonymous) at (0,0) size 5x13
    241               RenderText {#text} at (0,0) size 5x17
    242                 text run at (0,0) width 5: "\x{2016}"
    243           RenderMathMLOperator {mo} at (58,20) size 10x0
     235          RenderMathMLOperator {mo} at (51,8) size 8x18
     236            RenderBlock (anonymous) at (0,0) size 4x18
     237              RenderText {#text} at (0,1) size 4x17
     238                text run at (0,1) width 4: "|"
     239          RenderMathMLOperator {mo} at (58,10) size 0x0
     240            RenderBlock (anonymous) at (0,0) size 5x13
     241              RenderText {#text} at (0,0) size 5x17
     242                text run at (0,0) width 5: "\x{2016}"
     243          RenderMathMLOperator {mo} at (58,10) size 10x0
    244244            RenderBlock (anonymous) at (0,0) size 11x13
    245245              RenderText {#text} at (0,0) size 11x17
     
    275275              RenderText {#text} at (0,0) size 6x17
    276276                text run at (0,0) width 6: "]"
    277           RenderMathMLOperator {mo} at (49,41) size 0x0
    278             RenderBlock (anonymous) at (0,0) size 7x16
    279               RenderText {#text} at (0,1) size 7x17
    280                 text run at (0,1) width 7: "\x{2308}"
    281           RenderMathMLOperator {mo} at (49,41) size 0x0
    282             RenderBlock (anonymous) at (0,0) size 7x16
    283               RenderText {#text} at (0,1) size 7x17
    284                 text run at (0,1) width 7: "\x{2309}"
    285           RenderMathMLOperator {mo} at (49,41) size 0x0
    286             RenderBlock (anonymous) at (0,0) size 7x16
    287               RenderText {#text} at (0,1) size 7x17
    288                 text run at (0,1) width 7: "\x{230A}"
    289           RenderMathMLOperator {mo} at (49,41) size 0x0
     277          RenderMathMLOperator {mo} at (49,37) size 0x0
     278            RenderBlock (anonymous) at (0,0) size 7x16
     279              RenderText {#text} at (0,1) size 7x17
     280                text run at (0,1) width 7: "\x{2308}"
     281          RenderMathMLOperator {mo} at (49,37) size 0x0
     282            RenderBlock (anonymous) at (0,0) size 7x16
     283              RenderText {#text} at (0,1) size 7x17
     284                text run at (0,1) width 7: "\x{2309}"
     285          RenderMathMLOperator {mo} at (49,37) size 0x0
     286            RenderBlock (anonymous) at (0,0) size 7x16
     287              RenderText {#text} at (0,1) size 7x17
     288                text run at (0,1) width 7: "\x{230A}"
     289          RenderMathMLOperator {mo} at (49,37) size 0x0
    290290            RenderBlock (anonymous) at (0,0) size 7x16
    291291              RenderText {#text} at (0,1) size 7x17
     
    299299              RenderText {#text} at (0,1) size 4x17
    300300                text run at (0,1) width 4: "|"
    301           RenderMathMLOperator {mo} at (67,41) size 0x0
    302             RenderBlock (anonymous) at (0,0) size 5x13
    303               RenderText {#text} at (0,0) size 5x17
    304                 text run at (0,0) width 5: "\x{2016}"
    305           RenderMathMLOperator {mo} at (67,41) size 10x0
     301          RenderMathMLOperator {mo} at (67,21) size 0x0
     302            RenderBlock (anonymous) at (0,0) size 5x13
     303              RenderText {#text} at (0,0) size 5x17
     304                text run at (0,0) width 5: "\x{2016}"
     305          RenderMathMLOperator {mo} at (67,21) size 10x0
    306306            RenderBlock (anonymous) at (0,0) size 11x13
    307307              RenderText {#text} at (0,0) size 11x17
  • trunk/LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-expected.txt

    r203171 r203289  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x339
    4   RenderBlock {HTML} at (0,0) size 800x339
    5     RenderBody {BODY} at (8,16) size 784x307
    6       RenderBlock {P} at (0,0) size 784x35
    7         RenderMathMLMath {math} at (0,21) size 26x11
     3layer at (0,0) size 800x338
     4  RenderBlock {HTML} at (0,0) size 800x338
     5    RenderBody {BODY} at (8,16) size 784x306
     6      RenderBlock {P} at (0,0) size 784x34
     7        RenderMathMLMath {math} at (0,20) size 26x11
    88          RenderMathMLRow {mrow} at (0,0) size 26x11
    99            RenderMathMLOperator {mo} at (0,0) size 26x11
     
    1111                RenderText {#text} at (0,-3) size 3x0
    1212                  text run at (0,-3) width 3: "\x{219F}"
    13         RenderText {#text} at (26,17) size 4x18
    14           text run at (26,17) width 4: " "
    15         RenderMathMLMath {math} at (30,11) size 26x21
     13        RenderText {#text} at (26,16) size 4x18
     14          text run at (26,16) width 4: " "
     15        RenderMathMLMath {math} at (30,10) size 26x21
    1616          RenderMathMLRow {mrow} at (0,0) size 26x21
    1717            RenderMathMLOperator {mo} at (0,0) size 26x21
     
    1919                RenderText {#text} at (0,-3) size 3x0
    2020                  text run at (0,-3) width 3: "\x{219F}"
    21         RenderText {#text} at (56,17) size 4x18
    22           text run at (56,17) width 4: " "
     21        RenderText {#text} at (56,16) size 4x18
     22          text run at (56,16) width 4: " "
    2323        RenderMathMLMath {math} at (60,0) size 26x31
    2424          RenderMathMLRow {mrow} at (0,0) size 26x31
     
    2828                  text run at (0,-3) width 3: "\x{219F}"
    2929        RenderText {#text} at (0,0) size 0x0
    30       RenderBlock {P} at (0,51) size 784x154
     30      RenderBlock {P} at (0,50) size 784x154
    3131        RenderMathMLMath {math} at (0,0) size 47x150
    3232          RenderMathMLRow {mrow} at (0,0) size 47x150
     
    3636                  text run at (0,-3) width 3: "\x{219F}"
    3737        RenderText {#text} at (0,0) size 0x0
    38       RenderBlock {P} at (0,221) size 784x86
     38      RenderBlock {P} at (0,220) size 784x86
    3939        RenderMathMLMath {math} at (0,0) size 84x82
    4040          RenderMathMLRow {mrow} at (0,0) size 84x82
  • trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt

    r203171 r203289  
    66      RenderMathMLMath {math} at (0,0) size 108x25
    77        RenderMathMLRow {mrow} at (0,0) size 108x25
    8           RenderMathMLOperator {mo} at (0,5) size 6x14
    9             RenderBlock (anonymous) at (0,0) size 6x14
    10               RenderText {#text} at (0,-6) size 6x24
    11                 text run at (0,-6) width 6: "("
    12           RenderMathMLOperator {mo} at (5,5) size 6x14
    13             RenderBlock (anonymous) at (0,0) size 6x14
    14               RenderText {#text} at (0,-6) size 6x24
    15                 text run at (0,-6) width 6: ")"
    16           RenderMathMLOperator {mo} at (10,5) size 9x14
    17             RenderBlock (anonymous) at (0,0) size 8x14
    18               RenderText {#text} at (0,-6) size 8x24
    19                 text run at (0,-6) width 8: "{"
    20           RenderMathMLOperator {mo} at (18,5) size 8x14
    21             RenderBlock (anonymous) at (0,0) size 8x14
    22               RenderText {#text} at (0,-6) size 8x24
    23                 text run at (0,-6) width 8: "}"
    24           RenderMathMLOperator {mo} at (25,5) size 7x14
    25             RenderBlock (anonymous) at (0,0) size 6x14
    26               RenderText {#text} at (0,-6) size 6x24
    27                 text run at (0,-6) width 6: "["
    28           RenderMathMLOperator {mo} at (31,5) size 6x14
     8          RenderMathMLOperator {mo} at (0,6) size 6x14
     9            RenderBlock (anonymous) at (0,0) size 6x14
     10              RenderText {#text} at (0,-6) size 6x24
     11                text run at (0,-6) width 6: "("
     12          RenderMathMLOperator {mo} at (5,6) size 6x14
     13            RenderBlock (anonymous) at (0,0) size 6x14
     14              RenderText {#text} at (0,-6) size 6x24
     15                text run at (0,-6) width 6: ")"
     16          RenderMathMLOperator {mo} at (10,6) size 9x14
     17            RenderBlock (anonymous) at (0,0) size 8x14
     18              RenderText {#text} at (0,-6) size 8x24
     19                text run at (0,-6) width 8: "{"
     20          RenderMathMLOperator {mo} at (18,6) size 8x14
     21            RenderBlock (anonymous) at (0,0) size 8x14
     22              RenderText {#text} at (0,-6) size 8x24
     23                text run at (0,-6) width 8: "}"
     24          RenderMathMLOperator {mo} at (25,6) size 7x14
     25            RenderBlock (anonymous) at (0,0) size 6x14
     26              RenderText {#text} at (0,-6) size 6x24
     27                text run at (0,-6) width 6: "["
     28          RenderMathMLOperator {mo} at (31,6) size 6x14
    2929            RenderBlock (anonymous) at (0,0) size 6x14
    3030              RenderText {#text} at (0,-6) size 6x24
     
    5454              RenderText {#text} at (0,-6) size 4x24
    5555                text run at (0,-6) width 4: "|"
    56           RenderMathMLOperator {mo} at (81,5) size 9x15
    57             RenderBlock (anonymous) at (0,0) size 9x16
    58               RenderText {#text} at (0,-5) size 9x24
    59                 text run at (0,-5) width 9: "\x{2016}"
    60           RenderMathMLOperator {mo} at (89,5) size 19x15
     56          RenderMathMLOperator {mo} at (81,1) size 9x15
     57            RenderBlock (anonymous) at (0,0) size 9x16
     58              RenderText {#text} at (0,-5) size 9x24
     59                text run at (0,-5) width 9: "\x{2016}"
     60          RenderMathMLOperator {mo} at (89,1) size 19x15
    6161            RenderBlock (anonymous) at (0,0) size 9x16
    6262              RenderText {#text} at (0,-5) size 9x24
     
    197197              RenderText {#text} at (0,-6) size 6x24
    198198                text run at (0,-6) width 6: ")"
    199           RenderMathMLOperator {mo} at (14,9) size 9x14
    200             RenderBlock (anonymous) at (0,0) size 8x14
    201               RenderText {#text} at (0,-6) size 8x24
    202                 text run at (0,-6) width 8: "{"
    203           RenderMathMLOperator {mo} at (22,9) size 8x14
     199          RenderMathMLOperator {mo} at (14,10) size 9x14
     200            RenderBlock (anonymous) at (0,0) size 8x14
     201              RenderText {#text} at (0,-6) size 8x24
     202                text run at (0,-6) width 8: "{"
     203          RenderMathMLOperator {mo} at (22,10) size 8x14
    204204            RenderBlock (anonymous) at (0,0) size 8x14
    205205              RenderText {#text} at (0,-6) size 8x24
     
    237237              RenderText {#text} at (0,-6) size 4x24
    238238                text run at (0,-6) width 4: "|"
    239           RenderMathMLOperator {mo} at (87,9) size 10x15
    240             RenderBlock (anonymous) at (0,0) size 9x16
    241               RenderText {#text} at (0,-5) size 9x24
    242                 text run at (0,-5) width 9: "\x{2016}"
    243           RenderMathMLOperator {mo} at (96,9) size 18x15
     239          RenderMathMLOperator {mo} at (87,3) size 10x15
     240            RenderBlock (anonymous) at (0,0) size 9x16
     241              RenderText {#text} at (0,-5) size 9x24
     242                text run at (0,-5) width 9: "\x{2016}"
     243          RenderMathMLOperator {mo} at (96,3) size 18x15
    244244            RenderBlock (anonymous) at (0,0) size 9x16
    245245              RenderText {#text} at (0,-5) size 9x24
  • trunk/Source/WebCore/ChangeLog

    r203288 r203289  
     12016-07-15  Frederic Wang  <fwang@igalia.com>
     2
     3        MathOperator: Improve alignment for vertical size variant
     4        https://bugs.webkit.org/show_bug.cgi?id=158866
     5
     6        Reviewed by Brent Fulgham.
     7
     8        The MathOperator class may stretch operators with either a large glyph or a glyph assembly.
     9        In the latter case, the assembly is adjusted to match the stretch ascent and descent
     10        requested by the callers. But in the former case the glyph ascent and descent are used
     11        instead. We solve this by making MathOperator::stretchTo only take a targetSize and let
     12        callers do the vertical alignment they want. This improves the rendering of fences with some
     13        math fonts (e.g. XITS) and allows to pass the two cases of mo-axis-height-1.html.
     14
     15        Test: imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html
     16
     17        * rendering/mathml/MathOperator.cpp:
     18        (WebCore::MathOperator::stretchTo): Merge vertical and horizontal stretching into the same
     19        function with only the targetSize as a parameter.
     20        * rendering/mathml/RenderMathMLOperator.cpp:
     21        (WebCore::RenderMathMLOperator::stretchTo): Updated to use the new signature.
     22        (WebCore::RenderMathMLOperator::verticalStretchedOperatorShift): Helper function to calculate
     23        the shift necessary to align the baseline of the MathOperator instance with the one of the
     24        RenderMathMLOperator.
     25        (WebCore::RenderMathMLOperator::firstLineBaseline): Adjust the baseline.
     26        * rendering/mathml/RenderMathMLOperator.h: Declare verticalStretchedOperatorShift.
     27        * rendering/mathml/RenderMathMLRoot.cpp:
     28        (WebCore::RenderMathMLRoot::layoutBlock): Use the new signature. This function aligns the top
     29        of the radical with the overbar so we do not need to adjust baseline alignment here.
     30
    1312016-07-15  Brady Eidson  <beidson@apple.com>
    232
  • trunk/Source/WebCore/rendering/mathml/MathOperator.cpp

    r203280 r203289  
    395395}
    396396
    397 void MathOperator::stretchTo(const RenderStyle& style, LayoutUnit ascent, LayoutUnit descent)
    398 {
    399     ASSERT(m_operatorType == Type::VerticalOperator);
    400     calculateStretchyData(style, false, ascent + descent);
     397void MathOperator::stretchTo(const RenderStyle& style, LayoutUnit targetSize)
     398{
     399    ASSERT(m_operatorType == Type::VerticalOperator || m_operatorType == Type::HorizontalOperator);
     400    calculateStretchyData(style, false, targetSize);
    401401    if (m_stretchType == StretchType::GlyphAssembly) {
    402         m_ascent = ascent;
    403         m_descent = descent;
    404     }
    405 }
    406 
    407 void MathOperator::stretchTo(const RenderStyle& style, LayoutUnit width)
    408 {
    409     ASSERT(m_operatorType == Type::HorizontalOperator);
    410     calculateStretchyData(style, false, width);
    411     if (m_stretchType == StretchType::GlyphAssembly)
    412         m_width = width;
     402        if (m_operatorType == Type::VerticalOperator) {
     403            m_ascent = targetSize;
     404            m_descent = 0;
     405        } else
     406            m_width = targetSize;
     407    }
    413408}
    414409
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp

    r203280 r203289  
    204204    m_stretchDepthBelowBaseline *= aspect;
    205205
    206     m_mathOperator.stretchTo(style(), m_stretchHeightAboveBaseline, m_stretchDepthBelowBaseline);
     206    m_mathOperator.stretchTo(style(), m_stretchHeightAboveBaseline + m_stretchDepthBelowBaseline);
    207207
    208208    setLogicalHeight(m_mathOperator.ascent() + m_mathOperator.descent());
     
    362362}
    363363
     364LayoutUnit RenderMathMLOperator::verticalStretchedOperatorShift() const
     365{
     366    if (!m_isVertical || !stretchSize())
     367        return 0;
     368
     369    return (m_stretchDepthBelowBaseline - m_stretchHeightAboveBaseline - m_mathOperator.descent() + m_mathOperator.ascent()) / 2;
     370}
     371
    364372Optional<int> RenderMathMLOperator::firstLineBaseline() const
    365373{
    366374    if (useMathOperator())
    367         return Optional<int>(std::lround(static_cast<float>(m_mathOperator.ascent())));
     375        return Optional<int>(std::lround(static_cast<float>(m_mathOperator.ascent() - verticalStretchedOperatorShift())));
    368376    return RenderMathMLToken::firstLineBaseline();
    369377}
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h

    r203228 r203289  
    8484    void setOperatorPropertiesFromOpDictEntry(const MathMLOperatorDictionary::Entry*);
    8585
     86    LayoutUnit verticalStretchedOperatorShift() const;
     87
    8688    LayoutUnit m_stretchHeightAboveBaseline;
    8789    LayoutUnit m_stretchDepthBelowBaseline;
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

    r202977 r203289  
    204204    // Stretch the radical operator to cover the base height.
    205205    // We can then determine the metrics of the radical operator + the base.
    206     m_radicalOperator.stretchTo(style(), baseAscent, baseDescent);
     206    m_radicalOperator.stretchTo(style(), baseAscent + baseDescent);
    207207    LayoutUnit radicalOperatorHeight = m_radicalOperator.ascent() + m_radicalOperator.descent();
    208208    LayoutUnit indexBottomRaise = m_degreeBottomRaisePercent * radicalOperatorHeight;
Note: See TracChangeset for help on using the changeset viewer.