Changeset 247441 in webkit


Ignore:
Timestamp:
Jul 15, 2019 1:23:11 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

MathML WPT test for RadicalDegreeBottomRaisePercent fails
https://bugs.webkit.org/show_bug.cgi?id=183631

Patch by Rob Buis <rbuis@igalia.com> on 2019-07-15
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

Adjust test expectation.

  • web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1-expected.txt:

Source/WebCore:

When stretching the radical operator also take thickness
and radical gap into account:
https://mathml-refresh.github.io/mathml-core/#radicals-msqrt-mroot

Test: imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html

  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::layoutBlock):

LayoutTests:

Adjust test expectations.

  • platform/ios/mathml/presentation/roots-expected.txt:
  • platform/mac/mathml/presentation/roots-expected.txt:
  • platform/win/mathml/presentation/roots-expected.txt:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r247440 r247441  
     12019-07-15  Rob Buis  <rbuis@igalia.com>
     2
     3        MathML WPT test for RadicalDegreeBottomRaisePercent fails
     4        https://bugs.webkit.org/show_bug.cgi?id=183631
     5
     6        Reviewed by Frédéric Wang.
     7
     8        Adjust test expectations.
     9
     10        * platform/ios/mathml/presentation/roots-expected.txt:
     11        * platform/mac/mathml/presentation/roots-expected.txt:
     12        * platform/win/mathml/presentation/roots-expected.txt:
     13
    1142019-07-15  Yusuke Suzuki  <ysuzuki@apple.com>
    215
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r247440 r247441  
     12019-07-15  Rob Buis  <rbuis@igalia.com>
     2
     3        MathML WPT test for RadicalDegreeBottomRaisePercent fails
     4        https://bugs.webkit.org/show_bug.cgi?id=183631
     5
     6        Reviewed by Frédéric Wang.
     7
     8        Adjust test expectation.
     9
     10        * web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1-expected.txt:
     11
    1122019-07-15  Yusuke Suzuki  <ysuzuki@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1-expected.txt

    r242085 r247441  
    11
    2 FAIL RadicalDegreeBottomRaisePercent assert_approx_equals: mroot: vertical position of index expected 27.5 +/- 1 but got 25
     2PASS RadicalDegreeBottomRaisePercent
    33PASS RadicalDisplayStyleVerticalGap
    44PASS RadicalExtraAscender
  • trunk/LayoutTests/platform/ios/mathml/presentation/roots-expected.txt

    r222390 r247441  
    160160                    RenderText {#text} at (0,-6) size 8x25
    161161                      text run at (0,-6) width 8: "2"
    162             RenderMathMLRow {mrow} at (4,6) size 35x8
     162            RenderMathMLRow {mrow} at (4,5) size 35x8
    163163              RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
    164164                RenderBlock (anonymous) at (0,0) size 5x6
     
    380380                                              RenderText {#text} at (0,-5) size 4x15
    381381                                                text run at (0,-5) width 4: "z"
    382                                     RenderMathMLToken {mn} at (4,4) size 5x9
     382                                    RenderMathMLToken {mn} at (4,3) size 5x9
    383383                                      RenderBlock (anonymous) at (0,0) size 5x8
    384384                                        RenderText {#text} at (0,-3) size 5x15
    385385                                          text run at (0,-3) width 5: "9"
    386                                 RenderMathMLToken {mn} at (4,5) size 5x9
     386                                RenderMathMLToken {mn} at (4,4) size 5x9
    387387                                  RenderBlock (anonymous) at (0,0) size 5x8
    388388                                    RenderText {#text} at (0,-3) size 5x15
    389389                                      text run at (0,-3) width 5: "8"
    390                             RenderMathMLToken {mn} at (4,7) size 5x8
     390                            RenderMathMLToken {mn} at (4,6) size 5x8
    391391                              RenderBlock (anonymous) at (0,0) size 5x7
    392392                                RenderText {#text} at (0,-4) size 5x15
    393393                                  text run at (0,-4) width 5: "7"
    394                         RenderMathMLToken {mn} at (4,7) size 5x9
     394                        RenderMathMLToken {mn} at (4,6) size 5x9
    395395                          RenderBlock (anonymous) at (0,0) size 5x8
    396396                            RenderText {#text} at (0,-3) size 5x15
    397397                              text run at (0,-3) width 5: "6"
    398                     RenderMathMLToken {mn} at (4,8) size 5x9
     398                    RenderMathMLToken {mn} at (4,7) size 5x9
    399399                      RenderBlock (anonymous) at (0,0) size 5x8
    400400                        RenderText {#text} at (0,-3) size 5x15
    401401                          text run at (0,-3) width 5: "5"
    402                 RenderMathMLToken {mn} at (4,9) size 5x9
     402                RenderMathMLToken {mn} at (4,8) size 5x9
    403403                  RenderBlock (anonymous) at (0,0) size 5x8
    404404                    RenderText {#text} at (0,-3) size 5x15
    405405                      text run at (0,-3) width 5: "4"
    406             RenderMathMLToken {mn} at (4,10) size 5x9
     406            RenderMathMLToken {mn} at (4,9) size 5x9
    407407              RenderBlock (anonymous) at (0,0) size 5x8
    408408                RenderText {#text} at (0,-3) size 5x15
     
    506506                                              RenderText {#text} at (0,-5) size 4x15
    507507                                                text run at (0,-5) width 4: "z"
    508                                     RenderMathMLToken {mn} at (73,4) size 5x9
     508                                    RenderMathMLToken {mn} at (73,3) size 5x9
    509509                                      RenderBlock (anonymous) at (0,0) size 5x8
    510510                                        RenderText {#text} at (0,-3) size 5x15
    511511                                          text run at (0,-3) width 5: "9"
    512                                 RenderMathMLToken {mn} at (114,5) size 5x9
     512                                RenderMathMLToken {mn} at (114,4) size 5x9
    513513                                  RenderBlock (anonymous) at (0,0) size 5x8
    514514                                    RenderText {#text} at (0,-3) size 5x15
    515515                                      text run at (0,-3) width 5: "8"
    516                             RenderMathMLToken {mn} at (155,7) size 5x8
     516                            RenderMathMLToken {mn} at (155,6) size 5x8
    517517                              RenderBlock (anonymous) at (0,0) size 5x7
    518518                                RenderText {#text} at (0,-4) size 5x15
    519519                                  text run at (0,-4) width 5: "7"
    520                         RenderMathMLToken {mn} at (196,7) size 5x9
     520                        RenderMathMLToken {mn} at (196,6) size 5x9
    521521                          RenderBlock (anonymous) at (0,0) size 5x8
    522522                            RenderText {#text} at (0,-3) size 5x15
    523523                              text run at (0,-3) width 5: "6"
    524                     RenderMathMLToken {mn} at (237,8) size 5x9
     524                    RenderMathMLToken {mn} at (237,7) size 5x9
    525525                      RenderBlock (anonymous) at (0,0) size 5x8
    526526                        RenderText {#text} at (0,-3) size 5x15
    527527                          text run at (0,-3) width 5: "5"
    528                 RenderMathMLToken {mn} at (278,9) size 5x9
     528                RenderMathMLToken {mn} at (278,8) size 5x9
    529529                  RenderBlock (anonymous) at (0,0) size 5x8
    530530                    RenderText {#text} at (0,-3) size 5x15
    531531                      text run at (0,-3) width 5: "4"
    532             RenderMathMLToken {mn} at (319,10) size 5x9
     532            RenderMathMLToken {mn} at (319,9) size 5x9
    533533              RenderBlock (anonymous) at (0,0) size 5x8
    534534                RenderText {#text} at (0,-3) size 5x15
  • trunk/LayoutTests/platform/mac/mathml/presentation/roots-expected.txt

    r203171 r247441  
    160160                    RenderText {#text} at (0,-6) size 8x24
    161161                      text run at (0,-6) width 8: "2"
    162             RenderMathMLRow {mrow} at (4,6) size 35x8
     162            RenderMathMLRow {mrow} at (4,5) size 35x8
    163163              RenderMathMLToken {mi} at (0,1) size 5x5 [padding: 0 1 0 0]
    164164                RenderBlock (anonymous) at (0,0) size 5x6
     
    380380                                              RenderText {#text} at (0,-4) size 4x13
    381381                                                text run at (0,-4) width 4: "z"
    382                                     RenderMathMLToken {mn} at (4,4) size 5x9
     382                                    RenderMathMLToken {mn} at (4,3) size 5x9
    383383                                      RenderBlock (anonymous) at (0,0) size 5x8
    384384                                        RenderText {#text} at (0,-2) size 5x13
    385385                                          text run at (0,-2) width 5: "9"
    386                                 RenderMathMLToken {mn} at (4,5) size 5x9
     386                                RenderMathMLToken {mn} at (4,4) size 5x9
    387387                                  RenderBlock (anonymous) at (0,0) size 5x8
    388388                                    RenderText {#text} at (0,-2) size 5x13
    389389                                      text run at (0,-2) width 5: "8"
    390                             RenderMathMLToken {mn} at (4,7) size 5x8
     390                            RenderMathMLToken {mn} at (4,6) size 5x8
    391391                              RenderBlock (anonymous) at (0,0) size 5x7
    392392                                RenderText {#text} at (0,-3) size 5x13
    393393                                  text run at (0,-3) width 5: "7"
    394                         RenderMathMLToken {mn} at (4,7) size 5x9
     394                        RenderMathMLToken {mn} at (4,6) size 5x9
    395395                          RenderBlock (anonymous) at (0,0) size 5x8
    396396                            RenderText {#text} at (0,-2) size 5x13
    397397                              text run at (0,-2) width 5: "6"
    398                     RenderMathMLToken {mn} at (4,8) size 5x9
     398                    RenderMathMLToken {mn} at (4,7) size 5x9
    399399                      RenderBlock (anonymous) at (0,0) size 5x8
    400400                        RenderText {#text} at (0,-2) size 5x13
    401401                          text run at (0,-2) width 5: "5"
    402                 RenderMathMLToken {mn} at (4,9) size 5x9
     402                RenderMathMLToken {mn} at (4,8) size 5x9
    403403                  RenderBlock (anonymous) at (0,0) size 5x8
    404404                    RenderText {#text} at (0,-2) size 5x13
    405405                      text run at (0,-2) width 5: "4"
    406             RenderMathMLToken {mn} at (4,10) size 5x9
     406            RenderMathMLToken {mn} at (4,9) size 5x9
    407407              RenderBlock (anonymous) at (0,0) size 5x8
    408408                RenderText {#text} at (0,-2) size 5x13
     
    506506                                              RenderText {#text} at (0,-4) size 4x13
    507507                                                text run at (0,-4) width 4: "z"
    508                                     RenderMathMLToken {mn} at (73,4) size 5x9
     508                                    RenderMathMLToken {mn} at (73,3) size 5x9
    509509                                      RenderBlock (anonymous) at (0,0) size 5x8
    510510                                        RenderText {#text} at (0,-2) size 5x13
    511511                                          text run at (0,-2) width 5: "9"
    512                                 RenderMathMLToken {mn} at (114,5) size 5x9
     512                                RenderMathMLToken {mn} at (114,4) size 5x9
    513513                                  RenderBlock (anonymous) at (0,0) size 5x8
    514514                                    RenderText {#text} at (0,-2) size 5x13
    515515                                      text run at (0,-2) width 5: "8"
    516                             RenderMathMLToken {mn} at (155,7) size 5x8
     516                            RenderMathMLToken {mn} at (155,6) size 5x8
    517517                              RenderBlock (anonymous) at (0,0) size 5x7
    518518                                RenderText {#text} at (0,-3) size 5x13
    519519                                  text run at (0,-3) width 5: "7"
    520                         RenderMathMLToken {mn} at (196,7) size 5x9
     520                        RenderMathMLToken {mn} at (196,6) size 5x9
    521521                          RenderBlock (anonymous) at (0,0) size 5x8
    522522                            RenderText {#text} at (0,-2) size 5x13
    523523                              text run at (0,-2) width 5: "6"
    524                     RenderMathMLToken {mn} at (237,8) size 5x9
     524                    RenderMathMLToken {mn} at (237,7) size 5x9
    525525                      RenderBlock (anonymous) at (0,0) size 5x8
    526526                        RenderText {#text} at (0,-2) size 5x13
    527527                          text run at (0,-2) width 5: "5"
    528                 RenderMathMLToken {mn} at (278,9) size 5x9
     528                RenderMathMLToken {mn} at (278,8) size 5x9
    529529                  RenderBlock (anonymous) at (0,0) size 5x8
    530530                    RenderText {#text} at (0,-2) size 5x13
    531531                      text run at (0,-2) width 5: "4"
    532             RenderMathMLToken {mn} at (319,10) size 5x9
     532            RenderMathMLToken {mn} at (319,9) size 5x9
    533533              RenderBlock (anonymous) at (0,0) size 5x8
    534534                RenderText {#text} at (0,-2) size 5x13
  • trunk/LayoutTests/platform/win/mathml/presentation/roots-expected.txt

    r203212 r247441  
    1 layer at (0,0) size 800x699
     1layer at (0,0) size 800x733
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x699
    4   RenderBlock {html} at (0,0) size 800x699
    5     RenderBody {body} at (8,16) size 784x667
     3layer at (0,0) size 800x733
     4  RenderBlock {html} at (0,0) size 800x733
     5    RenderBody {body} at (8,16) size 784x701
    66      RenderBlock {p} at (0,0) size 784x18
    77        RenderText {#text} at (0,0) size 177x18
     
    5353                RenderText {#text} at (0,-1) size 9x16
    5454                  text run at (0,-1) width 9: "1"
    55       RenderBlock {p} at (0,106) size 784x37
     55      RenderBlock {p} at (0,106) size 784x54
    5656        RenderText {#text} at (0,14) size 113x18
    5757          text run at (0,14) width 113: "root of a fraction: "
    58         RenderMathMLMath {math} at (113,0) size 50x38
    59           RenderMathMLRoot {msqrt} at (0,0) size 50x38
     58        RenderMathMLMath {math} at (113,0) size 50x55
     59          RenderMathMLRoot {msqrt} at (0,0) size 50x55
    6060            RenderMathMLFraction {mfrac} at (12,3) size 38x35
    6161              RenderMathMLRow {mrow} at (0,0) size 38x12
     
    8585                    RenderText {#text} at (0,-1) size 9x16
    8686                      text run at (0,-1) width 9: "2"
    87       RenderBlock {p} at (0,159) size 784x20
     87      RenderBlock {p} at (0,176) size 784x20
    8888        RenderText {#text} at (0,2) size 173x18
    8989          text run at (0,2) width 173: "cube root (should be blue): "
     
    9898                RenderText {#text} at (0,0) size 5x9
    9999                  text run at (0,0) width 5: "3"
    100       RenderBlock {p} at (0,195) size 784x20
     100      RenderBlock {p} at (0,212) size 784x20
    101101        RenderText {#text} at (0,2) size 75x18
    102102          text run at (0,2) width 75: "long index: "
     
    128128                  RenderText {#text} at (0,-2) size 4x9
    129129                    text run at (0,-2) width 4: "z"
    130       RenderBlock {p} at (0,231) size 784x37
     130      RenderBlock {p} at (0,248) size 784x54
    131131        RenderText {#text} at (0,14) size 185x18
    132132          text run at (0,14) width 185: "long index w/ complex base: "
    133         RenderMathMLMath {math} at (185,0) size 84x38
    134           RenderMathMLRoot {mroot} at (0,0) size 84x38
     133        RenderMathMLMath {math} at (185,0) size 84x55
     134          RenderMathMLRoot {mroot} at (0,0) size 84x55
    135135            RenderMathMLFraction {mfrac} at (45,3) size 39x35
    136136              RenderMathMLRow {mrow} at (0,0) size 38x12
     
    160160                    RenderText {#text} at (0,-1) size 9x16
    161161                      text run at (0,-1) width 9: "2"
    162             RenderMathMLRow {mrow} at (1,6) size 38x9
     162            RenderMathMLRow {mrow} at (1,11) size 38x9
    163163              RenderMathMLToken {mi} at (0,1) size 5x6 [padding: 0 1 0 0]
    164164                RenderBlock (anonymous) at (0,0) size 4x6
     
    181181                  RenderText {#text} at (0,-2) size 4x9
    182182                    text run at (0,-2) width 4: "z"
    183       RenderBlock {p} at (0,284) size 784x38
     183      RenderBlock {p} at (0,318) size 784x38
    184184        RenderText {#text} at (0,20) size 75x18
    185185          text run at (0,20) width 75: "high index: "
     
    204204                  RenderText {#text} at (0,-2) size 4x9
    205205                    text run at (0,-2) width 4: "z"
    206       RenderBlock {p} at (0,338) size 784x97
     206      RenderBlock {p} at (0,372) size 784x97
    207207        RenderText {#text} at (0,21) size 155x18
    208208          text run at (0,21) width 155: "Imbricated square roots: "
     
    283283                                            text run at (0,-1) width 10: "A"
    284284        RenderText {#text} at (0,0) size 0x0
    285       RenderBlock {p} at (0,451) size 784x100
     285      RenderBlock {p} at (0,485) size 784x100
    286286        RenderText {#text} at (0,33) size 110x18
    287287          text run at (0,33) width 110: "Imbricated roots: "
     
    396396                            RenderText {#text} at (0,0) size 5x9
    397397                              text run at (0,0) width 5: "6"
    398                     RenderMathMLToken {mn} at (1,26) size 6x9
     398                    RenderMathMLToken {mn} at (1,25) size 6x9
    399399                      RenderBlock (anonymous) at (0,0) size 5x8
    400400                        RenderText {#text} at (0,0) size 5x9
    401401                          text run at (0,0) width 5: "5"
    402                 RenderMathMLToken {mn} at (1,28) size 6x9
     402                RenderMathMLToken {mn} at (1,26) size 6x9
    403403                  RenderBlock (anonymous) at (0,0) size 5x8
    404404                    RenderText {#text} at (0,0) size 5x9
    405405                      text run at (0,0) width 5: "4"
    406             RenderMathMLToken {mn} at (1,29) size 6x9
     406            RenderMathMLToken {mn} at (1,27) size 6x9
    407407              RenderBlock (anonymous) at (0,0) size 5x8
    408408                RenderText {#text} at (0,0) size 5x9
    409409                  text run at (0,0) width 5: "3"
    410410        RenderText {#text} at (0,0) size 0x0
    411       RenderBlock {p} at (0,567) size 784x100
     411      RenderBlock {p} at (0,601) size 784x100
    412412        RenderText {#text} at (0,33) size 74x18
    413413          text run at (0,33) width 74: "RTL roots: "
     
    522522                            RenderText {#text} at (0,0) size 5x9
    523523                              text run at (0,0) width 5: "6"
    524                     RenderMathMLToken {mn} at (238,26) size 5x9
     524                    RenderMathMLToken {mn} at (238,25) size 5x9
    525525                      RenderBlock (anonymous) at (0,0) size 5x8
    526526                        RenderText {#text} at (0,0) size 5x9
    527527                          text run at (0,0) width 5: "5"
    528                 RenderMathMLToken {mn} at (277,28) size 6x9
     528                RenderMathMLToken {mn} at (277,26) size 6x9
    529529                  RenderBlock (anonymous) at (0,0) size 5x8
    530530                    RenderText {#text} at (0,0) size 5x9
    531531                      text run at (0,0) width 5: "4"
    532             RenderMathMLToken {mn} at (316,29) size 6x9
     532            RenderMathMLToken {mn} at (316,27) size 6x9
    533533              RenderBlock (anonymous) at (0,0) size 5x8
    534534                RenderText {#text} at (0,0) size 5x9
  • trunk/Source/WebCore/ChangeLog

    r247440 r247441  
     12019-07-15  Rob Buis  <rbuis@igalia.com>
     2
     3        MathML WPT test for RadicalDegreeBottomRaisePercent fails
     4        https://bugs.webkit.org/show_bug.cgi?id=183631
     5
     6        Reviewed by Frédéric Wang.
     7
     8        When stretching the radical operator also take thickness
     9        and radical gap into account:
     10        https://mathml-refresh.github.io/mathml-core/#radicals-msqrt-mroot
     11
     12        Test: imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html
     13
     14        * rendering/mathml/RenderMathMLRoot.cpp:
     15        (WebCore::RenderMathMLRoot::layoutBlock):
     16
    1172019-07-15  Yusuke Suzuki  <ysuzuki@apple.com>
    218
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

    r245543 r247441  
    218218    // Stretch the radical operator to cover the base height.
    219219    // We can then determine the metrics of the radical operator + the base.
    220     m_radicalOperator.stretchTo(style(), baseAscent + baseDescent);
     220    m_radicalOperator.stretchTo(style(), baseAscent + baseDescent + vertical.verticalGap + vertical.ruleThickness);
    221221    LayoutUnit radicalOperatorHeight = m_radicalOperator.ascent() + m_radicalOperator.descent();
    222222    LayoutUnit indexBottomRaise { vertical.degreeBottomRaisePercent * radicalOperatorHeight };
Note: See TracChangeset for help on using the changeset viewer.