Changeset 202973 in webkit


Ignore:
Timestamp:
Jul 8, 2016 2:37:57 AM (8 years ago)
Author:
fred.wang@free.fr
Message:

Use OpenType MATH constant AxisHeight.
https://bugs.webkit.org/show_bug.cgi?id=133567

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

Source/WebCore:

We make RenderMathMLOperator and RenderMathMLTable use the OpenType MATH constant AxisHeight.
These are the only remaining cases to handle since RenderMathMLFraction already uses that constant.

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

imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html

  • rendering/mathml/RenderMathMLBlock.cpp: Make RenderMathMLTable use the math axis

for its vertical alignment and update a bit the comments.
(WebCore::axisHeight): Move the code in a static function that can be called by
RenderMathMLBlock and RenderMathMLTable.
(WebCore::RenderMathMLBlock::mathAxisHeight): Use axisHeight.
(WebCore::RenderMathMLTable::firstLineBaseline): Ditto.

  • rendering/mathml/RenderMathMLOperator.cpp:

(WebCore::RenderMathMLOperator::stretchTo):

LayoutTests:

Import tests from the MathML in HTML5 test suite to verify the AxisHeight parameter.

  • imported/mathml-in-html5/fonts/math/axisheight5000-verticalarrow14000.woff: Added.
  • imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt: Added.
  • imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html: Added.
  • imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html: Added.
  • imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-expected.txt: Added.
Location:
trunk
Files:
7 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r202972 r202973  
     12016-07-08  Frederic Wang  <fwang@igalia.com>
     2
     3        Use OpenType MATH constant AxisHeight.
     4        https://bugs.webkit.org/show_bug.cgi?id=133567
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Import tests from the MathML in HTML5 test suite to verify the AxisHeight parameter.
     9
     10        * imported/mathml-in-html5/fonts/math/axisheight5000-verticalarrow14000.woff: Added.
     11        * imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1-expected.txt: Added.
     12        * imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html: Added.
     13        * imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html: Added.
     14        * imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-expected.txt: Added.
     15
    1162016-07-08  Manuel Rego Casasnovas  <rego@igalia.com>
    217
  • trunk/LayoutTests/platform/gtk/mathml/opentype/vertical-expected.txt

    r202934 r202973  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x371
    4   RenderBlock {HTML} at (0,0) size 800x371
    5     RenderBody {BODY} at (8,16) size 784x339
     3layer at (0,0) size 800x358
     4  RenderBlock {HTML} at (0,0) size 800x358
     5    RenderBody {BODY} at (8,16) size 784x326
    66      RenderBlock {P} at (0,0) size 784x18
    77        RenderMathMLMath {math} at (0,2) size 100x16 [padding: 0 1 0 1]
     
    6868          RenderMathMLSpace {mspace} at (98,4) size 0x8
    6969        RenderText {#text} at (0,0) size 0x0
    70       RenderBlock {P} at (0,34) size 784x30
    71         RenderMathMLMath {math} at (0,0) size 142x30 [padding: 0 1 0 1]
    72           RenderMathMLOperator {mo} at (1,0) size 8x30
     70      RenderBlock {P} at (0,34) size 784x24
     71        RenderMathMLMath {math} at (0,0) size 128x24 [padding: 0 1 0 1]
     72          RenderMathMLOperator {mo} at (1,0) size 7x24
    7373            RenderBlock (anonymous) at (0,0) size 4x16
    7474              RenderText {#text} at (0,-45) size 4x106
    7575                text run at (0,-45) width 4: "["
    76           RenderMathMLOperator {mo} at (9,0) size 8x30
     76          RenderMathMLOperator {mo} at (8,0) size 7x24
    7777            RenderBlock (anonymous) at (0,0) size 4x16
    7878              RenderText {#text} at (0,-45) size 4x106
    7979                text run at (0,-45) width 4: "]"
    80           RenderMathMLOperator {mo} at (17,0) size 11x30
     80          RenderMathMLOperator {mo} at (15,0) size 10x24
    8181            RenderBlock (anonymous) at (0,0) size 8x16
    8282              RenderText {#text} at (0,-45) size 8x106
    8383                text run at (0,-45) width 8: "{"
    84           RenderMathMLOperator {mo} at (28,0) size 11x30
     84          RenderMathMLOperator {mo} at (25,0) size 10x24
    8585            RenderBlock (anonymous) at (0,0) size 8x16
    8686              RenderText {#text} at (0,-45) size 8x106
    8787                text run at (0,-45) width 8: "}"
    88           RenderMathMLOperator {mo} at (39,0) size 10x30
     88          RenderMathMLOperator {mo} at (35,0) size 8x24
    8989            RenderBlock (anonymous) at (0,0) size 6x16
    9090              RenderText {#text} at (0,-45) size 6x106
    9191                text run at (0,-45) width 6: "("
    92           RenderMathMLOperator {mo} at (49,0) size 10x30
     92          RenderMathMLOperator {mo} at (43,0) size 8x24
    9393            RenderBlock (anonymous) at (0,0) size 6x16
    9494              RenderText {#text} at (0,-45) size 6x106
    9595                text run at (0,-45) width 6: ")"
    96           RenderMathMLOperator {mo} at (59,1) size 8x28
     96          RenderMathMLOperator {mo} at (51,0) size 8x24
    9797            RenderBlock (anonymous) at (0,0) size 4x16
    9898              RenderText {#text} at (0,-45) size 4x106
    9999                text run at (0,-45) width 4: "|"
    100           RenderMathMLOperator {mo} at (66,0) size 9x30
     100          RenderMathMLOperator {mo} at (58,0) size 9x24
    101101            RenderBlock (anonymous) at (0,0) size 7x16
    102102              RenderText {#text} at (0,-45) size 7x106
    103103                text run at (0,-45) width 7: "\x{2308}"
    104           RenderMathMLOperator {mo} at (74,0) size 9x30
     104          RenderMathMLOperator {mo} at (66,0) size 9x24
    105105            RenderBlock (anonymous) at (0,0) size 7x16
    106106              RenderText {#text} at (0,-45) size 7x106
    107107                text run at (0,-45) width 7: "\x{2309}"
    108           RenderMathMLOperator {mo} at (82,0) size 9x30
     108          RenderMathMLOperator {mo} at (74,0) size 9x24
    109109            RenderBlock (anonymous) at (0,0) size 7x16
    110110              RenderText {#text} at (0,-45) size 7x106
    111111                text run at (0,-45) width 7: "\x{230A}"
    112           RenderMathMLOperator {mo} at (90,0) size 9x30
     112          RenderMathMLOperator {mo} at (82,0) size 9x24
    113113            RenderBlock (anonymous) at (0,0) size 7x16
    114114              RenderText {#text} at (0,-45) size 7x106
    115115                text run at (0,-45) width 7: "\x{230B}"
    116           RenderMathMLOperator {mo} at (98,0) size 12x30
     116          RenderMathMLOperator {mo} at (90,0) size 10x24
    117117            RenderBlock (anonymous) at (0,0) size 7x16
    118118              RenderText {#text} at (0,-45) size 7x106
    119119                text run at (0,-45) width 7: "\x{27E6}"
    120           RenderMathMLOperator {mo} at (109,0) size 12x30
     120          RenderMathMLOperator {mo} at (99,0) size 10x24
    121121            RenderBlock (anonymous) at (0,0) size 7x16
    122122              RenderText {#text} at (0,-45) size 7x106
    123123                text run at (0,-45) width 7: "\x{27E7}"
    124           RenderMathMLOperator {mo} at (120,0) size 11x30
     124          RenderMathMLOperator {mo} at (108,0) size 10x24
    125125            RenderBlock (anonymous) at (0,0) size 6x16
    126126              RenderText {#text} at (0,-45) size 6x106
    127127                text run at (0,-45) width 6: "\x{27E8}"
    128           RenderMathMLOperator {mo} at (130,0) size 11x30
     128          RenderMathMLOperator {mo} at (117,0) size 10x24
    129129            RenderBlock (anonymous) at (0,0) size 6x16
    130130              RenderText {#text} at (0,-45) size 6x106
    131131                text run at (0,-45) width 6: "\x{27E9}"
    132           RenderMathMLSpace {mspace} at (140,3) size 0x16
    133         RenderText {#text} at (141,5) size 5x17
    134           text run at (141,5) width 5: " "
    135         RenderMathMLMath {math} at (145,3) size 212x23 [padding: 0 1 0 1]
     132          RenderMathMLSpace {mspace} at (126,0) size 0x16
     133        RenderText {#text} at (127,2) size 5x17
     134          text run at (127,2) width 5: " "
     135        RenderMathMLMath {math} at (131,0) size 212x23 [padding: 0 1 0 1]
    136136          RenderMathMLOperator {mo} at (1,1) size 17x22
    137137            RenderBlock (anonymous) at (0,0) size 8x15
     
    184184          RenderMathMLSpace {mspace} at (209,0) size 0x16
    185185        RenderText {#text} at (0,0) size 0x0
    186       RenderBlock {P} at (0,80) size 784x48
    187         RenderMathMLMath {math} at (0,0) size 190x48 [padding: 0 1 0 1]
    188           RenderMathMLOperator {mo} at (1,0) size 11x48
     186      RenderBlock {P} at (0,74) size 784x42
     187        RenderMathMLMath {math} at (0,0) size 160x42 [padding: 0 1 0 1]
     188          RenderMathMLOperator {mo} at (1,1) size 8x40
    189189            RenderBlock (anonymous) at (0,0) size 4x16
    190190              RenderText {#text} at (0,-45) size 4x106
    191191                text run at (0,-45) width 4: "["
    192           RenderMathMLOperator {mo} at (12,0) size 11x48
     192          RenderMathMLOperator {mo} at (9,1) size 8x40
    193193            RenderBlock (anonymous) at (0,0) size 4x16
    194194              RenderText {#text} at (0,-45) size 4x106
    195195                text run at (0,-45) width 4: "]"
    196           RenderMathMLOperator {mo} at (23,0) size 14x48
     196          RenderMathMLOperator {mo} at (17,1) size 12x40
    197197            RenderBlock (anonymous) at (0,0) size 8x16
    198198              RenderText {#text} at (0,-45) size 8x106
    199199                text run at (0,-45) width 8: "{"
    200           RenderMathMLOperator {mo} at (37,0) size 14x48
     200          RenderMathMLOperator {mo} at (29,1) size 12x40
    201201            RenderBlock (anonymous) at (0,0) size 8x16
    202202              RenderText {#text} at (0,-45) size 8x106
    203203                text run at (0,-45) width 8: "}"
    204           RenderMathMLOperator {mo} at (51,0) size 14x48
     204          RenderMathMLOperator {mo} at (41,1) size 12x40
    205205            RenderBlock (anonymous) at (0,0) size 6x16
    206206              RenderText {#text} at (0,-45) size 6x106
    207207                text run at (0,-45) width 6: "("
    208           RenderMathMLOperator {mo} at (65,0) size 14x48
     208          RenderMathMLOperator {mo} at (53,1) size 12x40
    209209            RenderBlock (anonymous) at (0,0) size 6x16
    210210              RenderText {#text} at (0,-45) size 6x106
    211211                text run at (0,-45) width 6: ")"
    212           RenderMathMLOperator {mo} at (79,3) size 8x42
     212          RenderMathMLOperator {mo} at (65,0) size 8x42
    213213            RenderBlock (anonymous) at (0,0) size 4x16
    214214              RenderText {#text} at (0,-45) size 4x106
    215215                text run at (0,-45) width 4: "|"
    216           RenderMathMLOperator {mo} at (86,0) size 11x48
     216          RenderMathMLOperator {mo} at (72,1) size 10x40
    217217            RenderBlock (anonymous) at (0,0) size 7x16
    218218              RenderText {#text} at (0,-45) size 7x106
    219219                text run at (0,-45) width 7: "\x{2308}"
    220           RenderMathMLOperator {mo} at (96,0) size 11x48
     220          RenderMathMLOperator {mo} at (81,1) size 10x40
    221221            RenderBlock (anonymous) at (0,0) size 7x16
    222222              RenderText {#text} at (0,-45) size 7x106
    223223                text run at (0,-45) width 7: "\x{2309}"
    224           RenderMathMLOperator {mo} at (106,0) size 11x48
     224          RenderMathMLOperator {mo} at (90,1) size 10x40
    225225            RenderBlock (anonymous) at (0,0) size 7x16
    226226              RenderText {#text} at (0,-45) size 7x106
    227227                text run at (0,-45) width 7: "\x{230A}"
    228           RenderMathMLOperator {mo} at (116,0) size 11x48
     228          RenderMathMLOperator {mo} at (99,1) size 10x40
    229229            RenderBlock (anonymous) at (0,0) size 7x16
    230230              RenderText {#text} at (0,-45) size 7x106
    231231                text run at (0,-45) width 7: "\x{230B}"
    232           RenderMathMLOperator {mo} at (126,0) size 17x48
     232          RenderMathMLOperator {mo} at (108,1) size 14x40
    233233            RenderBlock (anonymous) at (0,0) size 7x16
    234234              RenderText {#text} at (0,-45) size 7x106
    235235                text run at (0,-45) width 7: "\x{27E6}"
    236           RenderMathMLOperator {mo} at (142,0) size 17x48
     236          RenderMathMLOperator {mo} at (121,1) size 14x40
    237237            RenderBlock (anonymous) at (0,0) size 7x16
    238238              RenderText {#text} at (0,-45) size 7x106
    239239                text run at (0,-45) width 7: "\x{27E7}"
    240           RenderMathMLOperator {mo} at (158,0) size 16x48
     240          RenderMathMLOperator {mo} at (134,1) size 13x40
    241241            RenderBlock (anonymous) at (0,0) size 6x16
    242242              RenderText {#text} at (0,-45) size 6x106
    243243                text run at (0,-45) width 6: "\x{27E8}"
    244           RenderMathMLOperator {mo} at (173,0) size 16x48
     244          RenderMathMLOperator {mo} at (146,1) size 13x40
    245245            RenderBlock (anonymous) at (0,0) size 6x16
    246246              RenderText {#text} at (0,-45) size 6x106
    247247                text run at (0,-45) width 6: "\x{27E9}"
    248           RenderMathMLSpace {mspace} at (188,4) size 0x24
     248          RenderMathMLSpace {mspace} at (158,1) size 0x24
    249249        RenderText {#text} at (0,0) size 0x0
    250       RenderBlock {P} at (0,144) size 784x58
     250      RenderBlock {P} at (0,132) size 784x58
    251251        RenderMathMLMath {math} at (0,0) size 194x58 [padding: 0 1 0 1]
    252           RenderMathMLOperator {mo} at (1,1) size 11x57
     252          RenderMathMLOperator {mo} at (1,1) size 11x56
    253253            RenderBlock (anonymous) at (0,0) size 4x16
    254254              RenderText {#text} at (0,-45) size 4x106
    255255                text run at (0,-45) width 4: "["
    256           RenderMathMLOperator {mo} at (12,1) size 11x57
     256          RenderMathMLOperator {mo} at (12,1) size 11x56
    257257            RenderBlock (anonymous) at (0,0) size 4x16
    258258              RenderText {#text} at (0,-45) size 4x106
    259259                text run at (0,-45) width 4: "]"
    260           RenderMathMLOperator {mo} at (23,1) size 14x57
     260          RenderMathMLOperator {mo} at (23,1) size 14x56
    261261            RenderBlock (anonymous) at (0,0) size 8x16
    262262              RenderText {#text} at (0,-45) size 8x106
    263263                text run at (0,-45) width 8: "{"
    264           RenderMathMLOperator {mo} at (37,1) size 14x57
     264          RenderMathMLOperator {mo} at (37,1) size 14x56
    265265            RenderBlock (anonymous) at (0,0) size 8x16
    266266              RenderText {#text} at (0,-45) size 8x106
    267267                text run at (0,-45) width 8: "}"
    268           RenderMathMLOperator {mo} at (51,1) size 14x57
     268          RenderMathMLOperator {mo} at (51,1) size 14x56
    269269            RenderBlock (anonymous) at (0,0) size 6x16
    270270              RenderText {#text} at (0,-45) size 6x106
    271271                text run at (0,-45) width 6: "("
    272           RenderMathMLOperator {mo} at (65,1) size 14x57
     272          RenderMathMLOperator {mo} at (65,1) size 14x56
    273273            RenderBlock (anonymous) at (0,0) size 6x16
    274274              RenderText {#text} at (0,-45) size 6x106
     
    278278              RenderText {#text} at (0,-45) size 4x106
    279279                text run at (0,-45) width 4: "|"
    280           RenderMathMLOperator {mo} at (86,1) size 12x57
     280          RenderMathMLOperator {mo} at (86,1) size 12x56
    281281            RenderBlock (anonymous) at (0,0) size 7x16
    282282              RenderText {#text} at (0,-45) size 7x106
    283283                text run at (0,-45) width 7: "\x{2308}"
    284           RenderMathMLOperator {mo} at (97,1) size 12x57
     284          RenderMathMLOperator {mo} at (97,1) size 12x56
    285285            RenderBlock (anonymous) at (0,0) size 7x16
    286286              RenderText {#text} at (0,-45) size 7x106
    287287                text run at (0,-45) width 7: "\x{2309}"
    288           RenderMathMLOperator {mo} at (108,1) size 12x57
     288          RenderMathMLOperator {mo} at (108,1) size 12x56
    289289            RenderBlock (anonymous) at (0,0) size 7x16
    290290              RenderText {#text} at (0,-45) size 7x106
    291291                text run at (0,-45) width 7: "\x{230A}"
    292           RenderMathMLOperator {mo} at (119,1) size 12x57
     292          RenderMathMLOperator {mo} at (119,1) size 12x56
    293293            RenderBlock (anonymous) at (0,0) size 7x16
    294294              RenderText {#text} at (0,-45) size 7x106
    295295                text run at (0,-45) width 7: "\x{230B}"
    296           RenderMathMLOperator {mo} at (130,1) size 17x57
     296          RenderMathMLOperator {mo} at (130,1) size 17x56
    297297            RenderBlock (anonymous) at (0,0) size 7x16
    298298              RenderText {#text} at (0,-45) size 7x106
    299299                text run at (0,-45) width 7: "\x{27E6}"
    300           RenderMathMLOperator {mo} at (146,1) size 17x57
     300          RenderMathMLOperator {mo} at (146,1) size 17x56
    301301            RenderBlock (anonymous) at (0,0) size 7x16
    302302              RenderText {#text} at (0,-45) size 7x106
     
    364364          RenderMathMLSpace {mspace} at (210,0) size 0x32
    365365        RenderText {#text} at (0,0) size 0x0
    366       RenderBlock {P} at (0,218) size 784x121
    367         RenderMathMLMath {math} at (0,0) size 194x121 [padding: 0 1 0 1]
    368           RenderMathMLOperator {mo} at (1,0) size 11x121
     366      RenderBlock {P} at (0,206) size 784x120
     367        RenderMathMLMath {math} at (0,0) size 194x120 [padding: 0 1 0 1]
     368          RenderMathMLOperator {mo} at (1,0) size 11x120
    369369            RenderBlock (anonymous) at (0,0) size 4x16
    370370              RenderText {#text} at (0,-45) size 4x106
    371371                text run at (0,-45) width 4: "["
    372           RenderMathMLOperator {mo} at (12,0) size 11x121
     372          RenderMathMLOperator {mo} at (12,0) size 11x120
    373373            RenderBlock (anonymous) at (0,0) size 4x16
    374374              RenderText {#text} at (0,-45) size 4x106
    375375                text run at (0,-45) width 4: "]"
    376           RenderMathMLOperator {mo} at (23,0) size 14x121
     376          RenderMathMLOperator {mo} at (23,0) size 14x120
    377377            RenderBlock (anonymous) at (0,0) size 8x16
    378378              RenderText {#text} at (0,-45) size 8x106
    379379                text run at (0,-45) width 8: "{"
    380           RenderMathMLOperator {mo} at (37,0) size 14x121
     380          RenderMathMLOperator {mo} at (37,0) size 14x120
    381381            RenderBlock (anonymous) at (0,0) size 8x16
    382382              RenderText {#text} at (0,-45) size 8x106
    383383                text run at (0,-45) width 8: "}"
    384           RenderMathMLOperator {mo} at (51,0) size 14x121
     384          RenderMathMLOperator {mo} at (51,0) size 14x120
    385385            RenderBlock (anonymous) at (0,0) size 6x16
    386386              RenderText {#text} at (0,-45) size 6x106
    387387                text run at (0,-45) width 6: "("
    388           RenderMathMLOperator {mo} at (65,0) size 14x121
     388          RenderMathMLOperator {mo} at (65,0) size 14x120
    389389            RenderBlock (anonymous) at (0,0) size 6x16
    390390              RenderText {#text} at (0,-45) size 6x106
    391391                text run at (0,-45) width 6: ")"
    392           RenderMathMLOperator {mo} at (79,0) size 8x121
     392          RenderMathMLOperator {mo} at (79,0) size 8x120
    393393            RenderBlock (anonymous) at (0,0) size 4x16
    394394              RenderText {#text} at (0,-45) size 4x106
    395395                text run at (0,-45) width 4: "|"
    396           RenderMathMLOperator {mo} at (86,0) size 12x121
     396          RenderMathMLOperator {mo} at (86,0) size 12x120
    397397            RenderBlock (anonymous) at (0,0) size 7x16
    398398              RenderText {#text} at (0,-45) size 7x106
    399399                text run at (0,-45) width 7: "\x{2308}"
    400           RenderMathMLOperator {mo} at (97,0) size 12x121
     400          RenderMathMLOperator {mo} at (97,0) size 12x120
    401401            RenderBlock (anonymous) at (0,0) size 7x16
    402402              RenderText {#text} at (0,-45) size 7x106
    403403                text run at (0,-45) width 7: "\x{2309}"
    404           RenderMathMLOperator {mo} at (108,0) size 12x121
     404          RenderMathMLOperator {mo} at (108,0) size 12x120
    405405            RenderBlock (anonymous) at (0,0) size 7x16
    406406              RenderText {#text} at (0,-45) size 7x106
    407407                text run at (0,-45) width 7: "\x{230A}"
    408           RenderMathMLOperator {mo} at (119,0) size 12x121
     408          RenderMathMLOperator {mo} at (119,0) size 12x120
    409409            RenderBlock (anonymous) at (0,0) size 7x16
    410410              RenderText {#text} at (0,-45) size 7x106
    411411                text run at (0,-45) width 7: "\x{230B}"
    412           RenderMathMLOperator {mo} at (130,0) size 17x121
     412          RenderMathMLOperator {mo} at (130,0) size 17x120
    413413            RenderBlock (anonymous) at (0,0) size 7x16
    414414              RenderText {#text} at (0,-45) size 7x106
    415415                text run at (0,-45) width 7: "\x{27E6}"
    416           RenderMathMLOperator {mo} at (146,0) size 17x121
     416          RenderMathMLOperator {mo} at (146,0) size 17x120
    417417            RenderBlock (anonymous) at (0,0) size 7x16
    418418              RenderText {#text} at (0,-45) size 7x106
  • trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt

    r202934 r202973  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x270
    4   RenderBlock {HTML} at (0,0) size 800x270
    5     RenderBody {BODY} at (8,8) size 784x254
    6       RenderMathMLMath {math} at (0,0) size 140x36 [padding: 0 1 0 1]
    7         RenderMathMLRow {mrow} at (1,0) size 138x36
    8           RenderMathMLOperator {mo} at (0,3) size 10x30
    9             RenderBlock (anonymous) at (0,0) size 6x16
    10               RenderText {#text} at (0,-45) size 6x106
    11                 text run at (0,-45) width 6: "("
    12           RenderMathMLOperator {mo} at (10,3) size 10x30
    13             RenderBlock (anonymous) at (0,0) size 6x16
    14               RenderText {#text} at (0,-45) size 6x106
    15                 text run at (0,-45) width 6: ")"
    16           RenderMathMLOperator {mo} at (20,3) size 11x30
    17             RenderBlock (anonymous) at (0,0) size 8x16
    18               RenderText {#text} at (0,-45) size 8x106
    19                 text run at (0,-45) width 8: "{"
    20           RenderMathMLOperator {mo} at (31,3) size 11x30
    21             RenderBlock (anonymous) at (0,0) size 8x16
    22               RenderText {#text} at (0,-45) size 8x106
    23                 text run at (0,-45) width 8: "}"
    24           RenderMathMLOperator {mo} at (42,3) size 8x30
    25             RenderBlock (anonymous) at (0,0) size 4x16
    26               RenderText {#text} at (0,-45) size 4x106
    27                 text run at (0,-45) width 4: "["
    28           RenderMathMLOperator {mo} at (50,3) size 8x30
    29             RenderBlock (anonymous) at (0,0) size 4x16
    30               RenderText {#text} at (0,-45) size 4x106
    31                 text run at (0,-45) width 4: "]"
    32           RenderMathMLOperator {mo} at (58,3) size 8x30
    33             RenderBlock (anonymous) at (0,0) size 7x16
    34               RenderText {#text} at (0,-45) size 7x106
    35                 text run at (0,-45) width 7: "\x{2308}"
    36           RenderMathMLOperator {mo} at (66,3) size 8x30
    37             RenderBlock (anonymous) at (0,0) size 7x16
    38               RenderText {#text} at (0,-45) size 7x106
    39                 text run at (0,-45) width 7: "\x{2309}"
    40           RenderMathMLOperator {mo} at (74,3) size 8x30
    41             RenderBlock (anonymous) at (0,0) size 7x16
    42               RenderText {#text} at (0,-45) size 7x106
    43                 text run at (0,-45) width 7: "\x{230A}"
    44           RenderMathMLOperator {mo} at (82,3) size 8x30
    45             RenderBlock (anonymous) at (0,0) size 7x16
    46               RenderText {#text} at (0,-45) size 7x106
    47                 text run at (0,-45) width 7: "\x{230B}"
    48           RenderMathMLOperator {mo} at (90,0) size 17x36
    49             RenderBlock (anonymous) at (0,0) size 11x18
    50               RenderText {#text} at (0,-44) size 11x106
    51                 text run at (0,-44) width 11: "\x{222B}"
    52           RenderMathMLOperator {mo} at (106,4) size 9x28
    53             RenderBlock (anonymous) at (0,0) size 4x16
    54               RenderText {#text} at (0,-45) size 4x106
    55                 text run at (0,-45) width 4: "|"
    56           RenderMathMLOperator {mo} at (114,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 (120,10) size 18x16
    61             RenderBlock (anonymous) at (0,0) size 8x16
    62               RenderText {#text} at (0,-45) size 8x106
    63                 text run at (0,-45) width 8: "\x{2225}"
    64       RenderText {#text} at (139,8) size 5x17
    65         text run at (139,8) width 5: " "
     3layer at (0,0) size 800x268
     4  RenderBlock {HTML} at (0,0) size 800x268
     5    RenderBody {BODY} at (8,8) size 784x252
     6      RenderMathMLMath {math} at (0,0) size 132x36 [padding: 0 1 0 1]
     7        RenderMathMLRow {mrow} at (1,0) size 130x36
     8          RenderMathMLOperator {mo} at (0,6) size 8x24
     9            RenderBlock (anonymous) at (0,0) size 6x16
     10              RenderText {#text} at (0,-45) size 6x106
     11                text run at (0,-45) width 6: "("
     12          RenderMathMLOperator {mo} at (8,6) size 8x24
     13            RenderBlock (anonymous) at (0,0) size 6x16
     14              RenderText {#text} at (0,-45) size 6x106
     15                text run at (0,-45) width 6: ")"
     16          RenderMathMLOperator {mo} at (16,6) size 10x24
     17            RenderBlock (anonymous) at (0,0) size 8x16
     18              RenderText {#text} at (0,-45) size 8x106
     19                text run at (0,-45) width 8: "{"
     20          RenderMathMLOperator {mo} at (26,6) size 10x24
     21            RenderBlock (anonymous) at (0,0) size 8x16
     22              RenderText {#text} at (0,-45) size 8x106
     23                text run at (0,-45) width 8: "}"
     24          RenderMathMLOperator {mo} at (36,6) size 7x24
     25            RenderBlock (anonymous) at (0,0) size 4x16
     26              RenderText {#text} at (0,-45) size 4x106
     27                text run at (0,-45) width 4: "["
     28          RenderMathMLOperator {mo} at (43,6) size 7x24
     29            RenderBlock (anonymous) at (0,0) size 4x16
     30              RenderText {#text} at (0,-45) size 4x106
     31                text run at (0,-45) width 4: "]"
     32          RenderMathMLOperator {mo} at (50,6) size 8x24
     33            RenderBlock (anonymous) at (0,0) size 7x16
     34              RenderText {#text} at (0,-45) size 7x106
     35                text run at (0,-45) width 7: "\x{2308}"
     36          RenderMathMLOperator {mo} at (58,6) size 8x24
     37            RenderBlock (anonymous) at (0,0) size 7x16
     38              RenderText {#text} at (0,-45) size 7x106
     39                text run at (0,-45) width 7: "\x{2309}"
     40          RenderMathMLOperator {mo} at (66,6) size 8x24
     41            RenderBlock (anonymous) at (0,0) size 7x16
     42              RenderText {#text} at (0,-45) size 7x106
     43                text run at (0,-45) width 7: "\x{230A}"
     44          RenderMathMLOperator {mo} at (74,6) size 8x24
     45            RenderBlock (anonymous) at (0,0) size 7x16
     46              RenderText {#text} at (0,-45) size 7x106
     47                text run at (0,-45) width 7: "\x{230B}"
     48          RenderMathMLOperator {mo} at (82,0) size 17x36
     49            RenderBlock (anonymous) at (0,0) size 11x18
     50              RenderText {#text} at (0,-44) size 11x106
     51                text run at (0,-44) width 11: "\x{222B}"
     52          RenderMathMLOperator {mo} at (98,6) size 9x24
     53            RenderBlock (anonymous) at (0,0) size 4x16
     54              RenderText {#text} at (0,-45) size 4x106
     55                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
     61            RenderBlock (anonymous) at (0,0) size 8x16
     62              RenderText {#text} at (0,-45) size 8x106
     63                text run at (0,-45) width 8: "\x{2225}"
     64      RenderText {#text} at (131,8) size 5x17
     65        text run at (131,8) width 5: " "
    6666      RenderBR {BR} at (0,0) size 0x0
    67       RenderMathMLMath {math} at (0,36) size 172x143 [padding: 0 1 0 1]
    68         RenderMathMLRow {mrow} at (1,0) size 170x143
    69           RenderMathMLOperator {mo} at (0,0) size 14x143
    70             RenderBlock (anonymous) at (0,0) size 6x16
    71               RenderText {#text} at (0,-45) size 6x106
    72                 text run at (0,-45) width 6: "("
    73           RenderMathMLOperator {mo} at (14,0) size 14x143
    74             RenderBlock (anonymous) at (0,0) size 6x16
    75               RenderText {#text} at (0,-45) size 6x106
    76                 text run at (0,-45) width 6: ")"
    77           RenderMathMLOperator {mo} at (28,0) size 14x143
    78             RenderBlock (anonymous) at (0,0) size 8x16
    79               RenderText {#text} at (0,-45) size 8x106
    80                 text run at (0,-45) width 8: "{"
    81           RenderMathMLOperator {mo} at (42,0) size 14x143
    82             RenderBlock (anonymous) at (0,0) size 8x16
    83               RenderText {#text} at (0,-45) size 8x106
    84                 text run at (0,-45) width 8: "}"
    85           RenderMathMLOperator {mo} at (56,0) size 11x143
    86             RenderBlock (anonymous) at (0,0) size 4x16
    87               RenderText {#text} at (0,-45) size 4x106
    88                 text run at (0,-45) width 4: "["
    89           RenderMathMLOperator {mo} at (67,0) size 11x143
    90             RenderBlock (anonymous) at (0,0) size 4x16
    91               RenderText {#text} at (0,-45) size 4x106
    92                 text run at (0,-45) width 4: "]"
    93           RenderMathMLOperator {mo} at (78,0) size 11x143
    94             RenderBlock (anonymous) at (0,0) size 7x16
    95               RenderText {#text} at (0,-45) size 7x106
    96                 text run at (0,-45) width 7: "\x{2308}"
    97           RenderMathMLOperator {mo} at (89,0) size 11x143
    98             RenderBlock (anonymous) at (0,0) size 7x16
    99               RenderText {#text} at (0,-45) size 7x106
    100                 text run at (0,-45) width 7: "\x{2309}"
    101           RenderMathMLOperator {mo} at (100,0) size 11x143
    102             RenderBlock (anonymous) at (0,0) size 7x16
    103               RenderText {#text} at (0,-45) size 7x106
    104                 text run at (0,-45) width 7: "\x{230A}"
    105           RenderMathMLOperator {mo} at (111,0) size 11x143
     67      RenderMathMLMath {math} at (0,36) size 172x142 [padding: 0 1 0 1]
     68        RenderMathMLRow {mrow} at (1,0) size 170x142
     69          RenderMathMLOperator {mo} at (0,0) size 14x142
     70            RenderBlock (anonymous) at (0,0) size 6x16
     71              RenderText {#text} at (0,-45) size 6x106
     72                text run at (0,-45) width 6: "("
     73          RenderMathMLOperator {mo} at (14,0) size 14x142
     74            RenderBlock (anonymous) at (0,0) size 6x16
     75              RenderText {#text} at (0,-45) size 6x106
     76                text run at (0,-45) width 6: ")"
     77          RenderMathMLOperator {mo} at (28,0) size 14x142
     78            RenderBlock (anonymous) at (0,0) size 8x16
     79              RenderText {#text} at (0,-45) size 8x106
     80                text run at (0,-45) width 8: "{"
     81          RenderMathMLOperator {mo} at (42,0) size 14x142
     82            RenderBlock (anonymous) at (0,0) size 8x16
     83              RenderText {#text} at (0,-45) size 8x106
     84                text run at (0,-45) width 8: "}"
     85          RenderMathMLOperator {mo} at (56,0) size 11x142
     86            RenderBlock (anonymous) at (0,0) size 4x16
     87              RenderText {#text} at (0,-45) size 4x106
     88                text run at (0,-45) width 4: "["
     89          RenderMathMLOperator {mo} at (67,0) size 11x142
     90            RenderBlock (anonymous) at (0,0) size 4x16
     91              RenderText {#text} at (0,-45) size 4x106
     92                text run at (0,-45) width 4: "]"
     93          RenderMathMLOperator {mo} at (78,0) size 11x142
     94            RenderBlock (anonymous) at (0,0) size 7x16
     95              RenderText {#text} at (0,-45) size 7x106
     96                text run at (0,-45) width 7: "\x{2308}"
     97          RenderMathMLOperator {mo} at (89,0) size 11x142
     98            RenderBlock (anonymous) at (0,0) size 7x16
     99              RenderText {#text} at (0,-45) size 7x106
     100                text run at (0,-45) width 7: "\x{2309}"
     101          RenderMathMLOperator {mo} at (100,0) size 11x142
     102            RenderBlock (anonymous) at (0,0) size 7x16
     103              RenderText {#text} at (0,-45) size 7x106
     104                text run at (0,-45) width 7: "\x{230A}"
     105          RenderMathMLOperator {mo} at (111,0) size 11x142
    106106            RenderBlock (anonymous) at (0,0) size 7x16
    107107              RenderText {#text} at (0,-45) size 7x106
     
    111111              RenderText {#text} at (0,-44) size 11x106
    112112                text run at (0,-44) width 11: "\x{222B}"
    113           RenderMathMLOperator {mo} at (138,0) size 9x143
     113          RenderMathMLOperator {mo} at (138,0) size 9x142
    114114            RenderBlock (anonymous) at (0,0) size 4x16
    115115              RenderText {#text} at (0,-45) size 4x106
     
    126126      RenderText {#text} at (171,97) size 5x17
    127127        text run at (171,97) width 5: " "
    128       RenderMathMLMath {math} at (175,61) size 172x93 [padding: 0 1 0 1]
    129         RenderMathMLRow {mrow} at (1,0) size 170x93
    130           RenderMathMLOperator {mo} at (0,0) size 14x93
    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 14x93
    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 14x93
    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 14x93
    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 11x93
    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 11x93
    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 11x93
    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 11x93
    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 11x93
    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 11x93
     128      RenderMathMLMath {math} at (175,61) size 172x92 [padding: 0 1 0 1]
     129        RenderMathMLRow {mrow} at (1,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
    167167            RenderBlock (anonymous) at (0,0) size 7x16
    168168              RenderText {#text} at (0,-45) size 7x106
     
    172172              RenderText {#text} at (0,-44) size 11x106
    173173                text run at (0,-44) width 11: "\x{222B}"
    174           RenderMathMLOperator {mo} at (138,0) size 9x93
     174          RenderMathMLOperator {mo} at (138,0) size 9x92
    175175            RenderBlock (anonymous) at (0,0) size 4x16
    176176              RenderText {#text} at (0,-45) size 4x106
     
    249249        text run at (493,97) width 5: " "
    250250      RenderBR {BR} at (0,0) size 0x0
    251       RenderMathMLMath {math} at (0,179) size 187x76 [padding: 0 1 0 1]
    252         RenderMathMLRoot {msqrt} at (1,0) size 185x76
    253           RenderMathMLOperator {mo} at (17,2) size 14x74
    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 14x74
    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 14x74
    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 14x74
    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 11x74
    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 11x74
    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 11x74
    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 11x74
    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 11x74
    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 11x74
     251      RenderMathMLMath {math} at (0,178) size 187x75 [padding: 0 1 0 1]
     252        RenderMathMLRoot {msqrt} at (1,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
    290290            RenderBlock (anonymous) at (0,0) size 7x16
    291291              RenderText {#text} at (0,-45) size 7x106
     
    295295              RenderText {#text} at (0,-44) size 11x106
    296296                text run at (0,-44) width 11: "\x{222B}"
    297           RenderMathMLOperator {mo} at (155,2) size 9x74
     297          RenderMathMLOperator {mo} at (155,2) size 9x73
    298298            RenderBlock (anonymous) at (0,0) size 4x16
    299299              RenderText {#text} at (0,-45) size 4x106
  • trunk/Source/WebCore/ChangeLog

    r202972 r202973  
     12016-07-08  Frederic Wang  <fwang@igalia.com>
     2
     3        Use OpenType MATH constant AxisHeight.
     4        https://bugs.webkit.org/show_bug.cgi?id=133567
     5
     6        Reviewed by Brent Fulgham.
     7
     8        We make RenderMathMLOperator and RenderMathMLTable use the OpenType MATH constant AxisHeight.
     9        These are the only remaining cases to handle since RenderMathMLFraction already uses that constant.
     10
     11        Tests: imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html
     12              imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html
     13
     14        * rendering/mathml/RenderMathMLBlock.cpp: Make RenderMathMLTable use the math axis
     15        for its vertical alignment and update a bit the comments.
     16        (WebCore::axisHeight): Move the code in a static function that can be called by
     17        RenderMathMLBlock and RenderMathMLTable.
     18        (WebCore::RenderMathMLBlock::mathAxisHeight): Use axisHeight.
     19        (WebCore::RenderMathMLTable::firstLineBaseline): Ditto.
     20        * rendering/mathml/RenderMathMLOperator.cpp:
     21        (WebCore::RenderMathMLOperator::stretchTo):
     22
    1232016-07-08  Manuel Rego Casasnovas  <rego@igalia.com>
    224
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp

    r202960 r202973  
    6868}
    6969
    70 LayoutUnit RenderMathMLBlock::mathAxisHeight() const
    71 {
    72     const auto& primaryFont = style().fontCascade().primaryFont();
     70static LayoutUnit axisHeight(const RenderStyle& style)
     71{
     72    // If we have a MATH table we just return the AxisHeight constant.
     73    const auto& primaryFont = style.fontCascade().primaryFont();
    7374    if (auto* mathData = primaryFont.mathData())
    7475        return mathData->getMathConstant(primaryFont, OpenTypeMathData::AxisHeight);
    7576
    76     return style().fontMetrics().xHeight() / 2;
     77    // Otherwise, the idea is to try and use the middle of operators as the math axis which we thus approximate by "half of the x-height".
     78    // Note that Gecko has a slower but more accurate version that measures half of the height of U+2212 MINUS SIGN.
     79    return style.fontMetrics().xHeight() / 2;
     80}
     81
     82LayoutUnit RenderMathMLBlock::mathAxisHeight() const
     83{
     84    return axisHeight(style());
    7785}
    7886
     
    305313Optional<int> RenderMathMLTable::firstLineBaseline() const
    306314{
    307     // In legal MathML, we'll have a MathML parent. That RenderFlexibleBox parent will use our firstLineBaseline() for baseline alignment, per
    308     // http://dev.w3.org/csswg/css3-flexbox/#flex-baselines. We want to vertically center an <mtable>, such as a matrix. Essentially the whole <mtable> element fits on a
    309     // single line, whose baseline gives this centering. This is different than RenderTable::firstLineBoxBaseline, which returns the baseline of the first row of a <table>.
    310     return (logicalHeight() + style().fontMetrics().xHeight()) / 2;
     315    // By default the vertical center of <mtable> is aligned on the math axis.
     316    // This is different than RenderTable::firstLineBoxBaseline, which returns the baseline of the first row of a <table>.
     317    return Optional<int>(logicalHeight() / 2 + axisHeight(style()));
    311318}
    312319
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp

    r202727 r202973  
    186186    if (hasOperatorFlag(MathMLOperatorDictionary::Symmetric)) {
    187187        // We make the operator stretch symmetrically above and below the axis.
    188         // FIXME: We should read the axis from the MATH table (https://bugs.webkit.org/show_bug.cgi?id=122297). For now, we use the same value as in RenderMathMLFraction::firstLineBaseline().
    189         LayoutUnit axis = style().fontMetrics().xHeight() / 2;
     188        LayoutUnit axis = mathAxisHeight();
    190189        LayoutUnit halfStretchSize = std::max(m_stretchHeightAboveBaseline - axis, m_stretchDepthBelowBaseline + axis);
    191190        m_stretchHeightAboveBaseline = halfStretchSize + axis;
Note: See TracChangeset for help on using the changeset viewer.