Changeset 202934 in webkit


Ignore:
Timestamp:
Jul 7, 2016 2:48:12 PM (8 years ago)
Author:
fred.wang@free.fr
Message:

Refactor layout functions to avoid using flexbox in MathML
https://bugs.webkit.org/show_bug.cgi?id=153991

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

Source/WebCore:

No new tests, already covered by existing tests.

  • css/mathml.css:

(math): Change inline mathematical formulas from inline-flex to inline.
(math[display="block"]): Change display mathematical formulas from flex to block and
remove flexbox property justify-content.
(ms, mspace, mtext, mi, mn, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts,

mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle)
menclose, semantics, mpadded, maction): In order to render properly, all children of the
classes derived from RenderMathMLBlock must now be block-level. So we add more elements in
this list and update the display property.

(mtd > *): However, we use inline-block for children of the cell so that the text-align

property is taken into account.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalWidthInRegion): Add a special case for RenderMathMLBlock
to preserve the old behavior.
(WebCore::RenderBox::sizesLogicalWidthToFitContent): Ditto.

  • rendering/RenderFlexibleBox.h: No need to override layoutBlock anymore.
  • rendering/mathml/RenderMathMLBlock.cpp: Include LayoutRepainter header for use in layoutBlock.

(WebCore::RenderMathMLBlock::RenderMathMLBlock): Inherit from RenderBlock and ensure that
our children are block-level.
(WebCore::RenderMathMLBlock::~RenderMathMLBlock): Added.
(WebCore::RenderMathMLBlock::baselinePosition): If the baselinefirstLineBaseline() is
undefined, just returns 0.
(WebCore::RenderMathMLBlock::paint): Call RenderBlock::paint.
(WebCore::RenderMathMLBlock::layoutItems): Implement a simplified version of
RenderFlexibleBox::layoutItems where we assume horizontal layout for all children.
(WebCore::RenderMathMLBlock::layoutBlock): Add a basic implementation based on
RenderFlexibleBox::layoutBlock.
(WebCore::RenderMathMLBlock::renderName): Deleted. There is now a simple implementation in the header.

  • rendering/mathml/RenderMathMLBlock.h: Use RenderBlock instead of RenderFlexibleBox and

define layout functions. Define avoidsFloats and canDropAnonymousBlockChild to preserve
the old behavior and remove isFlexibleBoxImpl.

  • rendering/mathml/RenderMathMLFenced.cpp:

(WebCore::RenderMathMLFenced::createMathMLOperator): Use block for anonymous RenderMathMLOperator.

  • rendering/mathml/RenderMathMLRow.cpp:

(WebCore::RenderMathMLRow::layoutRowItems): No need to handle the flexbox case anymore.
(WebCore::RenderMathMLRow::paintChildren): Deleted. We now just use RenderBlock::paintChildren.

  • rendering/mathml/RenderMathMLRow.h:
  • rendering/mathml/RenderMathMLFraction.cpp:

(WebCore::RenderMathMLFraction::paintChildren): Deleted. We now just use RenderBlock::paintChildren.

  • rendering/mathml/RenderMathMLFraction.h:
  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::paintChildren): Deleted. We now just use RenderBlock::paintChildren.

  • rendering/mathml/RenderMathMLRoot.h:
  • rendering/mathml/RenderMathMLScripts.cpp:

(WebCore::RenderMathMLScripts::paintChildren): Deleted. We now just use RenderBlock::paintChildren.

  • rendering/mathml/RenderMathMLScripts.h:
  • rendering/mathml/RenderMathMLUnderOver.cpp:

(WebCore::RenderMathMLUnderOver::paintChildren): Deleted. We now just use RenderBlock::paintChildren.

  • rendering/mathml/RenderMathMLUnderOver.h:

LayoutTests:

Update expectations of some MathML tests to take into account the
removal of some line breaks and a better computation of the width of
MathML expressions with vertical stretchy operators.

  • mathml/presentation/stretchy-depth-height-expected.txt:
  • platform/gtk/mathml/opentype/opentype-stretchy-expected.png:
  • platform/gtk/mathml/opentype/opentype-stretchy-expected.txt:
  • platform/gtk/mathml/opentype/vertical-expected.png:
  • platform/gtk/mathml/opentype/vertical-expected.txt:
  • platform/gtk/mathml/presentation/mo-stretch-expected.png:
  • platform/gtk/mathml/presentation/mo-stretch-expected.txt:
  • platform/gtk/mathml/presentation/roots-expected.png:
  • platform/gtk/mathml/presentation/roots-expected.txt:
  • platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.png:
  • platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt:
  • platform/ios-simulator/mathml/presentation/mo-stretch-expected.txt:
  • platform/mac/mathml/opentype/opentype-stretchy-expected.png:
  • platform/mac/mathml/opentype/opentype-stretchy-expected.txt:
  • platform/mac/mathml/presentation/mo-stretch-expected.png:
  • platform/mac/mathml/presentation/mo-stretch-expected.txt:
  • accessibility/mac/mathml-elements-expected.txt:
  • imported/blink/fast/text/output-isolate-at-end-of-line-crash-expected.txt:
Location:
trunk
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r202933 r202934  
     12016-07-07  Frederic Wang  <fwang@igalia.com>
     2
     3        Refactor layout functions to avoid using flexbox in MathML
     4        https://bugs.webkit.org/show_bug.cgi?id=153991
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Update expectations of some MathML tests to take into account the
     9        removal of some line breaks and a better computation of the width of
     10        MathML expressions with vertical stretchy operators.
     11
     12        * mathml/presentation/stretchy-depth-height-expected.txt:
     13        * platform/gtk/mathml/opentype/opentype-stretchy-expected.png:
     14        * platform/gtk/mathml/opentype/opentype-stretchy-expected.txt:
     15        * platform/gtk/mathml/opentype/vertical-expected.png:
     16        * platform/gtk/mathml/opentype/vertical-expected.txt:
     17        * platform/gtk/mathml/presentation/mo-stretch-expected.png:
     18        * platform/gtk/mathml/presentation/mo-stretch-expected.txt:
     19        * platform/gtk/mathml/presentation/roots-expected.png:
     20        * platform/gtk/mathml/presentation/roots-expected.txt:
     21        * platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.png:
     22        * platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt:
     23        * platform/ios-simulator/mathml/presentation/mo-stretch-expected.txt:
     24        * platform/mac/mathml/opentype/opentype-stretchy-expected.png:
     25        * platform/mac/mathml/opentype/opentype-stretchy-expected.txt:
     26        * platform/mac/mathml/presentation/mo-stretch-expected.png:
     27        * platform/mac/mathml/presentation/mo-stretch-expected.txt:
     28        * accessibility/mac/mathml-elements-expected.txt:
     29        * imported/blink/fast/text/output-isolate-at-end-of-line-crash-expected.txt:
     30
    1312016-07-07  Joseph Pecoraro  <pecoraro@apple.com>
    232
  • trunk/LayoutTests/accessibility/mac/mathml-elements-expected.txt

    r202497 r202934  
    3434over
    3535
    36 3
    37 2
    38 1
     363       2       1
    3937This tests ensures that Mac specific attributes and roles for MathML elements work as expected.
    4038
  • trunk/LayoutTests/imported/blink/fast/text/output-isolate-at-end-of-line-crash-expected.txt

    r190629 r202934  
    11>>>>
    2 >hCi* > This test has passed if it doesn't crash under ASAN
     2>hCi* >
     3This test has passed if it doesn't crash under ASAN
  • trunk/LayoutTests/mathml/presentation/stretchy-depth-height-expected.txt

    r202420 r202934  
    88 
    99{
    10 x       y       z
    11 x       y       z
    12 x       y       z
    13 x       y       z
    14 x       y       z
    15  
     10x       y       z       x       y       z       x       y       z       x       y       z       x       y       z
    1611{
    17121
  • trunk/LayoutTests/platform/gtk/mathml/opentype/opentype-stretchy-expected.txt

    r202420 r202934  
    55    RenderBody {BODY} at (8,16) size 784x315
    66      RenderBlock {P} at (0,0) size 784x34
    7         RenderMathMLMath {math} at (0,20) size 49x11 [padding: 0 1 0 1]
     7        RenderMathMLMath {math} at (0,20) size 28x11 [padding: 0 1 0 1]
    88          RenderMathMLRow {mrow} at (1,0) size 26x11
    99            RenderMathMLOperator {mo} at (0,0) size 26x11
     
    1111                RenderText {#text} at (0,-3) size 2x0
    1212                  text run at (0,-3) width 2: "\x{219F}"
    13         RenderText {#text} at (48,17) size 5x17
    14           text run at (48,17) width 5: " "
    15         RenderMathMLMath {math} at (52,10) size 50x21 [padding: 0 1 0 1]
     13        RenderText {#text} at (27,17) size 5x17
     14          text run at (27,17) width 5: " "
     15        RenderMathMLMath {math} at (31,10) size 29x21 [padding: 0 1 0 1]
    1616          RenderMathMLRow {mrow} at (1,0) size 26x21
    1717            RenderMathMLOperator {mo} at (0,0) size 26x21
     
    1919                RenderText {#text} at (0,-3) size 2x0
    2020                  text run at (0,-3) width 2: "\x{219F}"
    21         RenderText {#text} at (101,17) size 5x17
    22           text run at (101,17) width 5: " "
    23         RenderMathMLMath {math} at (105,0) size 49x31 [padding: 0 1 0 1]
     21        RenderText {#text} at (59,17) size 5x17
     22          text run at (59,17) width 5: " "
     23        RenderMathMLMath {math} at (63,0) size 28x31 [padding: 0 1 0 1]
    2424          RenderMathMLRow {mrow} at (1,0) size 26x31
    2525            RenderMathMLOperator {mo} at (0,0) size 26x31
  • trunk/LayoutTests/platform/gtk/mathml/opentype/vertical-expected.txt

    r202420 r202934  
    55    RenderBody {BODY} at (8,16) size 784x339
    66      RenderBlock {P} at (0,0) size 784x18
    7         RenderMathMLMath {math} at (0,2) size 194x16 [padding: 0 1 0 1]
     7        RenderMathMLMath {math} at (0,2) size 100x16 [padding: 0 1 0 1]
    88          RenderMathMLOperator {mo} at (1,0) size 4x16
    99            RenderBlock (anonymous) at (0,0) size 4x16
     
    6969        RenderText {#text} at (0,0) size 0x0
    7070      RenderBlock {P} at (0,34) size 784x30
    71         RenderMathMLMath {math} at (0,0) size 194x30 [padding: 0 1 0 1]
     71        RenderMathMLMath {math} at (0,0) size 142x30 [padding: 0 1 0 1]
    7272          RenderMathMLOperator {mo} at (1,0) size 8x30
    7373            RenderBlock (anonymous) at (0,0) size 4x16
     
    131131                text run at (0,-45) width 6: "\x{27E9}"
    132132          RenderMathMLSpace {mspace} at (140,3) size 0x16
    133         RenderText {#text} at (193,5) size 5x17
    134           text run at (193,5) width 5: " "
    135         RenderMathMLMath {math} at (197,3) size 213x23 [padding: 0 1 0 1]
     133        RenderText {#text} at (141,5) size 5x17
     134          text run at (141,5) width 5: " "
     135        RenderMathMLMath {math} at (145,3) size 212x23 [padding: 0 1 0 1]
    136136          RenderMathMLOperator {mo} at (1,1) size 17x22
    137137            RenderBlock (anonymous) at (0,0) size 8x15
     
    185185        RenderText {#text} at (0,0) size 0x0
    186186      RenderBlock {P} at (0,80) size 784x48
    187         RenderMathMLMath {math} at (0,0) size 194x48 [padding: 0 1 0 1]
     187        RenderMathMLMath {math} at (0,0) size 190x48 [padding: 0 1 0 1]
    188188          RenderMathMLOperator {mo} at (1,0) size 11x48
    189189            RenderBlock (anonymous) at (0,0) size 4x16
  • trunk/LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt

    r202420 r202934  
    44  RenderBlock {HTML} at (0,0) size 800x270
    55    RenderBody {BODY} at (8,8) size 784x254
    6       RenderMathMLMath {math} at (0,0) size 173x36 [padding: 0 1 0 1]
     6      RenderMathMLMath {math} at (0,0) size 140x36 [padding: 0 1 0 1]
    77        RenderMathMLRow {mrow} at (1,0) size 138x36
    88          RenderMathMLOperator {mo} at (0,3) size 10x30
     
    6262              RenderText {#text} at (0,-45) size 8x106
    6363                text run at (0,-45) width 8: "\x{2225}"
    64       RenderText {#text} at (172,8) size 5x17
    65         text run at (172,8) width 5: " "
     64      RenderText {#text} at (139,8) size 5x17
     65        text run at (139,8) width 5: " "
    6666      RenderBR {BR} at (0,0) size 0x0
    67       RenderMathMLMath {math} at (0,36) size 173x143 [padding: 0 1 0 1]
     67      RenderMathMLMath {math} at (0,36) size 172x143 [padding: 0 1 0 1]
    6868        RenderMathMLRow {mrow} at (1,0) size 170x143
    6969          RenderMathMLOperator {mo} at (0,0) size 14x143
     
    124124                text run at (0,-45) width 8: "\x{2225}"
    125125          RenderMathMLSpace {mspace} at (169,0) size 0x76
    126       RenderText {#text} at (172,97) size 5x17
    127         text run at (172,97) width 5: " "
    128       RenderMathMLMath {math} at (176,61) size 173x93 [padding: 0 1 0 1]
     126      RenderText {#text} at (171,97) size 5x17
     127        text run at (171,97) width 5: " "
     128      RenderMathMLMath {math} at (175,61) size 172x93 [padding: 0 1 0 1]
    129129        RenderMathMLRow {mrow} at (1,0) size 170x93
    130130          RenderMathMLOperator {mo} at (0,0) size 14x93
     
    185185                text run at (0,-45) width 8: "\x{2225}"
    186186          RenderMathMLSpace {mspace} at (169,0) size 0x51
    187       RenderText {#text} at (348,97) size 5x17
    188         text run at (348,97) width 5: " "
    189       RenderMathMLMath {math} at (352,89) size 173x36 [padding: 0 1 0 1]
     187      RenderText {#text} at (346,97) size 5x17
     188        text run at (346,97) width 5: " "
     189      RenderMathMLMath {math} at (350,89) size 144x36 [padding: 0 1 0 1]
    190190        RenderMathMLRow {mrow} at (1,0) size 142x36
    191191          RenderMathMLOperator {mo} at (0,1) size 11x34
     
    246246                text run at (0,-45) width 8: "\x{2225}"
    247247          RenderMathMLSpace {mspace} at (141,2) size 0x21
    248       RenderText {#text} at (524,97) size 5x17
    249         text run at (524,97) width 5: " "
     248      RenderText {#text} at (493,97) size 5x17
     249        text run at (493,97) width 5: " "
    250250      RenderBR {BR} at (0,0) size 0x0
    251       RenderMathMLMath {math} at (0,179) size 190x76 [padding: 0 1 0 1]
     251      RenderMathMLMath {math} at (0,179) size 187x76 [padding: 0 1 0 1]
    252252        RenderMathMLRoot {msqrt} at (1,0) size 185x76
    253253          RenderMathMLOperator {mo} at (17,2) size 14x74
  • trunk/LayoutTests/platform/gtk/mathml/presentation/roots-expected.txt

    r202420 r202934  
    77        RenderText {#text} at (0,0) size 177x17
    88          text run at (0,0) width 177: "square root (should be red): "
    9         RenderMathMLMath {math} at (177,1) size 27x18 [padding: 0 1 0 1]
     9        RenderMathMLMath {math} at (177,1) size 23x18 [padding: 0 1 0 1]
    1010          RenderMathMLRoot {msqrt} at (1,0) size 21x18 [color=#FF0000]
    1111            RenderMathMLToken {mn} at (13,2) size 8x13
     
    1616        RenderText {#text} at (0,0) size 110x17
    1717          text run at (0,0) width 110: "long square root: "
    18         RenderMathMLMath {math} at (110,1) size 56x18 [padding: 0 1 0 1]
     18        RenderMathMLMath {math} at (110,1) size 52x18 [padding: 0 1 0 1]
    1919          RenderMathMLRoot {msqrt} at (1,0) size 50x18
    2020            RenderMathMLRow {mrow} at (13,2) size 37x14
     
    3434        RenderText {#text} at (0,2) size 222x17
    3535          text run at (0,2) width 222: "long square root with implied row: "
    36         RenderMathMLMath {math} at (222,0) size 62x19 [padding: 0 1 0 1]
     36        RenderMathMLMath {math} at (222,0) size 58x19 [padding: 0 1 0 1]
    3737          RenderMathMLRoot {msqrt} at (1,0) size 56x19
    3838            RenderMathMLScripts {msup} at (13,2) size 16x15
     
    5656        RenderText {#text} at (0,8) size 113x17
    5757          text run at (0,8) width 113: "root of a fraction: "
    58         RenderMathMLMath {math} at (113,0) size 56x41 [padding: 0 1 0 1]
     58        RenderMathMLMath {math} at (113,0) size 55x41 [padding: 0 1 0 1]
    5959          RenderMathMLRoot {msqrt} at (1,0) size 53x41
    6060            RenderMathMLFraction {mfrac} at (16,2) size 37x34
     
    8888        RenderText {#text} at (0,0) size 173x17
    8989          text run at (0,0) width 173: "cube root (should be blue): "
    90         RenderMathMLMath {math} at (173,1) size 28x18 [color=#0000FF] [padding: 0 1 0 1]
     90        RenderMathMLMath {math} at (173,1) size 24x18 [color=#0000FF] [padding: 0 1 0 1]
    9191          RenderMathMLRoot {mroot} at (1,0) size 22x18
    9292            RenderMathMLToken {mn} at (13,2) size 9x13
     
    101101        RenderText {#text} at (0,0) size 75x17
    102102          text run at (0,0) width 75: "long index: "
    103         RenderMathMLMath {math} at (75,0) size 58x19 [padding: 0 1 0 1]
     103        RenderMathMLMath {math} at (75,0) size 54x19 [padding: 0 1 0 1]
    104104          RenderMathMLRoot {mroot} at (1,0) size 52x19
    105105            RenderMathMLToken {mn} at (43,2) size 9x13
     
    131131        RenderText {#text} at (0,8) size 185x17
    132132          text run at (0,8) width 185: "long index w/ complex base: "
    133         RenderMathMLMath {math} at (185,0) size 86x41 [padding: 0 1 0 1]
     133        RenderMathMLMath {math} at (185,0) size 85x41 [padding: 0 1 0 1]
    134134          RenderMathMLRoot {mroot} at (1,0) size 83x41
    135135            RenderMathMLFraction {mfrac} at (46,2) size 37x34
     
    184184        RenderText {#text} at (0,16) size 75x17
    185185          text run at (0,16) width 75: "high index: "
    186         RenderMathMLMath {math} at (75,0) size 28x35 [padding: 0 1 0 1]
     186        RenderMathMLMath {math} at (75,0) size 24x35 [padding: 0 1 0 1]
    187187          RenderMathMLRoot {mroot} at (1,0) size 22x35
    188188            RenderMathMLToken {mn} at (13,18) size 9x13
     
    207207        RenderText {#text} at (0,14) size 155x17
    208208          text run at (0,14) width 155: "Imbricated square roots: "
    209         RenderMathMLMath {math} at (155,0) size 340x55 [padding: 0 1 0 1]
     209        RenderMathMLMath {math} at (155,0) size 332x55 [padding: 0 1 0 1]
    210210          RenderMathMLRoot {msqrt} at (1,0) size 330x55
    211211            RenderMathMLToken {mn} at (17,17) size 8x13
     
    286286        RenderText {#text} at (0,24) size 110x17
    287287          text run at (0,24) width 110: "Imbricated roots: "
    288         RenderMathMLMath {math} at (110,0) size 360x57 [padding: 0 1 0 1]
     288        RenderMathMLMath {math} at (110,0) size 353x57 [padding: 0 1 0 1]
    289289          RenderMathMLRoot {mroot} at (1,0) size 351x57
    290290            RenderMathMLRow {mrow} at (17,2) size 334x55
     
    412412        RenderText {#text} at (0,24) size 74x17
    413413          text run at (0,24) width 74: "RTL roots: "
    414         RenderMathMLMath {math} at (74,0) size 360x57 [padding: 0 1 0 1]
    415           RenderMathMLRoot {mroot} at (8,0) size 351x57
     414        RenderMathMLMath {math} at (74,0) size 353x57 [padding: 0 1 0 1]
     415          RenderMathMLRoot {mroot} at (1,0) size 351x57
    416416            RenderMathMLRow {mrow} at (0,2) size 333x55
    417417              RenderMathMLToken {mn} at (324,25) size 9x12
  • trunk/LayoutTests/platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt

    r202420 r202934  
    55    RenderBody {BODY} at (8,16) size 784x310
    66      RenderBlock {P} at (0,0) size 784x36
    7         RenderMathMLMath {math} at (0,21) size 49x11 [padding: 0 1 0 1]
     7        RenderMathMLMath {math} at (0,21) size 28x11 [padding: 0 1 0 1]
    88          RenderMathMLRow {mrow} at (1,0) size 26x11
    99            RenderMathMLOperator {mo} at (0,0) size 26x11
     
    1111                RenderText {#text} at (0,-3) size 3x0
    1212                  text run at (0,-3) width 3: "\x{219F}"
    13         RenderText {#text} at (48,16) size 5x19
    14           text run at (48,16) width 5: " "
    15         RenderMathMLMath {math} at (52,11) size 49x21 [padding: 0 1 0 1]
     13        RenderText {#text} at (28,16) size 4x19
     14          text run at (28,16) width 4: " "
     15        RenderMathMLMath {math} at (32,11) size 28x21 [padding: 0 1 0 1]
    1616          RenderMathMLRow {mrow} at (1,0) size 26x21
    1717            RenderMathMLOperator {mo} at (0,0) size 26x21
     
    1919                RenderText {#text} at (0,-3) size 3x0
    2020                  text run at (0,-3) width 3: "\x{219F}"
    21         RenderText {#text} at (100,16) size 5x19
    22           text run at (100,16) width 5: " "
    23         RenderMathMLMath {math} at (104,0) size 50x31 [padding: 0 1 0 1]
     21        RenderText {#text} at (60,16) size 4x19
     22          text run at (60,16) width 4: " "
     23        RenderMathMLMath {math} at (64,0) size 28x31 [padding: 0 1 0 1]
    2424          RenderMathMLRow {mrow} at (1,0) size 26x31
    2525            RenderMathMLOperator {mo} at (0,0) size 26x31
  • trunk/LayoutTests/platform/ios-simulator/mathml/presentation/mo-stretch-expected.txt

    r202748 r202934  
    44  RenderBlock {HTML} at (0,0) size 800x254
    55    RenderBody {BODY} at (8,8) size 784x238
    6       RenderMathMLMath {math} at (0,2) size 70x18 [padding: 0 1 0 1]
     6      RenderMathMLMath {math} at (0,2) size 60x18 [padding: 0 1 0 1]
    77        RenderMathMLRow {mrow} at (1,0) size 58x18
    88          RenderMathMLOperator {mo} at (0,1) size 6x15
     
    6262              RenderText {#text} at (0,0) size 11x17
    6363                text run at (0,0) width 11: "\x{2225}"
    64       RenderText {#text} at (69,0) size 5x19
    65         text run at (69,0) width 5: " "
     64      RenderText {#text} at (59,0) size 5x19
     65        text run at (59,0) width 5: " "
    6666      RenderBR {BR} at (0,0) size 0x0
    6767      RenderMathMLMath {math} at (0,20) size 70x143 [padding: 0 1 0 1]
  • trunk/LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-expected.txt

    r202420 r202934  
    55    RenderBody {BODY} at (8,16) size 784x307
    66      RenderBlock {P} at (0,0) size 784x35
    7         RenderMathMLMath {math} at (0,21) size 49x11 [padding: 0 1 0 1]
     7        RenderMathMLMath {math} at (0,21) size 28x11 [padding: 0 1 0 1]
    88          RenderMathMLRow {mrow} at (1,0) size 26x11
    99            RenderMathMLOperator {mo} at (0,0) size 26x11
     
    1111                RenderText {#text} at (0,-3) size 3x0
    1212                  text run at (0,-3) width 3: "\x{219F}"
    13         RenderText {#text} at (48,17) size 5x18
    14           text run at (48,17) width 5: " "
    15         RenderMathMLMath {math} at (52,11) size 49x21 [padding: 0 1 0 1]
     13        RenderText {#text} at (28,17) size 4x18
     14          text run at (28,17) width 4: " "
     15        RenderMathMLMath {math} at (32,11) size 28x21 [padding: 0 1 0 1]
    1616          RenderMathMLRow {mrow} at (1,0) size 26x21
    1717            RenderMathMLOperator {mo} at (0,0) size 26x21
     
    1919                RenderText {#text} at (0,-3) size 3x0
    2020                  text run at (0,-3) width 3: "\x{219F}"
    21         RenderText {#text} at (100,17) size 5x18
    22           text run at (100,17) width 5: " "
    23         RenderMathMLMath {math} at (104,0) size 50x31 [padding: 0 1 0 1]
     21        RenderText {#text} at (60,17) size 4x18
     22          text run at (60,17) width 4: " "
     23        RenderMathMLMath {math} at (64,0) size 28x31 [padding: 0 1 0 1]
    2424          RenderMathMLRow {mrow} at (1,0) size 26x31
    2525            RenderMathMLOperator {mo} at (0,0) size 26x31
  • trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt

    r202748 r202934  
    44  RenderBlock {HTML} at (0,0) size 800x258
    55    RenderBody {BODY} at (8,8) size 784x242
    6       RenderMathMLMath {math} at (0,0) size 126x25 [padding: 0 1 0 1]
     6      RenderMathMLMath {math} at (0,0) size 110x25 [padding: 0 1 0 1]
    77        RenderMathMLRow {mrow} at (1,0) size 108x25
    88          RenderMathMLOperator {mo} at (0,5) size 6x14
     
    6262              RenderText {#text} at (0,-5) size 9x24
    6363                text run at (0,-5) width 9: "\x{2225}"
    64       RenderText {#text} at (125,2) size 5x18
    65         text run at (125,2) width 5: " "
     64      RenderText {#text} at (109,2) size 5x18
     65        text run at (109,2) width 5: " "
    6666      RenderBR {BR} at (0,0) size 0x0
    67       RenderMathMLMath {math} at (0,24) size 126x143 [padding: 0 1 0 1]
     67      RenderMathMLMath {math} at (0,24) size 125x143 [padding: 0 1 0 1]
    6868        RenderMathMLRow {mrow} at (1,0) size 123x143
    6969          RenderMathMLOperator {mo} at (0,0) size 8x143
     
    124124                text run at (0,-5) width 9: "\x{2225}"
    125125          RenderMathMLSpace {mspace} at (122,0) size 0x76
    126       RenderText {#text} at (125,85) size 5x18
    127         text run at (125,85) width 5: " "
    128       RenderMathMLMath {math} at (129,49) size 126x93 [padding: 0 1 0 1]
     126      RenderText {#text} at (124,85) size 5x18
     127        text run at (124,85) width 5: " "
     128      RenderMathMLMath {math} at (128,49) size 125x93 [padding: 0 1 0 1]
    129129        RenderMathMLRow {mrow} at (1,0) size 123x93
    130130          RenderMathMLOperator {mo} at (0,0) size 8x93
     
    185185                text run at (0,-5) width 9: "\x{2225}"
    186186          RenderMathMLSpace {mspace} at (122,0) size 0x51
    187       RenderText {#text} at (254,85) size 5x18
    188         text run at (254,85) width 5: " "
    189       RenderMathMLMath {math} at (258,79) size 127x33 [padding: 0 1 0 1]
     187      RenderText {#text} at (252,85) size 5x18
     188        text run at (252,85) width 5: " "
     189      RenderMathMLMath {math} at (256,79) size 116x33 [padding: 0 1 0 1]
    190190        RenderMathMLRow {mrow} at (1,0) size 114x33
    191191          RenderMathMLOperator {mo} at (0,0) size 8x33
     
    246246                text run at (0,-5) width 9: "\x{2225}"
    247247          RenderMathMLSpace {mspace} at (113,0) size 0x21
    248       RenderText {#text} at (384,85) size 5x18
    249         text run at (384,85) width 5: " "
     248      RenderText {#text} at (371,85) size 5x18
     249        text run at (371,85) width 5: " "
    250250      RenderBR {BR} at (0,0) size 0x0
    251       RenderMathMLMath {math} at (0,166) size 141x77 [padding: 0 1 0 1]
     251      RenderMathMLMath {math} at (0,166) size 139x77 [padding: 0 1 0 1]
    252252        RenderMathMLRoot {msqrt} at (1,0) size 137x77
    253253          RenderMathMLOperator {mo} at (14,3) size 9x74
  • trunk/Source/WebCore/ChangeLog

    r202931 r202934  
     12016-07-07  Frederic Wang  <fwang@igalia.com>
     2
     3        Refactor layout functions to avoid using flexbox in MathML
     4        https://bugs.webkit.org/show_bug.cgi?id=153991
     5
     6        Reviewed by Brent Fulgham.
     7
     8        No new tests, already covered by existing tests.
     9
     10        * css/mathml.css:
     11        (math): Change inline mathematical formulas from inline-flex to inline.
     12        (math[display="block"]): Change display mathematical formulas from flex to block and
     13        remove flexbox property justify-content.
     14        (ms, mspace, mtext, mi, mn, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts,
     15         mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle)
     16         menclose, semantics, mpadded, maction): In order to render properly, all children of the
     17         classes derived from RenderMathMLBlock must now be block-level. So we add more elements in
     18         this list and update the display property.
     19        (mtd > *): However, we use inline-block for children of the cell so that the text-align
     20         property is taken into account.
     21        * rendering/RenderBox.cpp:
     22        (WebCore::RenderBox::computeLogicalWidthInRegion): Add a special case for RenderMathMLBlock
     23        to preserve the old behavior.
     24        (WebCore::RenderBox::sizesLogicalWidthToFitContent): Ditto.
     25        * rendering/RenderFlexibleBox.h: No need to override layoutBlock anymore.
     26        * rendering/mathml/RenderMathMLBlock.cpp: Include LayoutRepainter header for use in layoutBlock.
     27        (WebCore::RenderMathMLBlock::RenderMathMLBlock): Inherit from RenderBlock and ensure that
     28        our children are block-level.
     29        (WebCore::RenderMathMLBlock::~RenderMathMLBlock): Added.
     30        (WebCore::RenderMathMLBlock::baselinePosition): If the baselinefirstLineBaseline() is
     31        undefined, just returns 0.
     32        (WebCore::RenderMathMLBlock::paint): Call RenderBlock::paint.
     33        (WebCore::RenderMathMLBlock::layoutItems): Implement a simplified version of
     34        RenderFlexibleBox::layoutItems where we assume horizontal layout for all children.
     35        (WebCore::RenderMathMLBlock::layoutBlock): Add a basic implementation based on
     36        RenderFlexibleBox::layoutBlock.
     37        (WebCore::RenderMathMLBlock::renderName): Deleted. There is now a simple implementation in the header.
     38        * rendering/mathml/RenderMathMLBlock.h: Use RenderBlock instead of RenderFlexibleBox and
     39        define layout functions. Define avoidsFloats and canDropAnonymousBlockChild to preserve
     40        the old behavior and remove isFlexibleBoxImpl.
     41        * rendering/mathml/RenderMathMLFenced.cpp:
     42        (WebCore::RenderMathMLFenced::createMathMLOperator): Use block for anonymous RenderMathMLOperator.
     43        * rendering/mathml/RenderMathMLRow.cpp:
     44        (WebCore::RenderMathMLRow::layoutRowItems): No need to handle the flexbox case anymore.
     45        (WebCore::RenderMathMLRow::paintChildren): Deleted. We now just use RenderBlock::paintChildren.
     46        * rendering/mathml/RenderMathMLRow.h:
     47        * rendering/mathml/RenderMathMLFraction.cpp:
     48        (WebCore::RenderMathMLFraction::paintChildren): Deleted. We now just use RenderBlock::paintChildren.
     49        * rendering/mathml/RenderMathMLFraction.h:
     50        * rendering/mathml/RenderMathMLRoot.cpp:
     51        (WebCore::RenderMathMLRoot::paintChildren): Deleted. We now just use RenderBlock::paintChildren.
     52        * rendering/mathml/RenderMathMLRoot.h:
     53        * rendering/mathml/RenderMathMLScripts.cpp:
     54        (WebCore::RenderMathMLScripts::paintChildren): Deleted. We now just use RenderBlock::paintChildren.
     55        * rendering/mathml/RenderMathMLScripts.h:
     56        * rendering/mathml/RenderMathMLUnderOver.cpp:
     57        (WebCore::RenderMathMLUnderOver::paintChildren): Deleted. We now just use RenderBlock::paintChildren.
     58        * rendering/mathml/RenderMathMLUnderOver.h:
     59
    1602016-07-07  Antti Koivisto  <antti@apple.com>
    261
  • trunk/Source/WebCore/css/mathml.css

    r202420 r202934  
    9696
    9797math {
    98     display: -webkit-inline-flex !important;
     98    display: inline !important;
    9999    padding-left: 1px;
    100100    padding-right: 1px;
     
    102102
    103103math[display="block"] {
    104     display: flex !important;
    105     justify-content: center;
     104    display: block !important;
    106105    page-break-inside: avoid;
    107106    /* -webkit-margin-before: 1em; -- FIXME: Ask www-math for a default MathML stylesheet, including this (or margin-top). */
     
    109108}
    110109
    111 ms, mi, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose {
    112     display: -webkit-inline-flex !important;
     110ms, mspace, mtext, mi, mn, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose, semantics, mpadded, maction {
     111    display: block !important;
    113112}
    114113
     
    191190    padding: 0.5ex;
    192191}
     192/* Use inline-block for children so that the text-align property is taken into account */
     193mtd > * {
     194    display: inline-block !important;
     195}
    193196
    194197mtable[columnalign="left"], mtr[columnalign="left"], mtd[columnalign="left"] {
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r202856 r202934  
    24422442    if (!hasPerpendicularContainingBlock && containerLogicalWidth && containerLogicalWidth != (computedValues.m_extent + computedValues.m_margins.m_start + computedValues.m_margins.m_end)
    24432443        && !isFloating() && !isInline() && !cb.isFlexibleBoxIncludingDeprecated()
     2444#if ENABLE(MATHML)
     2445        // RenderMathMLBlocks take the size of their content so we must not adjust the margin to fill the container size.
     2446        && !cb.isRenderMathMLBlock()
     2447#endif
    24442448#if ENABLE(CSS_GRID_LAYOUT)
    24452449        && !cb.isRenderGrid()
     
    25882592            return true;
    25892593    }
     2594
     2595#if ENABLE(MATHML)
     2596    // RenderMathMLBlocks take the size of their content, not of their container.
     2597    if (parent()->isRenderMathMLBlock())
     2598        return true;
     2599#endif
    25902600
    25912601    // Flexible box items should shrink wrap, so we lay them out at their intrinsic widths.
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.h

    r201516 r202934  
    4747    bool avoidsFloats() const final { return true; }
    4848    bool canDropAnonymousBlockChild() const final { return false; }
    49     void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
     49    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    5050
    5151    int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override;
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp

    r202727 r202934  
    3232
    3333#include "GraphicsContext.h"
     34#include "LayoutRepainter.h"
    3435#include "MathMLNames.h"
    3536#include "RenderView.h"
     
    4546
    4647RenderMathMLBlock::RenderMathMLBlock(Element& container, RenderStyle&& style)
    47     : RenderFlexibleBox(container, WTFMove(style))
    48 {
     48    : RenderBlock(container, WTFMove(style), 0)
     49{
     50    setChildrenInline(false); // All of our children must be block-level.
    4951}
    5052
    5153RenderMathMLBlock::RenderMathMLBlock(Document& document, RenderStyle&& style)
    52     : RenderFlexibleBox(document, WTFMove(style))
     54    : RenderBlock(document, WTFMove(style), 0)
     55{
     56    setChildrenInline(false); // All of our children must be block-level.
     57}
     58
     59RenderMathMLBlock::~RenderMathMLBlock()
    5360{
    5461}
     
    8390        return 0;
    8491
    85     // FIXME: This may be unnecessary after flex baselines are implemented (https://bugs.webkit.org/show_bug.cgi?id=96188).
    86     return firstLineBaseline().valueOrCompute([&] {
    87         return RenderFlexibleBox::baselinePosition(baselineType, firstLine, direction, linePositionMode);
    88     });
    89 }
    90 
    91 const char* RenderMathMLBlock::renderName() const
    92 {
    93     EDisplay display = style().display();
    94     if (display == FLEX)
    95         return isAnonymous() ? "RenderMathMLBlock (anonymous, flex)" : "RenderMathMLBlock (flex)";
    96     if (display == INLINE_FLEX)
    97         return isAnonymous() ? "RenderMathMLBlock (anonymous, inline-flex)" : "RenderMathMLBlock (inline-flex)";
    98     // |display| should be one of the above.
    99     ASSERT_NOT_REACHED();
    100     return isAnonymous() ? "RenderMathMLBlock (anonymous)" : "RenderMathMLBlock";
     92    return firstLineBaseline().valueOr(RenderBlock::baselinePosition(baselineType, firstLine, direction, linePositionMode));
    10193}
    10294
     
    10496void RenderMathMLBlock::paint(PaintInfo& info, const LayoutPoint& paintOffset)
    10597{
    106     RenderFlexibleBox::paint(info, paintOffset);
     98    RenderBlock::paint(info, paintOffset);
    10799
    108100    if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground)
     
    317309}
    318310
     311void RenderMathMLBlock::layoutItems(bool relayoutChildren)
     312{
     313    LayoutUnit verticalOffset = borderBefore() + paddingBefore();
     314    LayoutUnit horizontalOffset = borderStart() + paddingStart();
     315
     316    LayoutUnit preferredHorizontalExtent = 0;
     317    for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
     318        LayoutUnit childHorizontalExtent = child->maxPreferredLogicalWidth() - child->horizontalBorderAndPaddingExtent();
     319        LayoutUnit childHorizontalMarginBoxExtent = child->horizontalBorderAndPaddingExtent() + childHorizontalExtent;
     320        childHorizontalMarginBoxExtent += child->horizontalMarginExtent();
     321
     322        preferredHorizontalExtent += childHorizontalMarginBoxExtent;
     323    }
     324
     325    LayoutUnit currentHorizontalExtent = contentLogicalWidth();
     326    for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
     327        LayoutUnit childSize = child->maxPreferredLogicalWidth() - child->horizontalBorderAndPaddingExtent();
     328
     329        if (preferredHorizontalExtent > currentHorizontalExtent)
     330            childSize = currentHorizontalExtent;
     331
     332        LayoutUnit childPreferredSize = childSize + child->horizontalBorderAndPaddingExtent();
     333
     334        if (childPreferredSize != child->width())
     335            child->setChildNeedsLayout(MarkOnlyThis);
     336
     337        updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *child);
     338        child->layoutIfNeeded();
     339
     340        LayoutUnit childVerticalMarginBoxExtent;
     341        childVerticalMarginBoxExtent = child->height() + child->verticalMarginExtent();
     342
     343        setLogicalHeight(std::max(logicalHeight(), verticalOffset + borderAfter() + paddingAfter() + childVerticalMarginBoxExtent + horizontalScrollbarHeight()));
     344
     345        horizontalOffset += child->marginStart();
     346
     347        LayoutUnit childHorizontalExtent = child->width();
     348        LayoutPoint childLocation(style().isLeftToRightDirection() ? horizontalOffset : width() - horizontalOffset - childHorizontalExtent,
     349            verticalOffset + child->marginBefore());
     350
     351        child->setLocation(childLocation);
     352        horizontalOffset += childHorizontalExtent + child->marginEnd();
     353    }
     354}
     355
     356void RenderMathMLBlock::layoutBlock(bool relayoutChildren, LayoutUnit)
     357{
     358    ASSERT(needsLayout());
     359
     360    if (!relayoutChildren && simplifiedLayout())
     361        return;
     362
     363    LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
     364
     365    if (recomputeLogicalWidth())
     366        relayoutChildren = true;
     367
     368    setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight());
     369
     370    layoutItems(relayoutChildren);
     371
     372    updateLogicalHeight();
     373
     374    repainter.repaintAfterLayout();
     375
     376    clearNeedsLayout();
     377}
     378
    319379}
    320380
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h

    r202727 r202934  
    3030#if ENABLE(MATHML)
    3131
    32 #include "RenderFlexibleBox.h"
     32#include "RenderBlock.h"
    3333#include "RenderTable.h"
    3434#include "StyleInheritedData.h"
     
    4040class RenderMathMLOperator;
    4141
    42 class RenderMathMLBlock : public RenderFlexibleBox {
     42class RenderMathMLBlock : public RenderBlock {
    4343public:
    4444    RenderMathMLBlock(Element&, RenderStyle&&);
    4545    RenderMathMLBlock(Document&, RenderStyle&&);
     46    virtual ~RenderMathMLBlock();
    4647
    4748    bool isChildAllowed(const RenderObject&, const RenderStyle&) const override;
     
    7273    }
    7374
     75    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
     76
    7477private:
    7578    bool isRenderMathMLBlock() const final { return true; }
    76     const char* renderName() const override;
    77     bool isFlexibleBoxImpl() const override { return true; }
     79    const char* renderName() const override { return "RenderMathMLBlock"; }
     80    bool avoidsFloats() const final { return true; }
     81    bool canDropAnonymousBlockChild() const final { return false; }
     82    void layoutItems(bool relayoutChildren);
    7883};
    7984
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp

    r202727 r202934  
    8686RenderPtr<RenderMathMLOperator> RenderMathMLFenced::createMathMLOperator(const String& operatorString, MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag)
    8787{
    88     RenderPtr<RenderMathMLOperator> newOperator = createRenderer<RenderMathMLOperator>(document(), RenderStyle::createAnonymousStyleWithDisplay(style(), FLEX), operatorString, form, flag);
     88    RenderPtr<RenderMathMLOperator> newOperator = createRenderer<RenderMathMLOperator>(document(), RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK), operatorString, form, flag);
    8989    newOperator->initializeStyle();
    9090    return newOperator;
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp

    r202727 r202934  
    228228}
    229229
    230 void 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 
    238230}
    239231
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.h

    r202727 r202934  
    4444
    4545    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    46     void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;
    4746
    4847protected:
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

    r202727 r202934  
    239239}
    240240
    241 void RenderMathMLRoot::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)
    242 {
    243     for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
    244         if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))
    245             return;
    246     }
    247 }
    248 
    249241void RenderMathMLRoot::paint(PaintInfo& info, const LayoutPoint& paintOffset)
    250242{
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h

    r202168 r202934  
    5050    void computePreferredLogicalWidths() final;
    5151    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    52     void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;
    5352
    5453protected:
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp

    r202441 r202934  
    162162
    163163    LayoutUnit centerBlockOffset = 0;
    164     // FIXME: Remove the FLEX when it is not required by the css.
    165     if (style().display() == BLOCK || style().display() == FLEX)
     164    if (style().display() == BLOCK)
    166165        centerBlockOffset = std::max<LayoutUnit>(0, (logicalWidth() - (horizontalOffset + borderEnd() + paddingEnd())) / 2);
    167166
     
    201200}
    202201
    203 void RenderMathMLRow::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)
    204 {
    205     for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
    206         if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))
    207             return;
    208     }
    209 }
    210 
    211202}
    212203
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h

    r202569 r202934  
    4444
    4545    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
    46     void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) override;
    4746    Optional<int> firstLineBaseline() const override;
    4847
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp

    r202727 r202934  
    427427}
    428428
    429 void RenderMathMLScripts::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)
    430 {
    431     for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
    432         if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))
    433             return;
    434     }
    435 }
    436 
    437429}
    438430
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h

    r202168 r202934  
    4141    Optional<int> firstLineBaseline() const final;
    4242    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    43     void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;
    4443
    4544private:
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp

    r202727 r202934  
    223223}
    224224
    225 void RenderMathMLUnderOver::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect)
    226 {
    227     for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
    228         if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock))
    229             return;
    230     }
    231 }
    232 
    233225}
    234226
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h

    r202727 r202934  
    4444    void computePreferredLogicalWidths() final;
    4545    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    46     void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;
    4746
    4847private:
Note: See TracChangeset for help on using the changeset viewer.