Skip to content

Commit

Permalink
[mathml] Adjust padding for invalid fractions reftests
Browse files Browse the repository at this point in the history
The invalid fraction reftests compare an <mfrac> with an invalid number
of children against an <mrow> with the same children, in order to test
this statement from [1]:

"If the <mfrac> element has less or more than two in-flow children, its
layout algorithm is the same as the <mrow> element."

However, the same section indicates just above a default padding for
mfrac elements, so the reftests can't match. This CL fixes that by
making the reference set these padding values to 1px.

[1] https://w3c.github.io/mathml-core/#fractions-mfrac

Bug: 6606
Change-Id: I598e2cdd743c440774ac3b3ecb43cb8c84c59b3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3015322
Reviewed-by: Manuel Rego <[email protected]>
Commit-Queue: Frédéric Wang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#899960}
  • Loading branch information
fred-wang authored and chromium-wpt-export-bot committed Jul 9, 2021
1 parent 3895648 commit f6d8412
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<body>
<p>This test passes if you see a single rectangle.</p>
<math>
<mrow>
<mrow style="padding-inline-start: 1px; padding-inline-end: 1px;">
<mspace width="200px" height="200px" style="background: green"></mspace>
</mrow>
</math>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<body>
<p>This test passes if you see a single rectangle.</p>
<math>
<mrow>
<mrow style="padding-inline-start: 1px; padding-inline-end: 1px;">
<mspace width="50px" height="200px" style="background: green"></mspace>
<mspace width="50px" height="200px" style="background: green"></mspace>
<mspace width="100px" height="200px" style="background: green"></mspace>
Expand Down
2 changes: 1 addition & 1 deletion mathml/presentation-markup/fractions/frac-invalid-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<body>
<p>This test passes if mfrac renders nothing.</p>
<math>
<mrow>
<mrow style="padding-inline-start: 1px; padding-inline-end: 1px;">
</mrow>
</math>
</body>
Expand Down

0 comments on commit f6d8412

Please sign in to comment.