Changeset 199295 in webkit


Ignore:
Timestamp:
Apr 11, 2016 8:38:46 AM (8 years ago)
Author:
fred.wang@free.fr
Message:

Refactor RenderMathMLFraction layout to avoid using flexbox
https://bugs.webkit.org/show_bug.cgi?id=153917

Patch by Frederic Wang <fwang@igalia.com> on 2016-04-11
Reviewed by Sergio Villar Senin.

Source/WebCore:

Based on a patch by Alejandro G. Castro <alex@igalia.com>

Implement the layoutBlock method to handle the layout calculations
directly in the class. This also fixes parsing of absolute values for
linethickness attribute (e.g. 10px) and adds support for the AxisHeight
and FractionRuleThickness MATH parameters.

Test: mathml/opentype/fraction-line.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::mathLineThickness): Use the thickness relative to the
default line thickness since that's really what is expected by mathml-line-fraction.html

  • css/mathml.css: Remove flexbox properties for mfrac.

(mfrac): Deleted.
(mfrac > *): Deleted.
(mfrac[numalign="left"] > :first-child): Deleted.
(mfrac[numalign="right"] > :first-child): Deleted.
(mfrac[denomalign="left"] > :last-child): Deleted.
(mfrac[denomalign="right"] > :last-child): Deleted.
(mfrac > :first-child): Deleted.
(mfrac > :last-child): Deleted.
(mfrac): Deleted.

  • rendering/mathml/RenderMathMLBlock.cpp: Introduce a helper function to retrieve the math

axis height.
(WebCore::RenderMathMLBlock::mathAxisHeight):

  • rendering/mathml/RenderMathMLBlock.h: Declare mathAxisHeight.
  • rendering/mathml/RenderMathMLFraction.cpp:

(WebCore::RenderMathMLFraction::RenderMathMLFraction):
(WebCore::RenderMathMLFraction::parseAlignmentAttribute): Helper function to parse the align
attribute.
(WebCore::RenderMathMLFraction::isValid): Helper function to verify whether the child list
is valid with respect to the MathML specificitation.
(WebCore::RenderMathMLFraction::numerator): Helper function to retrieve the numerator.
(WebCore::RenderMathMLFraction::denominator): Helper function to retrieve the denominator.
(WebCore::RenderMathMLFraction::updateFromElement): Use the FractionRuleThickness parameter
when avaiable to calculate the default linethickness.
Fix computation of linethickness for absolute values (e.g. 10px), the default linethickness
must not be involved for such values.
We no longer need to manage style of anonymous wrappers.
(WebCore::RenderMathMLFraction::unembellishedOperator): Use the helper function and we no
longer care about anonymous wrappers.
(WebCore::RenderMathMLFraction::computePreferredLogicalWidths): Implement this function
without using flexbox.
(WebCore::RenderMathMLFraction::horizontalOffset): Helper function to get the horizontal
offsets of children depending of the alignment.
(WebCore::RenderMathMLFraction::layoutBlock): Implement this function without using flexbox.
(WebCore::RenderMathMLFraction::paint): Do not paint if the fraction is invalid. Use helper
function. Use the width of the renderer (instead of the one of the denominator) as the
length of the fraction bar.
(WebCore::RenderMathMLFraction::firstLineBaseline): Use the helper functions to get children
and axis height.
(WebCore::RenderMathMLFraction::paintChildren): Temporary function to remove in a
follow-up patch.
(WebCore::RenderMathMLFraction::fixChildStyle): Deleted. We no longer need to manage style
of anonymous wrappers.
(WebCore::RenderMathMLFraction::addChild): Deleted. We no longer need to manage
anonymous wrappers.
(WebCore::RenderMathMLFraction::styleDidChange): We no longer need to manage style of
anonymous wrappers.
(WebCore::RenderMathMLFraction::layout): Deleted.

  • rendering/mathml/RenderMathMLFraction.h: Replace lineThickness with relativeLineThickness,

as needed by the accessibility code. Update function and members declarations.

LayoutTests:

  • TestExpectations: No longer skip mathml/presentation/fractions-positions.html
  • mathml/opentype/fraction-line-expected.html: Added. New test to verify AxisHeight and

FractionRuleThickness parameters.

  • mathml/opentype/fraction-line.html: Added. New test to verify axis height and rule

thickness parameters.

  • mathml/presentation/fractions-linethickness-expected.html: Adjust the test to be sure that

the default rule thickness is 1px.

  • mathml/presentation/fractions-linethickness.html: Adjust the test to be sure that the

default rule thickness is 1px.

  • platform/gtk/mathml/presentation/roots-expected.txt: Update reference to take into account

changes in the render tree.

  • platform/ios-simulator/mathml/presentation/roots-expected.txt: Ditto
  • platform/mac/TestExpectations: Mark fraction-line and fractions-linethickness as

possibly failing since these tests require Latin Modern Math to work reliably.

  • platform/ios-simulator/TestExpectations: Ditto
Location:
trunk
Files:
2 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r199294 r199295  
     12016-04-11  Frederic Wang  <fwang@igalia.com>
     2
     3        Refactor RenderMathMLFraction layout to avoid using flexbox
     4        https://bugs.webkit.org/show_bug.cgi?id=153917
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        * TestExpectations: No longer skip mathml/presentation/fractions-positions.html
     9        * mathml/opentype/fraction-line-expected.html: Added. New test to verify AxisHeight and
     10        FractionRuleThickness parameters.
     11        * mathml/opentype/fraction-line.html: Added. New test to verify axis height and rule
     12        thickness parameters.
     13        * mathml/presentation/fractions-linethickness-expected.html: Adjust the test to be sure that
     14        the default rule thickness is 1px.
     15        * mathml/presentation/fractions-linethickness.html: Adjust the test to be sure that the
     16        default rule thickness is 1px.
     17        * platform/gtk/mathml/presentation/roots-expected.txt: Update reference to take into account
     18        changes in the render tree.
     19        * platform/ios-simulator/mathml/presentation/roots-expected.txt: Ditto
     20        * platform/mac/TestExpectations: Mark fraction-line and fractions-linethickness as
     21        possibly failing since these tests require Latin Modern Math to work reliably.
     22        * platform/ios-simulator/TestExpectations: Ditto
     23
    1242016-04-11  Commit Queue  <commit-queue@webkit.org>
    225
  • trunk/LayoutTests/TestExpectations

    r199236 r199295  
    112112# This test verifies dynamic manipulation of the mroot and msqrt elements.
    113113mathml/roots-removeChild.html [ ImageOnlyFailure ]
    114 
    115 # There is a small 1px size difference but this will be fixed when we refactor completely RenderMathMLFraction.
    116 mathml/presentation/fractions-positions.html [ Skip ]
    117114
    118115# For now we ignore margin/padding/border properties of MathML renderers.
  • trunk/LayoutTests/mathml/presentation/fractions-linethickness-expected.html

    r152849 r199295  
    44    <title>fractions linethickness</title>
    55    <meta charset="utf-8"/>
     6    <style type="text/css">
     7      /* For Latin Modern Math
     8         FractionRuleThickness = 40 * 25 / 1000 = 1px;
     9       */
     10      math {
     11        font-family: "Latin Modern Math";
     12        font-size: 25px;
     13      }
     14    </style>
    615  </head>
    716  <body>
     
    2130      -->
    2231
    23     <math mathsize="32px">
     32    <math>
    2433      <mfrac linethickness="0.33px"><mn>1</mn><mn>2</mn></mfrac>
    2534      <mfrac linethickness="1px"><mn>1</mn><mn>2</mn></mfrac>
  • trunk/LayoutTests/mathml/presentation/fractions-linethickness.html

    r152849 r199295  
    44    <title>fractions linethickness</title>
    55    <meta charset="utf-8"/>
     6    <style type="text/css">
     7      /* For Latin Modern Math
     8         FractionRuleThickness = 40 * 25 / 1000 = 1px;
     9       */
     10      math {
     11        font-family: "Latin Modern Math";
     12        font-size: 25px;
     13      }
     14    </style>
    615  </head>
    716  <body>
    817
    918    <!-- This should draw fraction bars of increasing thickness -->
    10     <math mathsize="32px">
     19    <math>
    1120      <mfrac linethickness="thin"><mn>1</mn><mn>2</mn></mfrac>
    1221      <mfrac linethickness="medium"><mn>1</mn><mn>2</mn></mfrac>
  • trunk/LayoutTests/platform/gtk/mathml/presentation/roots-expected.txt

    r170418 r199295  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x492
    4   RenderBlock {html} at (0,0) size 800x492
    5     RenderBody {body} at (8,16) size 784x460
     3layer at (0,0) size 800x491
     4  RenderBlock {html} at (0,0) size 800x491
     5    RenderBody {body} at (8,16) size 784x459
    66      RenderBlock {p} at (0,0) size 784x18
    77        RenderText {#text} at (0,0) size 177x17
     
    8787        RenderText {#text} at (0,8) size 113x17
    8888          text run at (0,8) width 113: "root of a fraction: "
    89         RenderMathMLMath {math} at (113,0) size 58x41 [padding: 0 1 0 1]
    90           RenderMathMLSquareRoot {msqrt} at (1,0) size 56x41
     89        RenderMathMLMath {math} at (113,0) size 56x41 [padding: 0 1 0 1]
     90          RenderMathMLSquareRoot {msqrt} at (1,0) size 54x41
    9191            RenderMathMLBlock (anonymous, flex) at (0,0) size 17x41
    9292              RenderMathMLRadicalOperator (anonymous) at (0,0) size 17x41
     
    9595                    RenderText at (0,-56) size 13x106
    9696                      text run at (0,-56) width 13: "\x{221A}"
    97             RenderMathMLRootWrapper at (17,2) size 39x39
    98               RenderMathMLFraction {mfrac} at (1,0) size 37x34
    99                 RenderMathMLBlock (anonymous, flex) at (0,0) size 37x17
    100                   RenderMathMLRow {mrow} at (0,0) size 37x13
    101                     RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
    102                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
    103                         RenderBlock (anonymous) at (0,0) size 8x8
    104                           RenderText {#text} at (0,-50) size 8x106
    105                             text run at (0,-50) width 8: "x"
    106                     RenderMathMLOperator {mo} at (9,1) size 20x12
    107                       RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    108                         RenderBlock (anonymous) at (0,0) size 12x12
    109                           RenderText at (0,-47) size 12x106
    110                             text run at (0,-47) width 12: "+"
    111                     RenderMathMLToken {mn} at (28,0) size 9x12
    112                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    113                         RenderBlock (anonymous) at (0,0) size 8x12
    114                           RenderText {#text} at (0,-46) size 8x106
    115                             text run at (0,-46) width 8: "1"
    116                 RenderMathMLBlock (anonymous, flex) at (0,16) size 37x18 [padding: 1 0 0 0]
    117                   RenderMathMLRow {mrow} at (0,4) size 37x14
    118                     RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
    119                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
    120                         RenderBlock (anonymous) at (0,0) size 8x8
    121                           RenderText {#text} at (0,-50) size 8x106
    122                             text run at (0,-50) width 8: "x"
    123                     RenderMathMLOperator {mo} at (9,1) size 20x12
    124                       RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    125                         RenderBlock (anonymous) at (0,0) size 12x12
    126                           RenderText at (0,-47) size 12x106
    127                             text run at (0,-47) width 12: "+"
    128                     RenderMathMLToken {mn} at (28,0) size 9x12
    129                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    130                         RenderBlock (anonymous) at (0,0) size 8x12
    131                           RenderText {#text} at (0,-46) size 8x106
    132                             text run at (0,-46) width 8: "2"
     97            RenderMathMLRootWrapper at (17,2) size 37x39
     98              RenderMathMLFraction {mfrac} at (0,0) size 37x34
     99                RenderMathMLRow {mrow} at (0,0) size 37x13
     100                  RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
     101                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
     102                      RenderBlock (anonymous) at (0,0) size 8x8
     103                        RenderText {#text} at (0,-50) size 8x106
     104                          text run at (0,-50) width 8: "x"
     105                  RenderMathMLOperator {mo} at (9,1) size 20x12
     106                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
     107                      RenderBlock (anonymous) at (0,0) size 12x12
     108                        RenderText at (0,-47) size 12x106
     109                          text run at (0,-47) width 12: "+"
     110                  RenderMathMLToken {mn} at (28,0) size 9x12
     111                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
     112                      RenderBlock (anonymous) at (0,0) size 8x12
     113                        RenderText {#text} at (0,-46) size 8x106
     114                          text run at (0,-46) width 8: "1"
     115                RenderMathMLRow {mrow} at (0,20) size 37x14
     116                  RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
     117                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
     118                      RenderBlock (anonymous) at (0,0) size 8x8
     119                        RenderText {#text} at (0,-50) size 8x106
     120                          text run at (0,-50) width 8: "x"
     121                  RenderMathMLOperator {mo} at (9,1) size 20x12
     122                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
     123                      RenderBlock (anonymous) at (0,0) size 12x12
     124                        RenderText at (0,-47) size 12x106
     125                          text run at (0,-47) width 12: "+"
     126                  RenderMathMLToken {mn} at (28,0) size 9x12
     127                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
     128                      RenderBlock (anonymous) at (0,0) size 8x12
     129                        RenderText {#text} at (0,-46) size 8x106
     130                          text run at (0,-46) width 8: "2"
    133131      RenderBlock {p} at (0,159) size 784x18
    134132        RenderText {#text} at (0,0) size 173x17
     
    201199        RenderText {#text} at (0,8) size 185x17
    202200          text run at (0,8) width 185: "long index w/ complex base: "
    203         RenderMathMLMath {math} at (185,0) size 92x41 [padding: 0 1 0 1]
    204           RenderMathMLRoot {mroot} at (1,0) size 90x41
     201        RenderMathMLMath {math} at (185,0) size 90x41 [padding: 0 1 0 1]
     202          RenderMathMLRoot {mroot} at (1,0) size 88x41
    205203            RenderMathMLRootWrapper at (4,8) size 40x33
    206204              RenderMathMLRow {mrow} at (0,0) size 39x8
     
    236234                    RenderText at (0,-56) size 13x106
    237235                      text run at (0,-56) width 13: "\x{221A}"
    238             RenderMathMLRootWrapper at (51,2) size 39x39
    239               RenderMathMLFraction {mfrac} at (1,0) size 37x34
    240                 RenderMathMLBlock (anonymous, flex) at (0,0) size 37x17
    241                   RenderMathMLRow {mrow} at (0,0) size 37x13
    242                     RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
    243                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
    244                         RenderBlock (anonymous) at (0,0) size 8x8
    245                           RenderText {#text} at (0,-50) size 8x106
    246                             text run at (0,-50) width 8: "x"
    247                     RenderMathMLOperator {mo} at (9,1) size 20x12
    248                       RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    249                         RenderBlock (anonymous) at (0,0) size 12x12
    250                           RenderText at (0,-47) size 12x106
    251                             text run at (0,-47) width 12: "+"
    252                     RenderMathMLToken {mn} at (28,0) size 9x12
    253                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    254                         RenderBlock (anonymous) at (0,0) size 8x12
    255                           RenderText {#text} at (0,-46) size 8x106
    256                             text run at (0,-46) width 8: "1"
    257                 RenderMathMLBlock (anonymous, flex) at (0,16) size 37x18 [padding: 1 0 0 0]
    258                   RenderMathMLRow {mrow} at (0,4) size 37x14
    259                     RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
    260                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
    261                         RenderBlock (anonymous) at (0,0) size 8x8
    262                           RenderText {#text} at (0,-50) size 8x106
    263                             text run at (0,-50) width 8: "x"
    264                     RenderMathMLOperator {mo} at (9,1) size 20x12
    265                       RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    266                         RenderBlock (anonymous) at (0,0) size 12x12
    267                           RenderText at (0,-47) size 12x106
    268                             text run at (0,-47) width 12: "+"
    269                     RenderMathMLToken {mn} at (28,0) size 9x12
    270                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    271                         RenderBlock (anonymous) at (0,0) size 8x12
    272                           RenderText {#text} at (0,-46) size 8x106
    273                             text run at (0,-46) width 8: "2"
    274       RenderBlock {p} at (0,283) size 784x35
    275         RenderText {#text} at (0,17) size 75x17
    276           text run at (0,17) width 75: "high index: "
    277         RenderMathMLMath {math} at (75,0) size 33x36 [padding: 0 1 0 1]
    278           RenderMathMLRoot {mroot} at (1,0) size 31x36
    279             RenderMathMLRootWrapper at (4,0) size 11x36
    280               RenderMathMLFraction {mfrac} at (1,0) size 8x26
    281                 RenderMathMLBlock (anonymous, flex) at (0,0) size 8x18
    282                   RenderMathMLFraction {mfrac} at (1,0) size 6x16
    283                     RenderMathMLBlock (anonymous, flex) at (0,0) size 6x7
    284                       RenderMathMLToken {mi} at (0,0) size 6x5 [padding: 0 1 0 0]
    285                         RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
    286                           RenderBlock (anonymous) at (0,0) size 5x5
    287                             RenderText {#text} at (0,-29) size 5x61
    288                               text run at (0,-29) width 5: "x"
    289                     RenderMathMLBlock (anonymous, flex) at (0,6) size 6x10 [padding: 1 0 0 0]
    290                       RenderMathMLToken {mi} at (0,2) size 6x7 [padding: 0 1 0 0]
    291                         RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
    292                           RenderBlock (anonymous) at (0,0) size 5x6
    293                             RenderText {#text} at (0,-29) size 5x61
    294                               text run at (0,-29) width 5: "y"
    295                 RenderMathMLBlock (anonymous, flex) at (0,17) size 8x9 [padding: 1 0 0 0]
    296                   RenderMathMLToken {mi} at (1,2) size 6x6 [padding: 0 1 0 0]
    297                     RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
    298                       RenderBlock (anonymous) at (0,0) size 4x5
    299                         RenderText {#text} at (0,-29) size 4x61
    300                           text run at (0,-29) width 4: "z"
    301             RenderMathMLBlock (anonymous, flex) at (5,0) size 18x36
    302               RenderMathMLRadicalOperator (anonymous) at (0,18) size 17x18
     236            RenderMathMLRootWrapper at (51,2) size 37x39
     237              RenderMathMLFraction {mfrac} at (0,0) size 37x34
     238                RenderMathMLRow {mrow} at (0,0) size 37x13
     239                  RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
     240                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
     241                      RenderBlock (anonymous) at (0,0) size 8x8
     242                        RenderText {#text} at (0,-50) size 8x106
     243                          text run at (0,-50) width 8: "x"
     244                  RenderMathMLOperator {mo} at (9,1) size 20x12
     245                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
     246                      RenderBlock (anonymous) at (0,0) size 12x12
     247                        RenderText at (0,-47) size 12x106
     248                          text run at (0,-47) width 12: "+"
     249                  RenderMathMLToken {mn} at (28,0) size 9x12
     250                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
     251                      RenderBlock (anonymous) at (0,0) size 8x12
     252                        RenderText {#text} at (0,-46) size 8x106
     253                          text run at (0,-46) width 8: "1"
     254                RenderMathMLRow {mrow} at (0,20) size 37x14
     255                  RenderMathMLToken {mi} at (0,4) size 10x8 [padding: 0 2 0 0]
     256                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x8
     257                      RenderBlock (anonymous) at (0,0) size 8x8
     258                        RenderText {#text} at (0,-50) size 8x106
     259                          text run at (0,-50) width 8: "x"
     260                  RenderMathMLOperator {mo} at (9,1) size 20x12
     261                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
     262                      RenderBlock (anonymous) at (0,0) size 12x12
     263                        RenderText at (0,-47) size 12x106
     264                          text run at (0,-47) width 12: "+"
     265                  RenderMathMLToken {mn} at (28,0) size 9x12
     266                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
     267                      RenderBlock (anonymous) at (0,0) size 8x12
     268                        RenderText {#text} at (0,-46) size 8x106
     269                          text run at (0,-46) width 8: "2"
     270      RenderBlock {p} at (0,283) size 784x34
     271        RenderText {#text} at (0,16) size 75x17
     272          text run at (0,16) width 75: "high index: "
     273        RenderMathMLMath {math} at (75,0) size 29x35 [padding: 0 1 0 1]
     274          RenderMathMLRoot {mroot} at (1,0) size 27x35
     275            RenderMathMLRootWrapper at (4,0) size 7x35
     276              RenderMathMLFraction {mfrac} at (0,0) size 6x24
     277                RenderMathMLFraction {mfrac} at (0,0) size 6x15
     278                  RenderMathMLToken {mi} at (0,0) size 6x5 [padding: 0 1 0 0]
     279                    RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
     280                      RenderBlock (anonymous) at (0,0) size 5x5
     281                        RenderText {#text} at (0,-29) size 5x61
     282                          text run at (0,-29) width 5: "x"
     283                  RenderMathMLToken {mi} at (0,8) size 6x7 [padding: 0 1 0 0]
     284                    RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
     285                      RenderBlock (anonymous) at (0,0) size 5x6
     286                        RenderText {#text} at (0,-29) size 5x61
     287                          text run at (0,-29) width 5: "y"
     288                RenderMathMLToken {mi} at (0,18) size 6x6 [padding: 0 1 0 0]
     289                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
     290                    RenderBlock (anonymous) at (0,0) size 4x5
     291                      RenderText {#text} at (0,-29) size 4x61
     292                        text run at (0,-29) width 4: "z"
     293            RenderMathMLBlock (anonymous, flex) at (1,0) size 18x35
     294              RenderMathMLRadicalOperator (anonymous) at (0,17) size 17x18
    303295                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x17
    304296                  RenderBlock (anonymous) at (0,0) size 13x17
    305297                    RenderText at (0,-56) size 13x106
    306298                      text run at (0,-56) width 13: "\x{221A}"
    307             RenderMathMLRootWrapper at (22,20) size 9x16
     299            RenderMathMLRootWrapper at (18,18) size 9x17
    308300              RenderMathMLToken {mn} at (0,0) size 8x12
    309301                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
     
    311303                    RenderText {#text} at (0,-46) size 8x106
    312304                      text run at (0,-46) width 8: "2"
    313       RenderBlock {p} at (0,334) size 784x54
     305      RenderBlock {p} at (0,333) size 784x54
    314306        RenderText {#text} at (0,14) size 155x17
    315307          text run at (0,14) width 155: "Imbricated square roots: "
     
    461453                                                              text run at (0,-45) width 12: "A"
    462454        RenderText {#text} at (0,0) size 0x0
    463       RenderBlock {p} at (0,404) size 784x56
    464         RenderText {#text} at (0,25) size 110x17
    465           text run at (0,25) width 110: "Imbricated roots: "
    466         RenderMathMLMath {math} at (110,0) size 366x57 [padding: 0 1 0 1]
    467           RenderMathMLRoot {mroot} at (1,0) size 364x57
     455      RenderBlock {p} at (0,403) size 784x56
     456        RenderText {#text} at (0,24) size 110x17
     457          text run at (0,24) width 110: "Imbricated roots: "
     458        RenderMathMLMath {math} at (110,0) size 364x57 [padding: 0 1 0 1]
     459          RenderMathMLRoot {mroot} at (1,0) size 362x57
    468460            RenderMathMLRootWrapper at (4,15) size 6x42
    469461              RenderMathMLToken {mn} at (0,0) size 5x7
     
    478470                    RenderText at (0,-56) size 13x106
    479471                      text run at (0,-56) width 13: "\x{221A}"
    480             RenderMathMLRootWrapper at (17,2) size 347x55
    481               RenderMathMLRow {mrow} at (0,0) size 346x55
    482                 RenderMathMLToken {mn} at (0,26) size 8x12
     472            RenderMathMLRootWrapper at (17,2) size 345x55
     473              RenderMathMLRow {mrow} at (0,0) size 344x55
     474                RenderMathMLToken {mn} at (0,25) size 8x12
    483475                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    484476                    RenderBlock (anonymous) at (0,0) size 8x12
    485477                      RenderText {#text} at (0,-46) size 8x106
    486478                        text run at (0,-46) width 8: "1"
    487                 RenderMathMLOperator {mo} at (8,27) size 20x12
     479                RenderMathMLOperator {mo} at (8,26) size 20x12
    488480                  RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    489481                    RenderBlock (anonymous) at (0,0) size 12x12
    490482                      RenderText at (0,-47) size 12x106
    491483                        text run at (0,-47) width 12: "+"
    492                 RenderMathMLRoot {mroot} at (27,0) size 319x55
     484                RenderMathMLRoot {mroot} at (27,0) size 317x55
    493485                  RenderMathMLRootWrapper at (4,14) size 6x41
    494486                    RenderMathMLToken {mn} at (0,0) size 5x8
     
    503495                          RenderText at (0,-56) size 13x106
    504496                            text run at (0,-56) width 13: "\x{221A}"
    505                   RenderMathMLRootWrapper at (17,2) size 302x53
    506                     RenderMathMLRow {mrow} at (0,0) size 302x53
    507                       RenderMathMLToken {mn} at (0,24) size 8x12
     497                  RenderMathMLRootWrapper at (17,2) size 300x53
     498                    RenderMathMLRow {mrow} at (0,0) size 300x53
     499                      RenderMathMLToken {mn} at (0,23) size 8x12
    508500                        RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    509501                          RenderBlock (anonymous) at (0,0) size 8x12
    510502                            RenderText {#text} at (0,-46) size 8x106
    511503                              text run at (0,-46) width 8: "2"
    512                       RenderMathMLOperator {mo} at (8,25) size 20x12
     504                      RenderMathMLOperator {mo} at (8,24) size 20x12
    513505                        RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    514506                          RenderBlock (anonymous) at (0,0) size 12x12
    515507                            RenderText at (0,-47) size 12x106
    516508                              text run at (0,-47) width 12: "+"
    517                       RenderMathMLRoot {mroot} at (27,0) size 275x53
     509                      RenderMathMLRoot {mroot} at (27,0) size 273x53
    518510                        RenderMathMLRootWrapper at (4,14) size 6x39
    519511                          RenderMathMLToken {mn} at (0,0) size 5x7
     
    528520                                RenderText at (0,-56) size 13x106
    529521                                  text run at (0,-56) width 13: "\x{221A}"
    530                         RenderMathMLRootWrapper at (17,2) size 258x51
    531                           RenderMathMLRow {mrow} at (0,0) size 257x51
    532                             RenderMathMLToken {mn} at (0,22) size 8x12
     522                        RenderMathMLRootWrapper at (17,2) size 256x51
     523                          RenderMathMLRow {mrow} at (0,0) size 255x51
     524                            RenderMathMLToken {mn} at (0,21) size 8x12
    533525                              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    534526                                RenderBlock (anonymous) at (0,0) size 8x12
    535527                                  RenderText {#text} at (0,-46) size 8x106
    536528                                    text run at (0,-46) width 8: "3"
    537                             RenderMathMLOperator {mo} at (8,23) size 20x12
     529                            RenderMathMLOperator {mo} at (8,22) size 20x12
    538530                              RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    539531                                RenderBlock (anonymous) at (0,0) size 12x12
    540532                                  RenderText at (0,-47) size 12x106
    541533                                    text run at (0,-47) width 12: "+"
    542                             RenderMathMLRoot {mroot} at (27,0) size 230x51
     534                            RenderMathMLRoot {mroot} at (27,0) size 228x51
    543535                              RenderMathMLRootWrapper at (4,13) size 6x38
    544536                                RenderMathMLToken {mn} at (0,0) size 5x7
     
    553545                                      RenderText at (0,-56) size 13x106
    554546                                        text run at (0,-56) width 13: "\x{221A}"
    555                               RenderMathMLRootWrapper at (17,2) size 213x49
    556                                 RenderMathMLRow {mrow} at (0,0) size 212x49
    557                                   RenderMathMLToken {mn} at (0,20) size 8x12
     547                              RenderMathMLRootWrapper at (17,2) size 211x49
     548                                RenderMathMLRow {mrow} at (0,0) size 210x49
     549                                  RenderMathMLToken {mn} at (0,19) size 8x12
    558550                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    559551                                      RenderBlock (anonymous) at (0,0) size 8x12
    560552                                        RenderText {#text} at (0,-46) size 8x106
    561553                                          text run at (0,-46) width 8: "4"
    562                                   RenderMathMLOperator {mo} at (8,21) size 20x12
     554                                  RenderMathMLOperator {mo} at (8,20) size 20x12
    563555                                    RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    564556                                      RenderBlock (anonymous) at (0,0) size 12x12
    565557                                        RenderText at (0,-47) size 12x106
    566558                                          text run at (0,-47) width 12: "+"
    567                                   RenderMathMLRoot {mroot} at (27,0) size 185x49
     559                                  RenderMathMLRoot {mroot} at (27,0) size 183x49
    568560                                    RenderMathMLRootWrapper at (4,11) size 6x38
    569561                                      RenderMathMLToken {mn} at (0,0) size 5x8
     
    578570                                            RenderText at (0,-56) size 13x106
    579571                                              text run at (0,-56) width 13: "\x{221A}"
    580                                     RenderMathMLRootWrapper at (17,2) size 168x47
    581                                       RenderMathMLRow {mrow} at (0,0) size 168x41
    582                                         RenderMathMLToken {mn} at (0,18) size 8x12
     572                                    RenderMathMLRootWrapper at (17,2) size 166x47
     573                                      RenderMathMLRow {mrow} at (0,0) size 166x41
     574                                        RenderMathMLToken {mn} at (0,17) size 8x12
    583575                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    584576                                            RenderBlock (anonymous) at (0,0) size 8x12
    585577                                              RenderText {#text} at (0,-46) size 8x106
    586578                                                text run at (0,-46) width 8: "5"
    587                                         RenderMathMLOperator {mo} at (8,19) size 20x12
     579                                        RenderMathMLOperator {mo} at (8,18) size 20x12
    588580                                          RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    589581                                            RenderBlock (anonymous) at (0,0) size 12x12
    590582                                              RenderText at (0,-47) size 12x106
    591583                                                text run at (0,-47) width 12: "+"
    592                                         RenderMathMLRoot {mroot} at (27,0) size 141x41
     584                                        RenderMathMLRoot {mroot} at (27,0) size 139x41
    593585                                          RenderMathMLRootWrapper at (4,9) size 6x32
    594586                                            RenderMathMLToken {mn} at (0,0) size 5x7
     
    603595                                                  RenderText at (0,-56) size 13x106
    604596                                                    text run at (0,-56) width 13: "\x{221A}"
    605                                           RenderMathMLRootWrapper at (17,2) size 124x39
    606                                             RenderMathMLRow {mrow} at (0,0) size 123x31
    607                                               RenderMathMLToken {mn} at (0,16) size 8x12
     597                                          RenderMathMLRootWrapper at (17,2) size 122x39
     598                                            RenderMathMLRow {mrow} at (0,0) size 121x31
     599                                              RenderMathMLToken {mn} at (0,15) size 8x12
    608600                                                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    609601                                                  RenderBlock (anonymous) at (0,0) size 8x12
    610602                                                    RenderText {#text} at (0,-46) size 8x106
    611603                                                      text run at (0,-46) width 8: "6"
    612                                               RenderMathMLOperator {mo} at (8,17) size 20x12
     604                                              RenderMathMLOperator {mo} at (8,16) size 20x12
    613605                                                RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    614606                                                  RenderBlock (anonymous) at (0,0) size 12x12
    615607                                                    RenderText at (0,-47) size 12x106
    616608                                                      text run at (0,-47) width 12: "+"
    617                                               RenderMathMLRoot {mroot} at (27,0) size 96x31
     609                                              RenderMathMLRoot {mroot} at (27,0) size 94x31
    618610                                                RenderMathMLRootWrapper at (4,5) size 6x26
    619611                                                  RenderMathMLToken {mn} at (0,0) size 5x7
     
    628620                                                        RenderText at (0,-56) size 13x106
    629621                                                          text run at (0,-56) width 13: "\x{221A}"
    630                                                 RenderMathMLRootWrapper at (17,2) size 79x29
    631                                                   RenderMathMLRow {mrow} at (0,0) size 79x29
    632                                                     RenderMathMLToken {mn} at (0,14) size 8x12
     622                                                RenderMathMLRootWrapper at (17,2) size 77x29
     623                                                  RenderMathMLRow {mrow} at (0,0) size 77x28
     624                                                    RenderMathMLToken {mn} at (0,13) size 8x12
    633625                                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    634626                                                        RenderBlock (anonymous) at (0,0) size 8x12
    635627                                                          RenderText {#text} at (0,-46) size 8x106
    636628                                                            text run at (0,-46) width 8: "7"
    637                                                     RenderMathMLOperator {mo} at (8,15) size 20x12
     629                                                    RenderMathMLOperator {mo} at (8,14) size 20x12
    638630                                                      RenderMathMLBlock (anonymous, flex) at (3,0) size 13x12
    639631                                                        RenderBlock (anonymous) at (0,0) size 12x12
    640632                                                          RenderText at (0,-47) size 12x106
    641633                                                            text run at (0,-47) width 12: "+"
    642                                                     RenderMathMLRoot {mroot} at (27,0) size 52x29
    643                                                       RenderMathMLRootWrapper at (4,0) size 26x29
    644                                                         RenderMathMLFraction {mfrac} at (1,0) size 23x18
    645                                                           RenderMathMLBlock (anonymous, flex) at (0,0) size 23x10
    646                                                             RenderMathMLRow {mrow} at (0,0) size 23x8
    647                                                               RenderMathMLToken {mi} at (0,2) size 6x5 [padding: 0 1 0 0]
    648                                                                 RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
    649                                                                   RenderBlock (anonymous) at (0,0) size 5x5
    650                                                                     RenderText {#text} at (0,-29) size 5x61
    651                                                                       text run at (0,-29) width 5: "x"
    652                                                               RenderMathMLOperator {mo} at (5,0) size 12x7
    653                                                                 RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
    654                                                                   RenderBlock (anonymous) at (0,0) size 7x7
    655                                                                     RenderText at (0,-27) size 7x61
    656                                                                       text run at (0,-27) width 7: "+"
    657                                                               RenderMathMLToken {mi} at (16,2) size 7x6 [padding: 0 1 0 0]
    658                                                                 RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
    659                                                                   RenderBlock (anonymous) at (0,0) size 5x6
    660                                                                     RenderText {#text} at (0,-29) size 5x61
    661                                                                       text run at (0,-29) width 5: "y"
    662                                                           RenderMathMLBlock (anonymous, flex) at (0,9) size 23x9 [padding: 1 0 0 0]
    663                                                             RenderMathMLToken {mi} at (8,2) size 6x6 [padding: 0 1 0 0]
    664                                                               RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
    665                                                                 RenderBlock (anonymous) at (0,0) size 4x5
    666                                                                   RenderText {#text} at (0,-29) size 4x61
    667                                                                     text run at (0,-29) width 4: "z"
    668                                                       RenderMathMLBlock (anonymous, flex) at (20,0) size 18x29
    669                                                         RenderMathMLRadicalOperator (anonymous) at (0,11) size 17x18
     634                                                    RenderMathMLRoot {mroot} at (27,0) size 50x28
     635                                                      RenderMathMLRootWrapper at (4,0) size 24x28
     636                                                        RenderMathMLFraction {mfrac} at (0,0) size 23x17
     637                                                          RenderMathMLRow {mrow} at (0,0) size 23x8
     638                                                            RenderMathMLToken {mi} at (0,2) size 6x5 [padding: 0 1 0 0]
     639                                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x5
     640                                                                RenderBlock (anonymous) at (0,0) size 5x5
     641                                                                  RenderText {#text} at (0,-29) size 5x61
     642                                                                    text run at (0,-29) width 5: "x"
     643                                                            RenderMathMLOperator {mo} at (5,0) size 12x7
     644                                                              RenderMathMLBlock (anonymous, flex) at (2,0) size 7x7
     645                                                                RenderBlock (anonymous) at (0,0) size 7x7
     646                                                                  RenderText at (0,-27) size 7x61
     647                                                                    text run at (0,-27) width 7: "+"
     648                                                            RenderMathMLToken {mi} at (16,2) size 7x6 [padding: 0 1 0 0]
     649                                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x6
     650                                                                RenderBlock (anonymous) at (0,0) size 5x6
     651                                                                  RenderText {#text} at (0,-29) size 5x61
     652                                                                    text run at (0,-29) width 5: "y"
     653                                                          RenderMathMLToken {mi} at (8,11) size 6x6 [padding: 0 1 0 0]
     654                                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
     655                                                              RenderBlock (anonymous) at (0,0) size 4x5
     656                                                                RenderText {#text} at (0,-29) size 4x61
     657                                                                  text run at (0,-29) width 4: "z"
     658                                                      RenderMathMLBlock (anonymous, flex) at (18,0) size 18x28
     659                                                        RenderMathMLRadicalOperator (anonymous) at (0,10) size 17x18
    670660                                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 13x17
    671661                                                            RenderBlock (anonymous) at (0,0) size 13x17
    672662                                                              RenderText at (0,-56) size 13x106
    673663                                                                text run at (0,-56) width 13: "\x{221A}"
    674                                                       RenderMathMLRootWrapper at (37,12) size 14x17
     664                                                      RenderMathMLRootWrapper at (35,11) size 14x17
    675665                                                        RenderMathMLToken {mi} at (0,0) size 14x13 [padding: 0 2 0 0]
    676666                                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 12x13
  • trunk/LayoutTests/platform/ios-simulator/TestExpectations

    r199247 r199295  
    652652pageoverlay/overlay-large-document.html [ Failure ]
    653653webkit.org/b/153337 pageoverlay/overlay-installation.html [ Pass Failure ]
     654
     655# These tests require the Latin Modern Math font.
     656mathml/opentype/fraction-line.html [ Pass ImageOnlyFailure ]
     657mathml/presentation/fractions-linethickness.html [ Pass ImageOnlyFailure ]
    654658
    655659# MathML tests that fail:
  • trunk/LayoutTests/platform/ios-simulator/mathml/presentation/roots-expected.txt

    r174527 r199295  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x518
    4   RenderBlock {html} at (0,0) size 800x518
    5     RenderBody {body} at (8,16) size 784x486
     3layer at (0,0) size 800x517
     4  RenderBlock {html} at (0,0) size 800x517
     5    RenderBody {body} at (8,16) size 784x485
    66      RenderBlock {p} at (0,0) size 784x20
    77        RenderText {#text} at (0,0) size 181x19
     
    8787        RenderText {#text} at (0,8) size 117x19
    8888          text run at (0,8) width 117: "root of a fraction: "
    89         RenderMathMLMath {math} at (116,0) size 49x38 [padding: 0 1 0 1]
    90           RenderMathMLSquareRoot {msqrt} at (1,0) size 47x38
     89        RenderMathMLMath {math} at (116,0) size 47x38 [padding: 0 1 0 1]
     90          RenderMathMLSquareRoot {msqrt} at (1,0) size 45x38
    9191            RenderMathMLBlock (anonymous, flex) at (0,0) size 12x38
    9292              RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x38
     
    9595                    RenderText at (0,1) size 9x17
    9696                      text run at (0,1) width 9: "\x{221A}"
    97             RenderMathMLRootWrapper at (12,3) size 35x35
    98               RenderMathMLFraction {mfrac} at (1,0) size 33x32
    99                 RenderMathMLBlock (anonymous, flex) at (0,0) size 33x16
    100                   RenderMathMLRow {mrow} at (0,0) size 33x12
    101                     RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
    102                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
    103                         RenderBlock (anonymous) at (0,0) size 8x9
    104                           RenderText {#text} at (0,-4) size 8x17
    105                             text run at (0,-4) width 8: "x"
    106                     RenderMathMLOperator {mo} at (8,3) size 17x9
    107                       RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    108                         RenderBlock (anonymous) at (0,0) size 9x9
    109                           RenderText at (0,-4) size 9x17
    110                             text run at (0,-4) width 9: "+"
    111                     RenderMathMLToken {mn} at (24,0) size 9x12
    112                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    113                         RenderBlock (anonymous) at (0,0) size 8x12
    114                           RenderText {#text} at (0,-1) size 8x17
    115                             text run at (0,-1) width 8: "1"
    116                 RenderMathMLBlock (anonymous, flex) at (0,15) size 33x17 [padding: 1 0 0 0]
    117                   RenderMathMLRow {mrow} at (0,4) size 33x13
    118                     RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
    119                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
    120                         RenderBlock (anonymous) at (0,0) size 8x9
    121                           RenderText {#text} at (0,-4) size 8x17
    122                             text run at (0,-4) width 8: "x"
    123                     RenderMathMLOperator {mo} at (8,3) size 17x9
    124                       RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    125                         RenderBlock (anonymous) at (0,0) size 9x9
    126                           RenderText at (0,-4) size 9x17
    127                             text run at (0,-4) width 9: "+"
    128                     RenderMathMLToken {mn} at (24,0) size 9x12
    129                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    130                         RenderBlock (anonymous) at (0,0) size 8x12
    131                           RenderText {#text} at (0,-1) size 8x17
    132                             text run at (0,-1) width 8: "2"
     97            RenderMathMLRootWrapper at (12,3) size 33x35
     98              RenderMathMLFraction {mfrac} at (0,0) size 33x32
     99                RenderMathMLRow {mrow} at (0,0) size 33x12
     100                  RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
     101                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
     102                      RenderBlock (anonymous) at (0,0) size 8x9
     103                        RenderText {#text} at (0,-4) size 8x17
     104                          text run at (0,-4) width 8: "x"
     105                  RenderMathMLOperator {mo} at (8,3) size 17x9
     106                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
     107                      RenderBlock (anonymous) at (0,0) size 9x9
     108                        RenderText at (0,-4) size 9x17
     109                          text run at (0,-4) width 9: "+"
     110                  RenderMathMLToken {mn} at (24,0) size 9x12
     111                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
     112                      RenderBlock (anonymous) at (0,0) size 8x12
     113                        RenderText {#text} at (0,-1) size 8x17
     114                          text run at (0,-1) width 8: "1"
     115                RenderMathMLRow {mrow} at (0,19) size 33x13
     116                  RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
     117                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
     118                      RenderBlock (anonymous) at (0,0) size 8x9
     119                        RenderText {#text} at (0,-4) size 8x17
     120                          text run at (0,-4) width 8: "x"
     121                  RenderMathMLOperator {mo} at (8,3) size 17x9
     122                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
     123                      RenderBlock (anonymous) at (0,0) size 9x9
     124                        RenderText at (0,-4) size 9x17
     125                          text run at (0,-4) width 9: "+"
     126                  RenderMathMLToken {mn} at (24,0) size 9x12
     127                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
     128                      RenderBlock (anonymous) at (0,0) size 8x12
     129                        RenderText {#text} at (0,-1) size 8x17
     130                          text run at (0,-1) width 8: "2"
    133131      RenderBlock {p} at (0,165) size 784x20
    134132        RenderText {#text} at (0,0) size 177x19
     
    201199        RenderText {#text} at (0,8) size 188x19
    202200          text run at (0,8) width 188: "long index w/ complex base: "
    203         RenderMathMLMath {math} at (187,0) size 78x38 [padding: 0 1 0 1]
    204           RenderMathMLRoot {mroot} at (1,0) size 75x38
     201        RenderMathMLMath {math} at (187,0) size 76x38 [padding: 0 1 0 1]
     202          RenderMathMLRoot {mroot} at (1,0) size 73x38
    205203            RenderMathMLRootWrapper at (4,8) size 33x30
    206204              RenderMathMLRow {mrow} at (0,0) size 33x7
     
    236234                    RenderText at (0,1) size 9x17
    237235                      text run at (0,1) width 9: "\x{221A}"
    238             RenderMathMLRootWrapper at (39,3) size 36x35
    239               RenderMathMLFraction {mfrac} at (1,0) size 33x32
    240                 RenderMathMLBlock (anonymous, flex) at (0,0) size 33x16
    241                   RenderMathMLRow {mrow} at (0,0) size 33x12
    242                     RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
    243                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
    244                         RenderBlock (anonymous) at (0,0) size 8x9
    245                           RenderText {#text} at (0,-4) size 8x17
    246                             text run at (0,-4) width 8: "x"
    247                     RenderMathMLOperator {mo} at (8,3) size 17x9
    248                       RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    249                         RenderBlock (anonymous) at (0,0) size 9x9
    250                           RenderText at (0,-4) size 9x17
    251                             text run at (0,-4) width 9: "+"
    252                     RenderMathMLToken {mn} at (24,0) size 9x12
    253                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    254                         RenderBlock (anonymous) at (0,0) size 8x12
    255                           RenderText {#text} at (0,-1) size 8x17
    256                             text run at (0,-1) width 8: "1"
    257                 RenderMathMLBlock (anonymous, flex) at (0,15) size 33x17 [padding: 1 0 0 0]
    258                   RenderMathMLRow {mrow} at (0,4) size 33x13
    259                     RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
    260                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
    261                         RenderBlock (anonymous) at (0,0) size 8x9
    262                           RenderText {#text} at (0,-4) size 8x17
    263                             text run at (0,-4) width 8: "x"
    264                     RenderMathMLOperator {mo} at (8,3) size 17x9
    265                       RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    266                         RenderBlock (anonymous) at (0,0) size 9x9
    267                           RenderText at (0,-4) size 9x17
    268                             text run at (0,-4) width 9: "+"
    269                     RenderMathMLToken {mn} at (24,0) size 9x12
    270                       RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    271                         RenderBlock (anonymous) at (0,0) size 8x12
    272                           RenderText {#text} at (0,-1) size 8x17
    273                             text run at (0,-1) width 8: "2"
    274       RenderBlock {p} at (0,290) size 784x37
    275         RenderText {#text} at (0,17) size 77x19
    276           text run at (0,17) width 77: "high index: "
    277         RenderMathMLMath {math} at (76,0) size 27x36 [padding: 0 1 0 1]
    278           RenderMathMLRoot {mroot} at (1,0) size 25x36
    279             RenderMathMLRootWrapper at (4,0) size 10x36
    280               RenderMathMLFraction {mfrac} at (1,0) size 7x26
    281                 RenderMathMLBlock (anonymous, flex) at (0,0) size 7x18
    282                   RenderMathMLFraction {mfrac} at (1,0) size 5x16
    283                     RenderMathMLBlock (anonymous, flex) at (0,0) size 5x7
    284                       RenderMathMLToken {mi} at (0,0) size 5x5 [padding: 0 1 0 0]
    285                         RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
    286                           RenderBlock (anonymous) at (0,0) size 4x5
    287                             RenderText {#text} at (0,-3) size 4x10
    288                               text run at (0,-3) width 4: "x"
    289                     RenderMathMLBlock (anonymous, flex) at (0,6) size 5x10 [padding: 1 0 0 0]
    290                       RenderMathMLToken {mi} at (0,2) size 5x7 [padding: 0 1 0 0]
    291                         RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
    292                           RenderBlock (anonymous) at (0,0) size 4x6
    293                             RenderText {#text} at (0,-3) size 4x10
    294                               text run at (0,-3) width 4: "y"
    295                 RenderMathMLBlock (anonymous, flex) at (0,17) size 7x9 [padding: 1 0 0 0]
    296                   RenderMathMLToken {mi} at (1,2) size 5x6 [padding: 0 1 0 0]
     236            RenderMathMLRootWrapper at (39,3) size 34x35
     237              RenderMathMLFraction {mfrac} at (0,0) size 33x32
     238                RenderMathMLRow {mrow} at (0,0) size 33x12
     239                  RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
     240                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
     241                      RenderBlock (anonymous) at (0,0) size 8x9
     242                        RenderText {#text} at (0,-4) size 8x17
     243                          text run at (0,-4) width 8: "x"
     244                  RenderMathMLOperator {mo} at (8,3) size 17x9
     245                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
     246                      RenderBlock (anonymous) at (0,0) size 9x9
     247                        RenderText at (0,-4) size 9x17
     248                          text run at (0,-4) width 9: "+"
     249                  RenderMathMLToken {mn} at (24,0) size 9x12
     250                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
     251                      RenderBlock (anonymous) at (0,0) size 8x12
     252                        RenderText {#text} at (0,-1) size 8x17
     253                          text run at (0,-1) width 8: "1"
     254                RenderMathMLRow {mrow} at (0,19) size 33x13
     255                  RenderMathMLToken {mi} at (0,3) size 9x9 [padding: 0 2 0 0]
     256                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x9
     257                      RenderBlock (anonymous) at (0,0) size 8x9
     258                        RenderText {#text} at (0,-4) size 8x17
     259                          text run at (0,-4) width 8: "x"
     260                  RenderMathMLOperator {mo} at (8,3) size 17x9
     261                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
     262                      RenderBlock (anonymous) at (0,0) size 9x9
     263                        RenderText at (0,-4) size 9x17
     264                          text run at (0,-4) width 9: "+"
     265                  RenderMathMLToken {mn} at (24,0) size 9x12
     266                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
     267                      RenderBlock (anonymous) at (0,0) size 8x12
     268                        RenderText {#text} at (0,-1) size 8x17
     269                          text run at (0,-1) width 8: "2"
     270      RenderBlock {p} at (0,290) size 784x36
     271        RenderText {#text} at (0,16) size 77x19
     272          text run at (0,16) width 77: "high index: "
     273        RenderMathMLMath {math} at (76,0) size 23x35 [padding: 0 1 0 1]
     274          RenderMathMLRoot {mroot} at (1,0) size 21x35
     275            RenderMathMLRootWrapper at (4,0) size 6x35
     276              RenderMathMLFraction {mfrac} at (0,0) size 5x25
     277                RenderMathMLFraction {mfrac} at (0,0) size 5x16
     278                  RenderMathMLToken {mi} at (0,0) size 5x5 [padding: 0 1 0 0]
    297279                    RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
    298280                      RenderBlock (anonymous) at (0,0) size 4x5
    299281                        RenderText {#text} at (0,-3) size 4x10
    300                           text run at (0,-3) width 4: "z"
    301             RenderMathMLBlock (anonymous, flex) at (4,0) size 13x36
    302               RenderMathMLRadicalOperator (anonymous) at (0,18) size 12x18
     282                          text run at (0,-3) width 4: "x"
     283                  RenderMathMLToken {mi} at (0,9) size 5x7 [padding: 0 1 0 0]
     284                    RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
     285                      RenderBlock (anonymous) at (0,0) size 4x6
     286                        RenderText {#text} at (0,-3) size 4x10
     287                          text run at (0,-3) width 4: "y"
     288                RenderMathMLToken {mi} at (0,19) size 5x6 [padding: 0 1 0 0]
     289                  RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
     290                    RenderBlock (anonymous) at (0,0) size 4x5
     291                      RenderText {#text} at (0,-3) size 4x10
     292                        text run at (0,-3) width 4: "z"
     293            RenderMathMLBlock (anonymous, flex) at (0,0) size 13x35
     294              RenderMathMLRadicalOperator (anonymous) at (0,17) size 12x18
    303295                RenderMathMLBlock (anonymous, flex) at (0,0) size 9x18
    304296                  RenderBlock (anonymous) at (0,0) size 9x18
    305297                    RenderText at (0,1) size 9x17
    306298                      text run at (0,1) width 9: "\x{221A}"
    307             RenderMathMLRootWrapper at (16,21) size 9x15
     299            RenderMathMLRootWrapper at (12,20) size 9x15
    308300              RenderMathMLToken {mn} at (0,0) size 8x12
    309301                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
     
    311303                    RenderText {#text} at (0,-1) size 8x17
    312304                      text run at (0,-1) width 8: "2"
    313       RenderBlock {p} at (0,343) size 784x59
     305      RenderBlock {p} at (0,342) size 784x59
    314306        RenderText {#text} at (0,28) size 160x19
    315307          text run at (0,28) width 160: "Imbricated square roots: "
     
    461453                                                              text run at (0,-1) width 10: "A"
    462454        RenderText {#text} at (0,0) size 0x0
    463       RenderBlock {p} at (0,418) size 784x68
    464         RenderText {#text} at (0,37) size 114x19
    465           text run at (0,37) width 114: "Imbricated roots: "
    466         RenderMathMLMath {math} at (113,0) size 294x69 [padding: 0 1 0 1]
    467           RenderMathMLRoot {mroot} at (1,0) size 292x69
     455      RenderBlock {p} at (0,417) size 784x68
     456        RenderText {#text} at (0,36) size 114x19
     457          text run at (0,36) width 114: "Imbricated roots: "
     458        RenderMathMLMath {math} at (113,0) size 292x69 [padding: 0 1 0 1]
     459          RenderMathMLRoot {mroot} at (1,0) size 290x69
    468460            RenderMathMLRootWrapper at (4,19) size 5x50
    469461              RenderMathMLToken {mn} at (0,0) size 5x8
     
    478470                    RenderText at (0,1) size 9x17
    479471                      text run at (0,1) width 9: "\x{221A}"
    480             RenderMathMLRootWrapper at (12,3) size 280x66
    481               RenderMathMLRow {mrow} at (0,0) size 280x63
    482                 RenderMathMLToken {mn} at (0,37) size 8x12
     472            RenderMathMLRootWrapper at (12,3) size 278x66
     473              RenderMathMLRow {mrow} at (0,0) size 278x63
     474                RenderMathMLToken {mn} at (0,36) size 8x12
    483475                  RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    484476                    RenderBlock (anonymous) at (0,0) size 8x12
    485477                      RenderText {#text} at (0,-1) size 8x17
    486478                        text run at (0,-1) width 8: "1"
    487                 RenderMathMLOperator {mo} at (8,40) size 16x9
     479                RenderMathMLOperator {mo} at (8,39) size 16x9
    488480                  RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    489481                    RenderBlock (anonymous) at (0,0) size 9x9
    490482                      RenderText at (0,-4) size 9x17
    491483                        text run at (0,-4) width 9: "+"
    492                 RenderMathMLRoot {mroot} at (23,0) size 257x63
     484                RenderMathMLRoot {mroot} at (23,0) size 255x63
    493485                  RenderMathMLRootWrapper at (4,17) size 5x46
    494486                    RenderMathMLToken {mn} at (0,0) size 5x8
     
    499491                  RenderMathMLBlock (anonymous, flex) at (0,0) size 13x63
    500492                    RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x63
    501                       RenderMathMLBlock (anonymous, flex) at (0,0) size 9x63
    502                         RenderBlock (anonymous) at (0,0) size 9x63
     493                      RenderMathMLBlock (anonymous, flex) at (0,0) size 9x62
     494                        RenderBlock (anonymous) at (0,0) size 9x62
    503495                          RenderText at (0,1) size 9x17
    504496                            text run at (0,1) width 9: "\x{221A}"
    505                   RenderMathMLRootWrapper at (12,3) size 244x60
    506                     RenderMathMLRow {mrow} at (0,0) size 244x57
    507                       RenderMathMLToken {mn} at (0,33) size 8x12
     497                  RenderMathMLRootWrapper at (12,3) size 242x60
     498                    RenderMathMLRow {mrow} at (0,0) size 242x57
     499                      RenderMathMLToken {mn} at (0,32) size 8x12
    508500                        RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    509501                          RenderBlock (anonymous) at (0,0) size 8x12
    510502                            RenderText {#text} at (0,-1) size 8x17
    511503                              text run at (0,-1) width 8: "2"
    512                       RenderMathMLOperator {mo} at (8,36) size 16x9
     504                      RenderMathMLOperator {mo} at (8,35) size 16x9
    513505                        RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    514506                          RenderBlock (anonymous) at (0,0) size 9x9
    515507                            RenderText at (0,-4) size 9x17
    516508                              text run at (0,-4) width 9: "+"
    517                       RenderMathMLRoot {mroot} at (23,0) size 221x57
    518                         RenderMathMLRootWrapper at (4,15) size 5x42
     509                      RenderMathMLRoot {mroot} at (23,0) size 219x57
     510                        RenderMathMLRootWrapper at (4,14) size 5x43
    519511                          RenderMathMLToken {mn} at (0,0) size 5x8
    520512                            RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
     
    524516                        RenderMathMLBlock (anonymous, flex) at (0,0) size 13x57
    525517                          RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x57
    526                             RenderMathMLBlock (anonymous, flex) at (0,0) size 9x57
    527                               RenderBlock (anonymous) at (0,0) size 9x57
     518                            RenderMathMLBlock (anonymous, flex) at (0,0) size 9x56
     519                              RenderBlock (anonymous) at (0,0) size 9x56
    528520                                RenderText at (0,1) size 9x17
    529521                                  text run at (0,1) width 9: "\x{221A}"
    530                         RenderMathMLRootWrapper at (12,3) size 208x54
    531                           RenderMathMLRow {mrow} at (0,0) size 208x51
    532                             RenderMathMLToken {mn} at (0,29) size 8x12
     522                        RenderMathMLRootWrapper at (12,3) size 206x54
     523                          RenderMathMLRow {mrow} at (0,0) size 206x51
     524                            RenderMathMLToken {mn} at (0,28) size 8x12
    533525                              RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    534526                                RenderBlock (anonymous) at (0,0) size 8x12
    535527                                  RenderText {#text} at (0,-1) size 8x17
    536528                                    text run at (0,-1) width 8: "3"
    537                             RenderMathMLOperator {mo} at (8,32) size 16x9
     529                            RenderMathMLOperator {mo} at (8,31) size 16x9
    538530                              RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    539531                                RenderBlock (anonymous) at (0,0) size 9x9
    540532                                  RenderText at (0,-4) size 9x17
    541533                                    text run at (0,-4) width 9: "+"
    542                             RenderMathMLRoot {mroot} at (23,0) size 185x51
     534                            RenderMathMLRoot {mroot} at (23,0) size 183x51
    543535                              RenderMathMLRootWrapper at (4,12) size 5x39
    544536                                RenderMathMLToken {mn} at (0,0) size 5x8
     
    549541                              RenderMathMLBlock (anonymous, flex) at (0,0) size 13x51
    550542                                RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x51
    551                                   RenderMathMLBlock (anonymous, flex) at (0,0) size 9x51
    552                                     RenderBlock (anonymous) at (0,0) size 9x51
     543                                  RenderMathMLBlock (anonymous, flex) at (0,0) size 9x50
     544                                    RenderBlock (anonymous) at (0,0) size 9x50
    553545                                      RenderText at (0,1) size 9x17
    554546                                        text run at (0,1) width 9: "\x{221A}"
    555                               RenderMathMLRootWrapper at (12,3) size 172x48
    556                                 RenderMathMLRow {mrow} at (0,0) size 172x45
    557                                   RenderMathMLToken {mn} at (0,25) size 8x12
     547                              RenderMathMLRootWrapper at (12,3) size 170x48
     548                                RenderMathMLRow {mrow} at (0,0) size 170x45
     549                                  RenderMathMLToken {mn} at (0,24) size 8x12
    558550                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    559551                                      RenderBlock (anonymous) at (0,0) size 8x12
    560552                                        RenderText {#text} at (0,-1) size 8x17
    561553                                          text run at (0,-1) width 8: "4"
    562                                   RenderMathMLOperator {mo} at (8,28) size 16x9
     554                                  RenderMathMLOperator {mo} at (8,27) size 16x9
    563555                                    RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    564556                                      RenderBlock (anonymous) at (0,0) size 9x9
    565557                                        RenderText at (0,-4) size 9x17
    566558                                          text run at (0,-4) width 9: "+"
    567                                   RenderMathMLRoot {mroot} at (23,0) size 149x45
     559                                  RenderMathMLRoot {mroot} at (23,0) size 147x45
    568560                                    RenderMathMLRootWrapper at (4,11) size 5x34
    569561                                      RenderMathMLToken {mn} at (0,0) size 5x7
     
    574566                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 13x45
    575567                                      RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x45
    576                                         RenderMathMLBlock (anonymous, flex) at (0,0) size 9x45
    577                                           RenderBlock (anonymous) at (0,0) size 9x45
     568                                        RenderMathMLBlock (anonymous, flex) at (0,0) size 9x44
     569                                          RenderBlock (anonymous) at (0,0) size 9x44
    578570                                            RenderText at (0,1) size 9x17
    579571                                              text run at (0,1) width 9: "\x{221A}"
    580                                     RenderMathMLRootWrapper at (12,3) size 136x42
    581                                       RenderMathMLRow {mrow} at (0,0) size 136x39
    582                                         RenderMathMLToken {mn} at (0,21) size 8x12
     572                                    RenderMathMLRootWrapper at (12,3) size 134x42
     573                                      RenderMathMLRow {mrow} at (0,0) size 134x39
     574                                        RenderMathMLToken {mn} at (0,20) size 8x12
    583575                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    584576                                            RenderBlock (anonymous) at (0,0) size 8x12
    585577                                              RenderText {#text} at (0,-1) size 8x17
    586578                                                text run at (0,-1) width 8: "5"
    587                                         RenderMathMLOperator {mo} at (8,24) size 16x9
     579                                        RenderMathMLOperator {mo} at (8,23) size 16x9
    588580                                          RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    589581                                            RenderBlock (anonymous) at (0,0) size 9x9
    590582                                              RenderText at (0,-4) size 9x17
    591583                                                text run at (0,-4) width 9: "+"
    592                                         RenderMathMLRoot {mroot} at (23,0) size 113x39
    593                                           RenderMathMLRootWrapper at (4,8) size 5x31
     584                                        RenderMathMLRoot {mroot} at (23,0) size 111x39
     585                                          RenderMathMLRootWrapper at (4,7) size 5x32
    594586                                            RenderMathMLToken {mn} at (0,0) size 5x8
    595587                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 5x8
     
    599591                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 13x39
    600592                                            RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x39
    601                                               RenderMathMLBlock (anonymous, flex) at (0,0) size 9x39
    602                                                 RenderBlock (anonymous) at (0,0) size 9x39
     593                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 9x38
     594                                                RenderBlock (anonymous) at (0,0) size 9x38
    603595                                                  RenderText at (0,1) size 9x17
    604596                                                    text run at (0,1) width 9: "\x{221A}"
    605                                           RenderMathMLRootWrapper at (12,3) size 100x36
    606                                             RenderMathMLRow {mrow} at (0,0) size 100x33
    607                                               RenderMathMLToken {mn} at (0,17) size 8x12
     597                                          RenderMathMLRootWrapper at (12,3) size 98x36
     598                                            RenderMathMLRow {mrow} at (0,0) size 98x33
     599                                              RenderMathMLToken {mn} at (0,16) size 8x12
    608600                                                RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    609601                                                  RenderBlock (anonymous) at (0,0) size 8x12
    610602                                                    RenderText {#text} at (0,-1) size 8x17
    611603                                                      text run at (0,-1) width 8: "6"
    612                                               RenderMathMLOperator {mo} at (8,20) size 16x9
     604                                              RenderMathMLOperator {mo} at (8,19) size 16x9
    613605                                                RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    614606                                                  RenderBlock (anonymous) at (0,0) size 9x9
    615607                                                    RenderText at (0,-4) size 9x17
    616608                                                      text run at (0,-4) width 9: "+"
    617                                               RenderMathMLRoot {mroot} at (23,0) size 77x33
     609                                              RenderMathMLRoot {mroot} at (23,0) size 75x33
    618610                                                RenderMathMLRootWrapper at (4,5) size 5x28
    619611                                                  RenderMathMLToken {mn} at (0,0) size 5x8
     
    624616                                                RenderMathMLBlock (anonymous, flex) at (0,0) size 13x33
    625617                                                  RenderMathMLRadicalOperator (anonymous) at (0,0) size 12x33
    626                                                     RenderMathMLBlock (anonymous, flex) at (0,0) size 9x33
    627                                                       RenderBlock (anonymous) at (0,0) size 9x33
     618                                                    RenderMathMLBlock (anonymous, flex) at (0,0) size 9x32
     619                                                      RenderBlock (anonymous) at (0,0) size 9x32
    628620                                                        RenderText at (0,1) size 9x17
    629621                                                          text run at (0,1) width 9: "\x{221A}"
    630                                                 RenderMathMLRootWrapper at (12,3) size 64x30
    631                                                   RenderMathMLRow {mrow} at (0,0) size 64x27
    632                                                     RenderMathMLToken {mn} at (0,13) size 8x12
     622                                                RenderMathMLRootWrapper at (12,3) size 62x30
     623                                                  RenderMathMLRow {mrow} at (0,0) size 62x27
     624                                                    RenderMathMLToken {mn} at (0,12) size 8x12
    633625                                                      RenderMathMLBlock (anonymous, flex) at (0,0) size 8x12
    634626                                                        RenderBlock (anonymous) at (0,0) size 8x12
    635627                                                          RenderText {#text} at (0,-1) size 8x17
    636628                                                            text run at (0,-1) width 8: "7"
    637                                                     RenderMathMLOperator {mo} at (8,16) size 16x9
     629                                                    RenderMathMLOperator {mo} at (8,15) size 16x9
    638630                                                      RenderMathMLBlock (anonymous, flex) at (3,0) size 10x9
    639631                                                        RenderBlock (anonymous) at (0,0) size 9x9
    640632                                                          RenderText at (0,-4) size 9x17
    641633                                                            text run at (0,-4) width 9: "+"
    642                                                     RenderMathMLRoot {mroot} at (23,0) size 41x27
    643                                                       RenderMathMLRootWrapper at (4,0) size 22x27
    644                                                         RenderMathMLFraction {mfrac} at (1,0) size 19x17
    645                                                           RenderMathMLBlock (anonymous, flex) at (0,0) size 19x9
    646                                                             RenderMathMLRow {mrow} at (0,0) size 19x7
    647                                                               RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
    648                                                                 RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
    649                                                                   RenderBlock (anonymous) at (0,0) size 4x5
    650                                                                     RenderText {#text} at (0,-3) size 4x10
    651                                                                       text run at (0,-3) width 4: "x"
    652                                                               RenderMathMLOperator {mo} at (4,0) size 10x6
    653                                                                 RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
    654                                                                   RenderBlock (anonymous) at (0,0) size 5x6
    655                                                                     RenderText at (0,-2) size 5x10
    656                                                                       text run at (0,-2) width 5: "+"
    657                                                               RenderMathMLToken {mi} at (13,1) size 6x6 [padding: 0 1 0 0]
    658                                                                 RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
    659                                                                   RenderBlock (anonymous) at (0,0) size 4x6
    660                                                                     RenderText {#text} at (0,-3) size 4x10
    661                                                                       text run at (0,-3) width 4: "y"
    662                                                           RenderMathMLBlock (anonymous, flex) at (0,8) size 19x9 [padding: 1 0 0 0]
    663                                                             RenderMathMLToken {mi} at (7,2) size 5x6 [padding: 0 1 0 0]
     634                                                    RenderMathMLRoot {mroot} at (23,0) size 39x27
     635                                                      RenderMathMLRootWrapper at (4,0) size 20x27
     636                                                        RenderMathMLFraction {mfrac} at (0,0) size 19x17
     637                                                          RenderMathMLRow {mrow} at (0,0) size 19x7
     638                                                            RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
    664639                                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
    665640                                                                RenderBlock (anonymous) at (0,0) size 4x5
    666641                                                                  RenderText {#text} at (0,-3) size 4x10
    667                                                                     text run at (0,-3) width 4: "z"
    668                                                       RenderMathMLBlock (anonymous, flex) at (16,0) size 13x27
     642                                                                    text run at (0,-3) width 4: "x"
     643                                                            RenderMathMLOperator {mo} at (4,0) size 10x6
     644                                                              RenderMathMLBlock (anonymous, flex) at (2,0) size 5x6
     645                                                                RenderBlock (anonymous) at (0,0) size 5x6
     646                                                                  RenderText at (0,-2) size 5x10
     647                                                                    text run at (0,-2) width 5: "+"
     648                                                            RenderMathMLToken {mi} at (13,1) size 6x6 [padding: 0 1 0 0]
     649                                                              RenderMathMLBlock (anonymous, flex) at (0,0) size 4x6
     650                                                                RenderBlock (anonymous) at (0,0) size 4x6
     651                                                                  RenderText {#text} at (0,-3) size 4x10
     652                                                                    text run at (0,-3) width 4: "y"
     653                                                          RenderMathMLToken {mi} at (7,11) size 5x6 [padding: 0 1 0 0]
     654                                                            RenderMathMLBlock (anonymous, flex) at (0,0) size 4x5
     655                                                              RenderBlock (anonymous) at (0,0) size 4x5
     656                                                                RenderText {#text} at (0,-3) size 4x10
     657                                                                  text run at (0,-3) width 4: "z"
     658                                                      RenderMathMLBlock (anonymous, flex) at (14,0) size 13x27
    669659                                                        RenderMathMLRadicalOperator (anonymous) at (0,9) size 12x18
    670660                                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 9x18
     
    672662                                                              RenderText at (0,1) size 9x17
    673663                                                                text run at (0,1) width 9: "\x{221A}"
    674                                                       RenderMathMLRootWrapper at (28,12) size 12x15
     664                                                      RenderMathMLRootWrapper at (26,12) size 12x15
    675665                                                        RenderMathMLToken {mi} at (0,0) size 12x12 [padding: 0 2 0 0]
    676666                                                          RenderMathMLBlock (anonymous, flex) at (0,0) size 10x12
  • trunk/LayoutTests/platform/mac/TestExpectations

    r199291 r199295  
    787787webkit.org/b/72828 mathml/opentype/horizontal.html [ Failure ]
    788788webkit.org/b/72828 mathml/opentype/horizontal-munderover.html [ Failure ]
     789
     790# These tests require the Latin Modern Math font.
     791mathml/opentype/fraction-line.html [ Pass ImageOnlyFailure ]
     792mathml/presentation/fractions-linethickness.html [ Pass ImageOnlyFailure ]
    789793
    790794# Missing references
  • trunk/Source/WebCore/ChangeLog

    r199294 r199295  
     12016-04-11  Frederic Wang  <fwang@igalia.com>
     2
     3        Refactor RenderMathMLFraction layout to avoid using flexbox
     4        https://bugs.webkit.org/show_bug.cgi?id=153917
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        Based on a patch by Alejandro G. Castro <alex@igalia.com>
     9
     10        Implement the layoutBlock method to handle the layout calculations
     11        directly in the class. This also fixes parsing of absolute values for
     12        linethickness attribute (e.g. 10px) and adds support for the AxisHeight
     13        and FractionRuleThickness MATH parameters.
     14
     15        Test: mathml/opentype/fraction-line.html
     16
     17        * accessibility/AccessibilityRenderObject.cpp:
     18        (WebCore::AccessibilityRenderObject::mathLineThickness): Use the thickness relative to the
     19        default line thickness since that's really what is expected by mathml-line-fraction.html
     20        * css/mathml.css: Remove flexbox properties for mfrac.
     21        (mfrac): Deleted.
     22        (mfrac > *): Deleted.
     23        (mfrac[numalign="left"] > :first-child): Deleted.
     24        (mfrac[numalign="right"] > :first-child): Deleted.
     25        (mfrac[denomalign="left"] > :last-child): Deleted.
     26        (mfrac[denomalign="right"] > :last-child): Deleted.
     27        (mfrac > :first-child): Deleted.
     28        (mfrac > :last-child): Deleted.
     29        (mfrac): Deleted.
     30        * rendering/mathml/RenderMathMLBlock.cpp: Introduce a helper function to retrieve the math
     31        axis height.
     32        (WebCore::RenderMathMLBlock::mathAxisHeight):
     33        * rendering/mathml/RenderMathMLBlock.h: Declare mathAxisHeight.
     34        * rendering/mathml/RenderMathMLFraction.cpp:
     35        (WebCore::RenderMathMLFraction::RenderMathMLFraction):
     36        (WebCore::RenderMathMLFraction::parseAlignmentAttribute): Helper function to parse the align
     37        attribute.
     38        (WebCore::RenderMathMLFraction::isValid): Helper function to verify whether the child list
     39        is valid with respect to the MathML specificitation.
     40        (WebCore::RenderMathMLFraction::numerator): Helper function to retrieve the numerator.
     41        (WebCore::RenderMathMLFraction::denominator): Helper function to retrieve the denominator.
     42        (WebCore::RenderMathMLFraction::updateFromElement): Use the FractionRuleThickness parameter
     43        when avaiable to calculate the default linethickness.
     44        Fix computation of linethickness for absolute values (e.g. 10px), the default linethickness
     45        must not be involved for such values.
     46        We no longer need to manage style of anonymous wrappers.
     47        (WebCore::RenderMathMLFraction::unembellishedOperator): Use the helper function and we no
     48        longer care about anonymous wrappers.
     49        (WebCore::RenderMathMLFraction::computePreferredLogicalWidths): Implement this function
     50        without using flexbox.
     51        (WebCore::RenderMathMLFraction::horizontalOffset): Helper function to get the horizontal
     52        offsets of children depending of the alignment.
     53        (WebCore::RenderMathMLFraction::layoutBlock): Implement this function without using flexbox.
     54        (WebCore::RenderMathMLFraction::paint): Do not paint if the fraction is invalid. Use helper
     55        function. Use the width of the renderer (instead of the one of the denominator) as the
     56        length of the fraction bar.
     57        (WebCore::RenderMathMLFraction::firstLineBaseline): Use the helper functions to get children
     58        and axis height.
     59        (WebCore::RenderMathMLFraction::paintChildren): Temporary function to remove in a
     60        follow-up patch.
     61        (WebCore::RenderMathMLFraction::fixChildStyle): Deleted. We no longer need to manage style
     62        of anonymous wrappers.
     63        (WebCore::RenderMathMLFraction::addChild): Deleted. We no longer need to manage
     64        anonymous wrappers.
     65        (WebCore::RenderMathMLFraction::styleDidChange): We no longer need to manage style of
     66        anonymous wrappers.
     67        (WebCore::RenderMathMLFraction::layout): Deleted.
     68        * rendering/mathml/RenderMathMLFraction.h: Replace lineThickness with relativeLineThickness,
     69        as needed by the accessibility code. Update function and members declarations.
     70
    1712016-04-11  Commit Queue  <commit-queue@webkit.org>
    272
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r199229 r199295  
    39983998        return -1;
    39993999   
    4000     return downcast<RenderMathMLFraction>(*m_renderer).lineThickness();
     4000    return downcast<RenderMathMLFraction>(*m_renderer).relativeLineThickness();
    40014001}
    40024002
  • trunk/Source/WebCore/css/mathml.css

    r199293 r199295  
    4545}
    4646
    47 mo, mfrac {
     47mo {
    4848    flex-direction: column;
    49 }
    50 
    51 mfrac > * {
    52     align-self: center;
    53 }
    54 mfrac[numalign="left"] > :first-child {
    55     align-self: flex-start;
    56 }
    57 mfrac[numalign="right"] > :first-child {
    58     align-self: flex-end;
    59 }
    60 mfrac[denomalign="left"] > :last-child {
    61     align-self: flex-start;
    62 }
    63 mfrac[denomalign="right"] > :last-child {
    64     align-self: flex-end;
    65 }
    66 mfrac > :first-child {
    67     -webkit-margin-after: 0.2em;
    68 }
    69 mfrac > :last-child {
    70     -webkit-margin-before: 0.2em;
    71 }
    72 mfrac {
    73     -webkit-margin-start: 1px;
    74     -webkit-margin-end: 1px;
    7549}
    7650
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp

    r194496 r199295  
    6464    newBlock->initializeStyle();
    6565    return newBlock;
     66}
     67
     68LayoutUnit RenderMathMLBlock::mathAxisHeight() const
     69{
     70    const auto& primaryFont = style().fontCascade().primaryFont();
     71    if (auto* mathData = primaryFont.mathData())
     72        return mathData->getMathConstant(primaryFont, OpenTypeMathData::AxisHeight);
     73
     74    return style().fontMetrics().xHeight() / 2;
    6675}
    6776
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h

    r198998 r199295  
    6464    // Create a new RenderMathMLBlock, with a new style inheriting from this->style().
    6565    RenderPtr<RenderMathMLBlock> createAnonymousMathMLBlock();
     66
     67    LayoutUnit mathAxisHeight() const;
    6668   
    6769protected:
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp

    r195452 r199295  
    22 * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
    33 * Copyright (C) 2010 François Sausset (sausset@gmail.com). All rights reserved.
     4 * Copyright (C) 2016 Igalia S.L.
    45 *
    56 * Redistribution and use in source and binary forms, with or without
     
    3940using namespace MathMLNames;
    4041
     42// FIXME: The "MathML in HTML5" implementation note suggests the values 50% for "thin" and 200% for "thick" (http://webkit.org/b/155639).
    4143static const float gLineThin = 0.33f;
    4244static const float gLineMedium = 1.f;
     
    4446static const float gFractionBarWidth = 0.05f;
    4547
     48// FIXME: We should read the gaps and shifts from the MATH table (http://webkit.org/b/155639).
     49static const float gNumeratorGap = 0.2f;
     50static const float gDenominatorGap = 0.2f;
     51
    4652RenderMathMLFraction::RenderMathMLFraction(MathMLInlineContainerElement& element, Ref<RenderStyle>&& style)
    4753    : RenderMathMLBlock(element, WTFMove(style))
    48     , m_lineThickness(gLineMedium)
    49 {
    50 }
    51 
    52 void RenderMathMLFraction::fixChildStyle(RenderObject* child)
    53 {
    54     ASSERT(child->isAnonymous() && child->style().refCount() == 1);
    55     child->style().setFlexDirection(FlowColumn);
    56 }
    57 
    58 // FIXME: It's cleaner to only call updateFromElement when an attribute has changed. Move parts
    59 // of this to fixChildStyle or other methods, and call them when needed.
     54    , m_defaultLineThickness(1)
     55    , m_lineThickness(0)
     56    , m_numeratorAlign(FractionAlignmentCenter)
     57    , m_denominatorAlign(FractionAlignmentCenter)
     58{
     59}
     60
     61RenderMathMLFraction::FractionAlignment RenderMathMLFraction::parseAlignmentAttribute(const String& value)
     62{
     63    if (equalLettersIgnoringASCIICase(value, "left"))
     64        return FractionAlignmentLeft;
     65    if (equalLettersIgnoringASCIICase(value, "right"))
     66        return FractionAlignmentRight;
     67    return FractionAlignmentCenter;
     68}
     69
     70bool RenderMathMLFraction::isValid() const
     71{
     72    // Verify whether the list of children is valid:
     73    // <mfrac> numerator denominator </mfrac>
     74    RenderBox* child = firstChildBox();
     75    if (!child)
     76        return false;
     77    child = child->nextSiblingBox();
     78    return child && !child->nextSiblingBox();
     79}
     80
     81RenderBox& RenderMathMLFraction::numerator() const
     82{
     83    ASSERT(isValid());
     84    return *firstChildBox();
     85}
     86
     87RenderBox& RenderMathMLFraction::denominator() const
     88{
     89    ASSERT(isValid());
     90    return *firstChildBox()->nextSiblingBox();
     91}
     92
    6093void RenderMathMLFraction::updateFromElement()
    6194{
    62     // FIXME: mfrac where bevelled=true will need to reorganize the descendants
    63     if (isEmpty())
    64         return;
    65 
    66     RenderObject* numeratorWrapper = firstChild();
    67     RenderObject* denominatorWrapper = numeratorWrapper->nextSibling();
    68     if (!denominatorWrapper)
    69         return;
    70 
     95    if (isEmpty())
     96        return;
     97
     98    // We first determine the default line thickness.
     99    const auto& primaryFont = style().fontCascade().primaryFont();
     100    if (auto* mathData = style().fontCascade().primaryFont().mathData())
     101        m_defaultLineThickness = mathData->getMathConstant(primaryFont, OpenTypeMathData::FractionRuleThickness);
     102    else
     103        m_defaultLineThickness = gFractionBarWidth * style().fontSize();
     104
     105    // Next, we parse the linethickness attribute.
    71106    String thickness = element().getAttribute(MathMLNames::linethicknessAttr);
    72     m_lineThickness = gLineMedium;
    73107    if (equalLettersIgnoringASCIICase(thickness, "thin"))
    74         m_lineThickness = gLineThin;
     108        m_lineThickness = m_defaultLineThickness * gLineThin;
    75109    else if (equalLettersIgnoringASCIICase(thickness, "medium"))
    76         m_lineThickness = gLineMedium;
     110        m_lineThickness = m_defaultLineThickness * gLineMedium;
    77111    else if (equalLettersIgnoringASCIICase(thickness, "thick"))
    78         m_lineThickness = gLineThick;
     112        m_lineThickness = m_defaultLineThickness * gLineThick;
    79113    else {
    80         // This function parses the thickness attribute using gLineMedium as
    81         // the default value. If the parsing fails, m_lineThickness will not be
    82         // modified i.e. the default value will be used.
     114        // Parse the thickness using m_defaultLineThickness as the default value.
     115        m_lineThickness = m_defaultLineThickness;
    83116        parseMathMLLength(thickness, m_lineThickness, &style(), false);
    84117    }
    85118
    86     // Update the style for the padding of the denominator for the line thickness
    87     lastChild()->style().setPaddingTop(Length(static_cast<int>(m_lineThickness), Fixed));
    88 }
    89 
    90 void RenderMathMLFraction::addChild(RenderObject* child, RenderObject* /* beforeChild */)
    91 {
    92     if (isEmpty()) {
    93         RenderPtr<RenderMathMLBlock> numeratorWrapper = createAnonymousMathMLBlock();
    94         fixChildStyle(numeratorWrapper.get());
    95         RenderMathMLBlock::addChild(numeratorWrapper.leakPtr());
    96        
    97         RenderPtr<RenderMathMLBlock> denominatorWrapper = createAnonymousMathMLBlock();
    98         fixChildStyle(denominatorWrapper.get());
    99         RenderMathMLBlock::addChild(denominatorWrapper.leakPtr());
    100     }
    101    
    102     if (firstChild()->isEmpty())
    103         downcast<RenderElement>(*firstChild()).addChild(child);
    104     else
    105         downcast<RenderElement>(*lastChild()).addChild(child);
     119    m_numeratorAlign = parseAlignmentAttribute(element().getAttribute(MathMLNames::numalignAttr));
     120    m_denominatorAlign = parseAlignmentAttribute(element().getAttribute(MathMLNames::denomalignAttr));
     121}
     122
     123void RenderMathMLFraction::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
     124{
     125    RenderMathMLBlock::styleDidChange(diff, oldStyle);
    106126   
    107127    updateFromElement();
    108128}
    109129
    110 void RenderMathMLFraction::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
    111 {
    112     RenderMathMLBlock::styleDidChange(diff, oldStyle);
    113    
    114     for (RenderObject* child = firstChild(); child; child = child->nextSibling())
    115         fixChildStyle(child);
     130RenderMathMLOperator* RenderMathMLFraction::unembellishedOperator()
     131{
     132    if (!isValid() || !is<RenderMathMLBlock>(numerator()))
     133        return nullptr;
     134
     135    return downcast<RenderMathMLBlock>(numerator()).unembellishedOperator();
     136}
     137
     138void RenderMathMLFraction::computePreferredLogicalWidths()
     139{
     140    ASSERT(preferredLogicalWidthsDirty());
     141
     142    m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
     143
     144    if (isValid()) {
     145        LayoutUnit numeratorWidth = numerator().maxPreferredLogicalWidth();
     146        LayoutUnit denominatorWidth = denominator().maxPreferredLogicalWidth();
     147        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = std::max(numeratorWidth, denominatorWidth);
     148    }
     149
     150    setPreferredLogicalWidthsDirty(false);
     151}
     152
     153LayoutUnit RenderMathMLFraction::horizontalOffset(RenderBox& child, FractionAlignment align)
     154{
     155    switch (align) {
     156    case FractionAlignmentRight:
     157        return LayoutUnit(logicalWidth() - child.logicalWidth());
     158    case FractionAlignmentCenter:
     159        return LayoutUnit((logicalWidth() - child.logicalWidth()) / 2);
     160    case FractionAlignmentLeft:
     161        return LayoutUnit(0);
     162    }
     163
     164    ASSERT_NOT_REACHED();
     165    return LayoutUnit(0);
     166}
     167
     168void RenderMathMLFraction::layoutBlock(bool relayoutChildren, LayoutUnit)
     169{
     170    ASSERT(needsLayout());
     171
     172    // FIXME: We should be able to remove this.
    116173    updateFromElement();
    117 }
    118 
    119 RenderMathMLOperator* RenderMathMLFraction::unembellishedOperator()
    120 {
    121     RenderObject* numeratorWrapper = firstChild();
    122     if (!numeratorWrapper)
    123         return nullptr;
    124     RenderObject* numerator = numeratorWrapper->firstChildSlow();
    125     if (!is<RenderMathMLBlock>(numerator))
    126         return nullptr;
    127     return downcast<RenderMathMLBlock>(*numerator).unembellishedOperator();
    128 }
    129 
    130 void RenderMathMLFraction::layout()
    131 {
    132     updateFromElement();
    133 
    134     // Adjust the fraction line thickness for the zoom
    135     if (lastChild() && lastChild()->isRenderBlock())
    136         m_lineThickness *= ceilf(gFractionBarWidth * style().fontSize());
    137 
    138     RenderMathMLBlock::layout();
     174
     175    if (!relayoutChildren && simplifiedLayout())
     176        return;
     177
     178    if (!isValid()) {
     179        setLogicalWidth(0);
     180        setLogicalHeight(0);
     181        clearNeedsLayout();
     182        return;
     183    }
     184
     185    LayoutUnit verticalOffset = 0;
     186
     187    numerator().layoutIfNeeded();
     188    denominator().layoutIfNeeded();
     189
     190    setLogicalWidth(std::max<LayoutUnit>(numerator().logicalWidth(), denominator().logicalWidth()));
     191
     192    LayoutPoint numeratorLocation(horizontalOffset(numerator(), m_numeratorAlign), verticalOffset);
     193    numerator().setLocation(numeratorLocation);
     194
     195    verticalOffset += numerator().logicalHeight() + gNumeratorGap * style().fontSize() + m_lineThickness + gDenominatorGap * style().fontSize();
     196
     197    LayoutPoint denominatorLocation(horizontalOffset(denominator(), m_denominatorAlign), verticalOffset);
     198    denominator().setLocation(denominatorLocation);
     199
     200    setLogicalHeight(verticalOffset + denominator().logicalHeight());
     201
     202    clearNeedsLayout();
    139203}
    140204
     
    142206{
    143207    RenderMathMLBlock::paint(info, paintOffset);
    144     if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != VISIBLE)
    145         return;
    146    
    147     RenderBox* denominatorWrapper = lastChildBox();
    148     if (!denominatorWrapper || !m_lineThickness)
    149         return;
    150 
    151     IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset + location() + denominatorWrapper->location() + LayoutPoint(0, m_lineThickness / 2));
     208    if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != VISIBLE || !isValid())
     209        return;
     210
     211    IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset + location() + LayoutPoint(0, numerator().logicalHeight() + gNumeratorGap * style().fontSize() + m_lineThickness / 2));
    152212   
    153213    GraphicsContextStateSaver stateSaver(info.context());
     
    156216    info.context().setStrokeStyle(SolidStroke);
    157217    info.context().setStrokeColor(style().visitedDependentColor(CSSPropertyColor));
    158     info.context().drawLine(adjustedPaintOffset, roundedIntPoint(LayoutPoint(adjustedPaintOffset.x() + denominatorWrapper->offsetWidth(), adjustedPaintOffset.y())));
     218    info.context().drawLine(adjustedPaintOffset, roundedIntPoint(LayoutPoint(adjustedPaintOffset.x() + logicalWidth(), adjustedPaintOffset.y())));
    159219}
    160220
    161221Optional<int> RenderMathMLFraction::firstLineBaseline() const
    162222{
    163     if (RenderBox* denominatorWrapper = lastChildBox())
    164         return Optional<int>(denominatorWrapper->logicalTop() + static_cast<int>(lroundf((m_lineThickness + style().fontMetrics().xHeight()) / 2)));
     223    if (isValid()) {
     224        LayoutUnit axisHeight = mathAxisHeight();
     225        return Optional<int>(numerator().logicalHeight() + gNumeratorGap * style().fontSize() + static_cast<int>(lroundf(m_lineThickness / 2 + axisHeight)));
     226    }
    165227    return RenderMathMLBlock::firstLineBaseline();
    166228}
    167229
     230void RenderMathMLFraction::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)
     231{
     232    for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
     233        if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))
     234            return;
     235    }
     236}
     237
    168238}
    169239
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.h

    r197563 r199295  
    22 * Copyright (C) 2009 Alex Milowski (alex@milowski.com). All rights reserved.
    33 * Copyright (C) 2010 François Sausset (sausset@gmail.com). All rights reserved.
     4 * Copyright (C) 2016 Igalia S.L.
    45 *
    56 * Redistribution and use in source and binary forms, with or without
     
    4041
    4142    MathMLInlineContainerElement& element() { return static_cast<MathMLInlineContainerElement&>(nodeForNonAnonymous()); }
    42     float lineThickness() const { return m_lineThickness; }
     43    float relativeLineThickness() const { return m_defaultLineThickness ? m_lineThickness / m_defaultLineThickness : LayoutUnit(0); }
     44
     45    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
     46    void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;
     47
     48protected:
     49    void computePreferredLogicalWidths() final;
    4350
    4451private:
    45     bool isRenderMathMLFraction() const override { return true; }
    46     const char* renderName() const override { return "RenderMathMLFraction"; }
     52    bool isRenderMathMLFraction() const final { return true; }
     53    const char* renderName() const final { return "RenderMathMLFraction"; }
    4754
    48     void addChild(RenderObject* child, RenderObject* beforeChild) override;
    49     void updateFromElement() override;
    50     Optional<int> firstLineBaseline() const override;
    51     void paint(PaintInfo&, const LayoutPoint&) override;
    52     RenderMathMLOperator* unembellishedOperator() override;
    53     void layout() override;
    54     void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
     55    void updateFromElement() final;
     56    Optional<int> firstLineBaseline() const final;
     57    void paint(PaintInfo&, const LayoutPoint&) final;
     58    RenderMathMLOperator* unembellishedOperator() final;
     59    void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
     60   
     61    bool isValid() const;
     62    RenderBox& numerator() const;
     63    RenderBox& denominator() const;
     64    enum FractionAlignment {
     65        FractionAlignmentCenter,
     66        FractionAlignmentLeft,
     67        FractionAlignmentRight
     68    };
     69    FractionAlignment parseAlignmentAttribute(const String& value);
     70    LayoutUnit horizontalOffset(RenderBox&, FractionAlignment);
    5571
    56     void fixChildStyle(RenderObject*);
    57    
     72    LayoutUnit m_defaultLineThickness;
    5873    LayoutUnit m_lineThickness;
     74    FractionAlignment m_numeratorAlign;
     75    FractionAlignment m_denominatorAlign;
    5976};
    6077
Note: See TracChangeset for help on using the changeset viewer.