Changeset 164535 in webkit


Ignore:
Timestamp:
Feb 22, 2014 1:57:35 AM (10 years ago)
Author:
fred.wang@free.fr
Message:

Unreviewed, rolling out r164534.
http://trac.webkit.org/changeset/164534
https://bugs.webkit.org/show_bug.cgi?id=119043

missing tests

Source/WebCore:

  • rendering/RenderObject.h:
  • rendering/mathml/RenderMathMLBlock.h:
  • rendering/mathml/RenderMathMLOperator.cpp:

(WebCore::RenderMathMLOperator::RenderMathMLOperator):
(WebCore::RenderMathMLOperator::expandedStretchHeight):
(WebCore::RenderMathMLOperator::stretchToHeight):
(WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter):
(WebCore::RenderMathMLOperator::updateStyle):
(WebCore::RenderMathMLOperator::firstLineBaseline):
(WebCore::RenderMathMLOperator::computeLogicalHeight):

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

(WebCore::RenderMathMLRow::layout):

LayoutTests:

  • mathml/presentation/stretchy-depth-height-expected.txt: Removed.
  • mathml/presentation/stretchy-depth-height.html: Removed.
  • platform/mac/mathml/presentation/mo-stretch-expected.txt:
Location:
trunk
Files:
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r164534 r164535  
     12014-02-22  Frédéric Wang  <fred.wang@free.fr>
     2
     3        Unreviewed, rolling out r164534.
     4        http://trac.webkit.org/changeset/164534
     5        https://bugs.webkit.org/show_bug.cgi?id=119043
     6
     7        missing tests
     8
     9        * mathml/presentation/stretchy-depth-height-expected.txt: Removed.
     10        * mathml/presentation/stretchy-depth-height.html: Removed.
     11        * platform/mac/mathml/presentation/mo-stretch-expected.txt:
     12
    1132014-02-22  Frédéric Wang  <fred.wang@free.fr>
    214
  • trunk/LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt

    r164534 r164535  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x166
    4   RenderBlock {HTML} at (0,0) size 800x166
    5     RenderBody {BODY} at (8,8) size 784x150
     3layer at (0,0) size 800x216
     4  RenderBlock {HTML} at (0,0) size 800x216
     5    RenderBody {BODY} at (8,8) size 784x200
    66      RenderMathMLMath {math} at (0,0) size 195x20 [padding: 0 1 0 1]
    77        RenderMathMLRow {mrow} at (1,0) size 193x20
     
    7979        text run at (194,0) width 5: " "
    8080      RenderBR {BR} at (0,0) size 0x0
    81       RenderMathMLMath {math} at (0,20) size 199x76 [padding: 0 1 0 1]
    82         RenderMathMLRow {mrow} at (1,0) size 197x76
    83           RenderMathMLOperator {mo} at (1,0) size 8x76
     81      RenderMathMLMath {math} at (0,20) size 199x114 [padding: 0 1 0 1]
     82        RenderMathMLRow {mrow} at (1,0) size 197x114
     83          RenderMathMLOperator {mo} at (1,22) size 8x92
    8484            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    8585              RenderBlock (anonymous) at (0,0) size 5x14
    8686                RenderText at (0,-6) size 5x24
    8787                  text run at (0,-6) width 5: "("
    88           RenderMathMLOperator {mo} at (13,0) size 8x76
     88          RenderMathMLOperator {mo} at (13,22) size 8x92
    8989            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    9090              RenderBlock (anonymous) at (0,0) size 5x14
    9191                RenderText at (0,-6) size 5x24
    9292                  text run at (0,-6) width 5: ")"
    93           RenderMathMLOperator {mo} at (26,0) size 11x76
     93          RenderMathMLOperator {mo} at (26,22) size 11x92
    9494            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
    9595              RenderBlock (anonymous) at (0,0) size 8x14
    9696                RenderText at (0,-6) size 8x24
    9797                  text run at (0,-6) width 8: "{"
    98           RenderMathMLOperator {mo} at (43,0) size 11x76
     98          RenderMathMLOperator {mo} at (43,22) size 11x92
    9999            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
    100100              RenderBlock (anonymous) at (0,0) size 8x14
    101101                RenderText at (0,-6) size 8x24
    102102                  text run at (0,-6) width 8: "}"
    103           RenderMathMLOperator {mo} at (59,0) size 8x76
     103          RenderMathMLOperator {mo} at (59,22) size 8x92
    104104            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    105105              RenderBlock (anonymous) at (0,0) size 5x14
    106106                RenderText at (0,-6) size 5x24
    107107                  text run at (0,-6) width 5: "["
    108           RenderMathMLOperator {mo} at (72,0) size 8x76
     108          RenderMathMLOperator {mo} at (72,22) size 8x92
    109109            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    110110              RenderBlock (anonymous) at (0,0) size 5x14
    111111                RenderText at (0,-6) size 5x24
    112112                  text run at (0,-6) width 5: "]"
    113           RenderMathMLOperator {mo} at (86,0) size 9x76
     113          RenderMathMLOperator {mo} at (86,22) size 9x92
    114114            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    115115              RenderBlock (anonymous) at (0,0) size 8x16
    116116                RenderText at (0,-5) size 8x24
    117117                  text run at (0,-5) width 8: "\x{2308}"
    118           RenderMathMLOperator {mo} at (100,0) size 9x76
     118          RenderMathMLOperator {mo} at (100,22) size 9x92
    119119            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    120120              RenderBlock (anonymous) at (0,0) size 8x16
    121121                RenderText at (0,-5) size 8x24
    122122                  text run at (0,-5) width 8: "\x{2309}"
    123           RenderMathMLOperator {mo} at (115,0) size 8x76
     123          RenderMathMLOperator {mo} at (115,22) size 8x92
    124124            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    125125              RenderBlock (anonymous) at (0,0) size 8x16
    126126                RenderText at (0,-5) size 8x24
    127127                  text run at (0,-5) width 8: "\x{230A}"
    128           RenderMathMLOperator {mo} at (129,0) size 9x76
     128          RenderMathMLOperator {mo} at (129,22) size 9x92
    129129            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    130130              RenderBlock (anonymous) at (0,0) size 8x16
    131131                RenderText at (0,-5) size 8x24
    132132                  text run at (0,-5) width 8: "\x{230B}"
    133           RenderMathMLOperator {mo} at (143,0) size 12x76
     133          RenderMathMLOperator {mo} at (143,22) size 12x92
    134134            RenderMathMLBlock (flex) {mo} at (0,0) size 11x20
    135135              RenderBlock (anonymous) at (0,0) size 7x20
    136136                RenderText at (0,-3) size 7x24
    137137                  text run at (0,-3) width 7: "\x{222B}"
    138           RenderMathMLOperator {mo} at (161,0) size 4x76
     138          RenderMathMLOperator {mo} at (161,22) size 4x92
    139139            RenderMathMLBlock (flex) {mo} at (0,0) size 3x12
    140140              RenderBlock (anonymous) at (0,0) size 3x12
    141141                RenderText at (0,-6) size 3x24
    142142                  text run at (0,-6) width 3: "|"
    143           RenderMathMLOperator {mo} at (170,0) size 9x76
     143          RenderMathMLOperator {mo} at (170,22) size 9x92
    144144            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    145145              RenderBlock (anonymous) at (0,0) size 8x16
    146146                RenderText at (0,-5) size 8x24
    147147                  text run at (0,-5) width 8: "\x{2016}"
    148           RenderMathMLOperator {mo} at (184,0) size 9x76
     148          RenderMathMLOperator {mo} at (184,22) size 9x92
    149149            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    150150              RenderBlock (anonymous) at (0,0) size 8x16
     
    154154      RenderText {#text} at (198,81) size 5x18
    155155        text run at (198,81) width 5: " "
    156       RenderMathMLMath {math} at (202,45) size 199x51 [padding: 0 1 0 1]
    157         RenderMathMLRow {mrow} at (1,0) size 197x51
    158           RenderMathMLOperator {mo} at (1,0) size 8x51
     156      RenderMathMLMath {math} at (202,45) size 199x77 [padding: 0 1 0 1]
     157        RenderMathMLRow {mrow} at (1,0) size 197x77
     158          RenderMathMLOperator {mo} at (1,15) size 8x62
    159159            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    160160              RenderBlock (anonymous) at (0,0) size 5x14
    161161                RenderText at (0,-6) size 5x24
    162162                  text run at (0,-6) width 5: "("
    163           RenderMathMLOperator {mo} at (13,0) size 8x51
     163          RenderMathMLOperator {mo} at (13,15) size 8x62
    164164            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    165165              RenderBlock (anonymous) at (0,0) size 5x14
    166166                RenderText at (0,-6) size 5x24
    167167                  text run at (0,-6) width 5: ")"
    168           RenderMathMLOperator {mo} at (26,0) size 11x51
     168          RenderMathMLOperator {mo} at (26,15) size 11x62
    169169            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
    170170              RenderBlock (anonymous) at (0,0) size 8x14
    171171                RenderText at (0,-6) size 8x24
    172172                  text run at (0,-6) width 8: "{"
    173           RenderMathMLOperator {mo} at (43,0) size 11x51
     173          RenderMathMLOperator {mo} at (43,15) size 11x62
    174174            RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
    175175              RenderBlock (anonymous) at (0,0) size 8x14
    176176                RenderText at (0,-6) size 8x24
    177177                  text run at (0,-6) width 8: "}"
    178           RenderMathMLOperator {mo} at (59,0) size 8x51
     178          RenderMathMLOperator {mo} at (59,15) size 8x62
    179179            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    180180              RenderBlock (anonymous) at (0,0) size 5x14
    181181                RenderText at (0,-6) size 5x24
    182182                  text run at (0,-6) width 5: "["
    183           RenderMathMLOperator {mo} at (72,0) size 8x51
     183          RenderMathMLOperator {mo} at (72,15) size 8x62
    184184            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    185185              RenderBlock (anonymous) at (0,0) size 5x14
    186186                RenderText at (0,-6) size 5x24
    187187                  text run at (0,-6) width 5: "]"
    188           RenderMathMLOperator {mo} at (86,0) size 9x51
     188          RenderMathMLOperator {mo} at (86,15) size 9x62
    189189            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    190190              RenderBlock (anonymous) at (0,0) size 8x16
    191191                RenderText at (0,-5) size 8x24
    192192                  text run at (0,-5) width 8: "\x{2308}"
    193           RenderMathMLOperator {mo} at (100,0) size 9x51
     193          RenderMathMLOperator {mo} at (100,15) size 9x62
    194194            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    195195              RenderBlock (anonymous) at (0,0) size 8x16
    196196                RenderText at (0,-5) size 8x24
    197197                  text run at (0,-5) width 8: "\x{2309}"
    198           RenderMathMLOperator {mo} at (115,0) size 8x51
     198          RenderMathMLOperator {mo} at (115,15) size 8x62
    199199            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    200200              RenderBlock (anonymous) at (0,0) size 8x16
    201201                RenderText at (0,-5) size 8x24
    202202                  text run at (0,-5) width 8: "\x{230A}"
    203           RenderMathMLOperator {mo} at (129,0) size 9x51
     203          RenderMathMLOperator {mo} at (129,15) size 9x62
    204204            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    205205              RenderBlock (anonymous) at (0,0) size 8x16
    206206                RenderText at (0,-5) size 8x24
    207207                  text run at (0,-5) width 8: "\x{230B}"
    208           RenderMathMLOperator {mo} at (143,0) size 12x51
     208          RenderMathMLOperator {mo} at (143,15) size 12x62
    209209            RenderMathMLBlock (flex) {mo} at (0,0) size 11x20
    210210              RenderBlock (anonymous) at (0,0) size 7x20
    211211                RenderText at (0,-3) size 7x24
    212212                  text run at (0,-3) width 7: "\x{222B}"
    213           RenderMathMLOperator {mo} at (161,0) size 4x51
     213          RenderMathMLOperator {mo} at (161,15) size 4x62
    214214            RenderMathMLBlock (flex) {mo} at (0,0) size 3x12
    215215              RenderBlock (anonymous) at (0,0) size 3x12
    216216                RenderText at (0,-6) size 3x24
    217217                  text run at (0,-6) width 3: "|"
    218           RenderMathMLOperator {mo} at (170,0) size 9x51
     218          RenderMathMLOperator {mo} at (170,15) size 9x62
    219219            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    220220              RenderBlock (anonymous) at (0,0) size 8x16
    221221                RenderText at (0,-5) size 8x24
    222222                  text run at (0,-5) width 8: "\x{2016}"
    223           RenderMathMLOperator {mo} at (184,0) size 9x51
     223          RenderMathMLOperator {mo} at (184,15) size 9x62
    224224            RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    225225              RenderBlock (anonymous) at (0,0) size 8x16
     
    229229      RenderText {#text} at (400,81) size 5x18
    230230        text run at (400,81) width 5: " "
    231       RenderMathMLMath {math} at (404,75) size 199x26 [padding: 0 1 0 1]
    232         RenderMathMLRow {mrow} at (1,0) size 197x26
     231      RenderMathMLMath {math} at (404,75) size 199x32 [padding: 0 1 0 1]
     232        RenderMathMLRow {mrow} at (1,0) size 197x32
    233233          RenderMathMLOperator {mo} at (1,9) size 8x14
    234234            RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
     
    286286                RenderText at (0,-3) size 7x24
    287287                  text run at (0,-3) width 7: "\x{222B}"
    288           RenderMathMLOperator {mo} at (161,9) size 4x12
     288          RenderMathMLOperator {mo} at (161,6) size 4x26
    289289            RenderMathMLBlock (flex) {mo} at (0,0) size 3x12
    290290              RenderBlock (anonymous) at (0,0) size 3x12
     
    305305        text run at (602,81) width 5: " "
    306306      RenderBR {BR} at (0,0) size 0x0
    307       RenderMathMLMath {math} at (0,101) size 211x49 [padding: 0 1 0 1]
    308         RenderMathMLSquareRoot {msqrt} at (1,0) size 209x49 [intrinsic padding: 3 0 3 12]
    309           RenderMathMLRow (anonymous) at (12,3) size 197x43
    310             RenderMathMLOperator {mo} at (1,0) size 8x41
     307      RenderMathMLMath {math} at (0,133) size 211x68 [padding: 0 1 0 1]
     308        RenderMathMLSquareRoot {msqrt} at (1,0) size 209x68 [intrinsic padding: 3 0 3 12]
     309          RenderMathMLRow (anonymous) at (12,3) size 197x62
     310            RenderMathMLOperator {mo} at (1,12) size 8x50
    311311              RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    312312                RenderBlock (anonymous) at (0,0) size 5x14
    313313                  RenderText at (0,-6) size 5x24
    314314                    text run at (0,-6) width 5: "("
    315             RenderMathMLOperator {mo} at (13,0) size 8x41
     315            RenderMathMLOperator {mo} at (13,12) size 8x50
    316316              RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    317317                RenderBlock (anonymous) at (0,0) size 5x14
    318318                  RenderText at (0,-6) size 5x24
    319319                    text run at (0,-6) width 5: ")"
    320             RenderMathMLOperator {mo} at (26,29) size 11x14
     320            RenderMathMLOperator {mo} at (26,12) size 11x50
    321321              RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
    322322                RenderBlock (anonymous) at (0,0) size 8x14
    323323                  RenderText at (0,-6) size 8x24
    324324                    text run at (0,-6) width 8: "{"
    325             RenderMathMLOperator {mo} at (43,29) size 11x14
     325            RenderMathMLOperator {mo} at (43,12) size 11x50
    326326              RenderMathMLBlock (flex) {mo} at (0,0) size 10x14
    327327                RenderBlock (anonymous) at (0,0) size 8x14
    328328                  RenderText at (0,-6) size 8x24
    329329                    text run at (0,-6) width 8: "}"
    330             RenderMathMLOperator {mo} at (59,0) size 8x41
     330            RenderMathMLOperator {mo} at (59,12) size 8x50
    331331              RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    332332                RenderBlock (anonymous) at (0,0) size 5x14
    333333                  RenderText at (0,-6) size 5x24
    334334                    text run at (0,-6) width 5: "["
    335             RenderMathMLOperator {mo} at (72,0) size 8x41
     335            RenderMathMLOperator {mo} at (72,12) size 8x50
    336336              RenderMathMLBlock (flex) {mo} at (0,0) size 7x14
    337337                RenderBlock (anonymous) at (0,0) size 5x14
    338338                  RenderText at (0,-6) size 5x24
    339339                    text run at (0,-6) width 5: "]"
    340             RenderMathMLOperator {mo} at (86,0) size 9x41
     340            RenderMathMLOperator {mo} at (86,12) size 9x50
    341341              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    342342                RenderBlock (anonymous) at (0,0) size 8x16
    343343                  RenderText at (0,-5) size 8x24
    344344                    text run at (0,-5) width 8: "\x{2308}"
    345             RenderMathMLOperator {mo} at (100,0) size 9x41
     345            RenderMathMLOperator {mo} at (100,12) size 9x50
    346346              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    347347                RenderBlock (anonymous) at (0,0) size 8x16
    348348                  RenderText at (0,-5) size 8x24
    349349                    text run at (0,-5) width 8: "\x{2309}"
    350             RenderMathMLOperator {mo} at (115,0) size 8x41
     350            RenderMathMLOperator {mo} at (115,12) size 8x50
    351351              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    352352                RenderBlock (anonymous) at (0,0) size 8x16
    353353                  RenderText at (0,-5) size 8x24
    354354                    text run at (0,-5) width 8: "\x{230A}"
    355             RenderMathMLOperator {mo} at (129,0) size 9x41
     355            RenderMathMLOperator {mo} at (129,12) size 9x50
    356356              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    357357                RenderBlock (anonymous) at (0,0) size 8x16
    358358                  RenderText at (0,-5) size 8x24
    359359                    text run at (0,-5) width 8: "\x{230B}"
    360             RenderMathMLOperator {mo} at (143,0) size 12x41
     360            RenderMathMLOperator {mo} at (143,12) size 12x50
    361361              RenderMathMLBlock (flex) {mo} at (0,0) size 11x20
    362362                RenderBlock (anonymous) at (0,0) size 7x20
    363363                  RenderText at (0,-3) size 7x24
    364364                    text run at (0,-3) width 7: "\x{222B}"
    365             RenderMathMLOperator {mo} at (161,0) size 4x41
     365            RenderMathMLOperator {mo} at (161,12) size 4x50
    366366              RenderMathMLBlock (flex) {mo} at (0,0) size 3x12
    367367                RenderBlock (anonymous) at (0,0) size 3x12
    368368                  RenderText at (0,-6) size 3x24
    369369                    text run at (0,-6) width 3: "|"
    370             RenderMathMLOperator {mo} at (170,0) size 9x41
     370            RenderMathMLOperator {mo} at (170,12) size 9x50
    371371              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    372372                RenderBlock (anonymous) at (0,0) size 8x16
    373373                  RenderText at (0,-5) size 8x24
    374374                    text run at (0,-5) width 8: "\x{2016}"
    375             RenderMathMLOperator {mo} at (184,0) size 9x41
     375            RenderMathMLOperator {mo} at (184,12) size 9x50
    376376              RenderMathMLBlock (flex) {mo} at (0,0) size 8x16
    377377                RenderBlock (anonymous) at (0,0) size 8x16
  • trunk/Source/WebCore/ChangeLog

    r164534 r164535  
     12014-02-22  Frédéric Wang  <fred.wang@free.fr>
     2
     3        Unreviewed, rolling out r164534.
     4        http://trac.webkit.org/changeset/164534
     5        https://bugs.webkit.org/show_bug.cgi?id=119043
     6
     7        missing tests
     8
     9        * rendering/RenderObject.h:
     10        * rendering/mathml/RenderMathMLBlock.h:
     11        * rendering/mathml/RenderMathMLOperator.cpp:
     12        (WebCore::RenderMathMLOperator::RenderMathMLOperator):
     13        (WebCore::RenderMathMLOperator::expandedStretchHeight):
     14        (WebCore::RenderMathMLOperator::stretchToHeight):
     15        (WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter):
     16        (WebCore::RenderMathMLOperator::updateStyle):
     17        (WebCore::RenderMathMLOperator::firstLineBaseline):
     18        (WebCore::RenderMathMLOperator::computeLogicalHeight):
     19        * rendering/mathml/RenderMathMLOperator.h:
     20        * rendering/mathml/RenderMathMLRow.cpp:
     21        (WebCore::RenderMathMLRow::layout):
     22
    1232014-02-22  Frédéric Wang  <fred.wang@free.fr>
    224
  • trunk/Source/WebCore/rendering/RenderObject.h

    r164534 r164535  
    404404#if ENABLE(MATHML)
    405405    virtual bool isRenderMathMLBlock() const { return false; }
    406     virtual bool isRenderMathMLTable() const { return false; }
    407406    virtual bool isRenderMathMLOperator() const { return false; }
    408407    virtual bool isRenderMathMLRow() const { return false; }
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h

    r164534 r164535  
    8787   
    8888private:
    89     virtual bool isRenderMathMLTable() const override final { return true; }
    9089    virtual const char* renderName() const override { return "RenderMathMLTable"; }
    9190};
    92 
    93 RENDER_OBJECT_TYPE_CASTS(RenderMathMLTable, isRenderMathMLTable())
    9491
    9592// Parsing functions for MathML Length values
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp

    r164534 r164535  
    11211121RenderMathMLOperator::RenderMathMLOperator(MathMLElement& element, PassRef<RenderStyle> style)
    11221122    : RenderMathMLBlock(element, std::move(style))
    1123     , m_stretchHeightAboveBaseline(0)
    1124     , m_stretchDepthBelowBaseline(0)
     1123    , m_stretchHeight(0)
    11251124    , m_operator(0)
    11261125    , m_stretchyCharacter(nullptr)
     
    11321131RenderMathMLOperator::RenderMathMLOperator(MathMLElement& element, PassRef<RenderStyle> style, UChar operatorChar, MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag)
    11331132    : RenderMathMLBlock(element, std::move(style))
    1134     , m_stretchHeightAboveBaseline(0)
    1135     , m_stretchDepthBelowBaseline(0)
     1133    , m_stretchHeight(0)
    11361134    , m_operator(operatorChar == hyphenMinus ? minusSign : operatorChar)
    11371135    , m_stretchyCharacter(nullptr)
     
    12531251}
    12541252
    1255 void RenderMathMLOperator::stretchTo(int heightAboveBaseline, int depthBelowBaseline)
    1256 {
    1257     if (heightAboveBaseline <= m_stretchHeightAboveBaseline && depthBelowBaseline <= m_stretchDepthBelowBaseline)
     1253static const float gOperatorExpansion = 1.2f;
     1254
     1255float RenderMathMLOperator::expandedStretchHeight() const
     1256{
     1257    return m_stretchHeight * gOperatorExpansion;
     1258}
     1259
     1260void RenderMathMLOperator::stretchToHeight(int height)
     1261{
     1262    if (m_stretchHeight == height)
    12581263        return;
    12591264
    1260     m_stretchHeightAboveBaseline = heightAboveBaseline;
    1261     m_stretchDepthBelowBaseline = depthBelowBaseline;
     1265    m_stretchHeight = height;
    12621266    updateStyle();
    12631267}
     
    13811385        height += glyphHeightForCharacter(stretchyCharacter->middleGlyph);
    13821386
    1383     if (height > stretchSize())
     1387    if (height > expandedStretchHeight())
    13841388        return 0;
    13851389
     
    13981402
    13991403    float stretchedCharacterHeight = style().fontMetrics().floatHeight();
    1400     m_isStretched = allowStretching && stretchSize() > stretchedCharacterHeight;
     1404    m_isStretched = allowStretching && expandedStretchHeight() > stretchedCharacterHeight;
    14011405
    14021406    // Sometimes we cannot stretch an operator properly, so in that case, we should just use the original size.
     
    14091413{
    14101414    if (m_isStretched)
    1411         return m_stretchHeightAboveBaseline;
     1415        return expandedStretchHeight() * 2 / 3 - (expandedStretchHeight() - m_stretchHeight) / 2;
    14121416    return RenderMathMLBlock::firstLineBaseline();
    14131417}
     
    14161420{
    14171421    if (m_isStretched)
    1418         logicalHeight = stretchSize();
     1422        logicalHeight = expandedStretchHeight();
    14191423    RenderBox::computeLogicalHeight(logicalHeight, logicalTop, computedValues);
    14201424}
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h

    r164534 r164535  
    6565    MathMLElement& element() { return toMathMLElement(nodeForNonAnonymous()); }
    6666
    67     void stretchTo(int heightAboveBaseline, int depthBelowBaseline);
    68     int stretchSize() const { return m_stretchHeightAboveBaseline + m_stretchDepthBelowBaseline; }
     67    void stretchToHeight(int pixelHeight);
     68    int stretchHeight() { return m_stretchHeight; }
     69    float expandedStretchHeight() const;
    6970   
    7071    bool hasOperatorFlag(MathMLOperatorDictionary::Flag flag) const { return m_operatorFlags & flag; }
     
    111112    void fillWithExtensionGlyph(PaintInfo&, const LayoutPoint& from, const LayoutPoint& to);
    112113
    113     int m_stretchHeightAboveBaseline;
    114     int m_stretchDepthBelowBaseline;
     114    int m_stretchHeight;
    115115    bool m_isStretched;
    116116
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp

    r164534 r164535  
    5858void RenderMathMLRow::layout()
    5959{
    60     int stretchHeightAboveBaseline = 0, stretchDepthBelowBaseline = 0;
     60    int stretchLogicalHeight = 0;
    6161    for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
    6262        if (child->needsLayout())
     
    6565        if (child->isRenderMathMLBlock() && toRenderMathMLBlock(child)->unembellishedOperator())
    6666            continue;
    67         int childHeightAboveBaseline = 0, childDepthBelowBaseline = 0;
    68         if (child->isRenderMathMLBlock()) {
    69             RenderMathMLBlock* mathmlChild = toRenderMathMLBlock(child);
    70             childHeightAboveBaseline = mathmlChild->firstLineBaseline();
    71             if (childHeightAboveBaseline == -1)
    72                 childHeightAboveBaseline = mathmlChild->logicalHeight();
    73             childDepthBelowBaseline = mathmlChild->logicalHeight() - childHeightAboveBaseline;
    74         } else if (child->isRenderMathMLTable()) {
    75             RenderMathMLTable* tableChild = toRenderMathMLTable(child);
    76             childHeightAboveBaseline = tableChild->firstLineBaseline();
    77             childDepthBelowBaseline = tableChild->logicalHeight() - childHeightAboveBaseline;
    78         } else if (child->isBox()) {
    79             childHeightAboveBaseline = toRenderBox(child)->logicalHeight();
    80             childDepthBelowBaseline = 0;
    81         }
    82         stretchHeightAboveBaseline = std::max<int>(stretchHeightAboveBaseline, roundToInt(childHeightAboveBaseline));
    83         stretchDepthBelowBaseline = std::max<int>(stretchDepthBelowBaseline, roundToInt(childDepthBelowBaseline));
     67        if (child->isBox())
     68            stretchLogicalHeight = std::max<int>(stretchLogicalHeight, roundToInt(toRenderBox(child)->logicalHeight()));
    8469    }
    85     if (stretchHeightAboveBaseline + stretchDepthBelowBaseline <= 0)
    86         stretchHeightAboveBaseline = style().fontSize();
     70    if (!stretchLogicalHeight)
     71        stretchLogicalHeight = style().fontSize();
    8772   
    8873    // Set the sizes of (possibly embellished) stretchy operator children.
    8974    for (auto& child : childrenOfType<RenderMathMLBlock>(*this)) {
    90         if (auto renderOperator = child.unembellishedOperator())
    91             renderOperator->stretchTo(stretchHeightAboveBaseline, stretchDepthBelowBaseline);
     75        if (auto renderMo = child.unembellishedOperator()) {
     76            if (renderMo->stretchHeight() != stretchLogicalHeight)
     77                renderMo->stretchToHeight(stretchLogicalHeight);
     78        }
    9279    }
    9380
Note: See TracChangeset for help on using the changeset viewer.