-
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 1876684 - Export MathML dir-* tests to WPT. r=emilio
- dir-3.html/dir-5.html: These are approximative verifications of overall RTL directionality using "covering rectangles". Export them with a a specific font in order to make them a bit more robust. For dir-5.html we use scripts-spaceafterscript3000.woff and adjust the rects accordingly but the test might change later depending on the outcome of w3c/mathml-core#217. - dir-4-ref.html: Removed (the test was removed in bug 1783995). Differential Revision: https://phabricator.services.mozilla.com/D199702 UltraBlame original commit: eb00222e557742d5a6c66534f38345ddf71deaa5
- Loading branch information
Showing
8 changed files
with
152 additions
and
138 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
38 changes: 38 additions & 0 deletions
38
...ng/web-platform/tests/mathml/presentation-markup/direction/direction-overall-003-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,38 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head><title>Test dir=rtl</title></head> | ||
<body> | ||
|
||
<div style="position: absolute; | ||
top: 5px; left: 5px; width: 200px; height: 200px;"> | ||
<div style="position: absolute; width: 70px; height: 200px; | ||
left: 0px; background: red;"></div> | ||
<div style="position: absolute; width: 70px; height: 200px; | ||
left: 70px; background: green;"></div> | ||
<div style="position: absolute; width: 70px; height: 200px; | ||
left: 140px; background: magenta;"></div> | ||
<div style="position: absolute; width: 70px; height: 200px; | ||
left: 210px; background: blue;"></div> | ||
<div style="position: absolute; width: 70px; height: 200px; | ||
left: 280px; background: yellow;"></div>--> | ||
</div> | ||
|
||
|
||
<div style="position: absolute; | ||
top: 5px; left: 5px; width: 200px; height: 200px;"> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: -5px; background: black;"></div> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: 65px; background: black;"></div> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: 135px; background: black;"></div> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: 205px; background: black;"></div> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: 275px; background: black;"></div> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: 345px; background: black;"></div> | ||
</div> | ||
|
||
</body> | ||
</html> |
94 changes: 94 additions & 0 deletions
94
testing/web-platform/tests/mathml/presentation-markup/direction/direction-overall-003.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,94 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Verify dir attribute on various containers</title> | ||
<link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements"> | ||
<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> | ||
<meta name="assert" content="Verify dir attribute on various mmultiscripts."> | ||
<link rel="match" href="direction-overall-003-ref.html"> | ||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> | ||
<style> | ||
math { | ||
/* Ensure the space after script is 30px */ | ||
font: 10px spaceafterscript3000; | ||
} | ||
@font-face { | ||
font-family: spaceafterscript3000; | ||
src: url("/fonts/math/scripts-spaceafterscript3000.woff"); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<!-- mmultiscripts. The formulas | ||
1 3 3 1 | ||
X in dir=ltr and X in dir=rtl | ||
2 4 4 2 | ||
do not match perfectly, so we use an alternative == reftest here | ||
which is less strict. --> | ||
|
||
<!-- five vertical bands: red, green, magenta, blue and yellow --> | ||
<div style="position: absolute; | ||
top: 5px; left: 5px; width: 200px; height: 200px;"> | ||
<div style="position: absolute; width: 70px; height: 200px; | ||
left: 0px; background: red;"></div> | ||
<div style="position: absolute; width: 70px; height: 200px; | ||
left: 70px; background: green;"></div> | ||
<div style="position: absolute; width: 70px; height: 200px; | ||
left: 140px; background: magenta;"></div> | ||
<div style="position: absolute; width: 70px; height: 200px; | ||
left: 210px; background: blue;"></div> | ||
<div style="position: absolute; width: 70px; height: 200px; | ||
left: 280px; background: yellow;"></div>--> | ||
</div> | ||
|
||
<!-- a mmultiscripts element whose children are squares of different | ||
colors. In dir=rtl, the color of each square should match the one of | ||
the band over which the square is positioned. Hence, this | ||
mmultiscripts should not be visible. --> | ||
<div style="position: absolute; | ||
top: 5px; left: 5px; width: 200px; height: 200px;"> | ||
<math dir="rtl"> | ||
<mmultiscripts> | ||
<mspace width="40px" height="40px" mathbackground="magenta"/> | ||
|
||
<mspace width="40px" height="40px" mathbackground="green"/> | ||
<mspace width="40px" height="40px" mathbackground="green"/> | ||
|
||
<mspace width="40px" height="40px" mathbackground="red"/> | ||
<mspace width="40px" height="40px" mathbackground="red"/> | ||
|
||
<mprescripts/> | ||
|
||
<mspace width="40px" height="40px" mathbackground="yellow"/> | ||
<mspace width="40px" height="40px" mathbackground="yellow"/> | ||
|
||
<mspace width="40px" height="40px" mathbackground="blue"/> | ||
<mspace width="40px" height="40px" mathbackground="blue"/> | ||
</mmultiscripts> | ||
</math> | ||
</div> | ||
|
||
<!-- We add black vertical bands to cover spaces between the children of | ||
mmultiscripts. --> | ||
<div style="position: absolute; | ||
top: 5px; left: 5px; width: 200px; height: 200px;"> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: -5px; background: black;"></div> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: 65px; background: black;"></div> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: 135px; background: black;"></div> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: 205px; background: black;"></div> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: 275px; background: black;"></div> | ||
<div style="position: absolute; width: 10px; height: 200px; | ||
left: 345px; background: black;"></div> | ||
</div> | ||
|
||
</body> | ||
</html> |