-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1908069 - Extend and tweak MathML padding/border/margin tests. r=…
…emilio This patch adds reftests to verify how padding/border/margin values on an msqrt, mroot and mfrac elements affect the offsets of their painted bars and radicals. In addition, it includes a couple of tweaks: * padding-border-margin-003.html: Wrap the stretchy op in an mrow to work around Firefox's bug 236963. * margin-003.html: Use backstick characters for template literals. * border-002, padding-002, margin-003.html: These tests rely on compareSpaceWithAndWithoutStyle. Use `<math display="block">` to work around Firefox's bug 1908913. To get more reliable sizes, force empty mrow and token elements to contain some text and use ahem fonts. Use mtext instead of mi so they are not transformed to unicode italic. Finally, relax a bit the error tolerance. Differential Revision: https://phabricator.services.mozilla.com/D216684
- Loading branch information
Showing
18 changed files
with
168 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...eta/mathml/relations/css-styling/padding-border-margin/padding-border-margin-005.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[padding-border-margin-005.html] | ||
expected: FAIL |
2 changes: 2 additions & 0 deletions
2
...eta/mathml/relations/css-styling/padding-border-margin/padding-border-margin-006.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[padding-border-margin-006.html] | ||
expected: FAIL |
2 changes: 2 additions & 0 deletions
2
...eta/mathml/relations/css-styling/padding-border-margin/padding-border-margin-007.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[padding-border-margin-007.html] | ||
expected: FAIL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...sts/mathml/relations/css-styling/padding-border-margin/padding-border-margin-005-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"/> | ||
<title>Padding/border/margin on msqrt (reference)</title> | ||
<style> | ||
@font-face { | ||
font-family: RadicalFont; | ||
src: url("/fonts/math/radical-kernafterdegreeminus5000-rulethickness1000.woff"); | ||
} | ||
msqrt { | ||
font-family: RadicalFont; | ||
} | ||
</style> | ||
<math> | ||
<mrow style="border: 30px solid blue; padding: 20px;"> | ||
<msqrt style="color: gray"> | ||
<mspace width="120px" height="60px" depth="60px"></mspace> | ||
</msqrt> | ||
</mrow> | ||
</math> |
21 changes: 21 additions & 0 deletions
21
...m/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-005.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"/> | ||
<title>Padding/border/margin on msqrt</title> | ||
<link rel="match" href="padding-border-margin-005-ref.html"/> | ||
<meta name="assert" content="Verify visual how padding/border/margin on an msqrt element affect the position of the painted radical symbol."> | ||
<style> | ||
@font-face { | ||
font-family: RadicalFont; | ||
src: url("/fonts/math/radical-kernafterdegreeminus5000-rulethickness1000.woff"); | ||
} | ||
msqrt { | ||
font-family: RadicalFont; | ||
} | ||
</style> | ||
<math> | ||
<mrow> | ||
<msqrt style="border: 30px solid blue; padding: 20px; color: gray"> | ||
<mspace width="100px" height="50px" depth="50px" style="margin: 10px"></mspace> | ||
</msqrt> | ||
</mrow> | ||
</math> |
20 changes: 20 additions & 0 deletions
20
...sts/mathml/relations/css-styling/padding-border-margin/padding-border-margin-006-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"/> | ||
<title>Padding/border/margin on mroot (reference)</title> | ||
<style> | ||
@font-face { | ||
font-family: RadicalFont; | ||
src: url("/fonts/math/radical-kernafterdegreeminus5000-rulethickness1000.woff"); | ||
} | ||
mroot { | ||
font-family: RadicalFont; | ||
} | ||
</style> | ||
<math> | ||
<mrow style="border: 30px solid blue; padding: 20px;"> | ||
<mroot style="color: gray"> | ||
<mspace width="120px" height="60px" depth="60px"></mspace> | ||
<mspace width="30px" height="15px" depth="15px"></mspace> | ||
</mroot> | ||
</mrow> | ||
</math> |
22 changes: 22 additions & 0 deletions
22
...m/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-006.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"/> | ||
<title>Padding/border/margin on mroot</title> | ||
<link rel="match" href="padding-border-margin-006-ref.html"/> | ||
<meta name="assert" content="Verify visual how padding/border/margin on an mroot element affect the position of the painted radical symbol."> | ||
<style> | ||
@font-face { | ||
font-family: RadicalFont; | ||
src: url("/fonts/math/radical-kernafterdegreeminus5000-rulethickness1000.woff"); | ||
} | ||
mroot { | ||
font-family: RadicalFont; | ||
} | ||
</style> | ||
<math> | ||
<mrow> | ||
<mroot style="border: 30px solid blue; padding: 20px; color: gray"> | ||
<mspace width="100px" height="50px" depth="50px" style="margin: 10px"></mspace> | ||
<mspace width="20px" height="10px" depth="10px" style="margin: 5px"></mspace> | ||
</mroot> | ||
</mrow> | ||
</math> |
20 changes: 20 additions & 0 deletions
20
...sts/mathml/relations/css-styling/padding-border-margin/padding-border-margin-007-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"/> | ||
<title>Padding/border/margin on mfrac (reference)</title> | ||
<style> | ||
@font-face { | ||
font-family: FractionFont; | ||
src: url("/fonts/math/fraction-rulethickness10000.woff"); | ||
} | ||
mfrac { | ||
font-family: FractionFont; | ||
} | ||
</style> | ||
<math> | ||
<mrow style="border: 30px solid blue; padding: 20px;"> | ||
<mfrac style="padding: 0; color: gray"> | ||
<mspace width="120px" height="60px" depth="60px"></mspace> | ||
<mspace width="120px" height="60px" depth="60px"></mspace> | ||
</mfrac> | ||
</mrow> | ||
</math> |
22 changes: 22 additions & 0 deletions
22
...m/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-007.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"/> | ||
<title>Padding/border/margin on mfrac</title> | ||
<link rel="match" href="padding-border-margin-007-ref.html"/> | ||
<meta name="assert" content="Verify visual how padding/border/margin on an mfrac element affect the position of the painted fraction bar."> | ||
<style> | ||
@font-face { | ||
font-family: FractionFont; | ||
src: url("/fonts/math/fraction-rulethickness10000.woff"); | ||
} | ||
mfrac { | ||
font-family: FractionFont; | ||
} | ||
</style> | ||
<math> | ||
<mrow> | ||
<mfrac style="border: 30px solid blue; padding: 20px; color: gray"> | ||
<mspace width="100px" height="50px" depth="50px" style="margin: 10px"></mspace> | ||
<mspace width="100px" height="50px" depth="50px" style="margin: 10px"></mspace> | ||
</mfrac> | ||
</mrow> | ||
</math> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters