-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support padding/border/margin on RenderMathMLToken
https://bugs.webkit.org/show_bug.cgi?id=276317 Reviewed by Rob Buis. This patch imports the WPT reftest from [1] and implements padding/border/margin for RenderMathMLToken when a mathVariantGlyph is used. That improves the rendering of the test but is not enough to make it pass [2]. [1] web-platform-tests/wpt@8d6df04 [2] https://bugs.webkit.org/show_bug.cgi?id=276413 Canonical link: https://commits.webkit.org/280851@main
- Loading branch information
Showing
7 changed files
with
96 additions
and
6 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
26 changes: 26 additions & 0 deletions
26
...athml/relations/css-styling/padding-border-margin/padding-border-margin-004-expected.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,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Padding/border/margin on an mi with italic mathvariant (reference)</title> | ||
<style> | ||
@font-face { | ||
font-family: TestFont; | ||
src: url("/fonts/math/mathvariant-italic.woff"); | ||
} | ||
math { | ||
font-family: TestFont; | ||
font-size: 300px; | ||
} | ||
</style> | ||
<body> | ||
<p>This test passes if you see the text <code>1d434</code> in cyan on a blue | ||
background, surrounded by a 10px padding, surrounded by a 10px | ||
yellow dashed border, itself surrounded by a 10px pink margin.</p> | ||
<div style="background: pink; position: absolute; left: 10px; top: 4em;"> | ||
<math> | ||
<mtext style="background: blue; border: 10px dashed yellow; padding: 10px; margin: 10px; color: cyan;">𝐴</mtext> | ||
</math> | ||
</div> | ||
</body> | ||
</html> |
26 changes: 26 additions & 0 deletions
26
...sts/mathml/relations/css-styling/padding-border-margin/padding-border-margin-004-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,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Padding/border/margin on an mi with italic mathvariant (reference)</title> | ||
<style> | ||
@font-face { | ||
font-family: TestFont; | ||
src: url("/fonts/math/mathvariant-italic.woff"); | ||
} | ||
math { | ||
font-family: TestFont; | ||
font-size: 300px; | ||
} | ||
</style> | ||
<body> | ||
<p>This test passes if you see the text <code>1d434</code> in cyan on a blue | ||
background, surrounded by a 10px padding, surrounded by a 10px | ||
yellow dashed border, itself surrounded by a 10px pink margin.</p> | ||
<div style="background: pink; position: absolute; left: 10px; top: 4em;"> | ||
<math> | ||
<mtext style="background: blue; border: 10px dashed yellow; padding: 10px; margin: 10px; color: cyan;">𝐴</mtext> | ||
</math> | ||
</div> | ||
</body> | ||
</html> |
33 changes: 33 additions & 0 deletions
33
...m-tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-004.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,33 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Padding/border/margin on an mi with italic mathvariant</title> | ||
<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> | ||
<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> | ||
<link rel="help" href="https://w3c.github.io/mathml-core/#the-mathvariant-attribute"> | ||
<link rel="help" href="https://w3c.github.io/mathml-core/#new-text-transform-values"> | ||
<link rel="help" href="https://w3c.github.io/mathml-core/#italic-mappings"> | ||
<link rel="match" href="padding-border-margin-004-ref.html"/> | ||
<meta name="assert" content="Verify visual rendering of padding/border/margin on an mi with italic mathvariant."> | ||
<style> | ||
@font-face { | ||
font-family: TestFont; | ||
src: url("/fonts/math/mathvariant-italic.woff"); | ||
} | ||
math { | ||
font-family: TestFont; | ||
font-size: 300px; | ||
} | ||
</style> | ||
<body> | ||
<p>This test passes if you see the text <code>1d434</code> in cyan on a blue | ||
background, surrounded by a 10px padding, surrounded by a 10px | ||
yellow dashed border, itself surrounded by a 10px pink margin.</p> | ||
<div style="background: pink; position: absolute; left: 10px; top: 4em;"> | ||
<math> | ||
<mi style="background: blue; border: 10px dashed yellow; padding: 10px; margin: 10px; color: cyan;">A</mi> | ||
</math> | ||
</div> | ||
</body> | ||
</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
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