mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Update web-platform-tests to revision bc60e6f82132cfc9a5b688c566c7772024b3c15c
This commit is contained in:
parent
449881f566
commit
29156ca9e2
223 changed files with 7517 additions and 2093 deletions
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>color</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
|
||||
<link rel="match" href="color-001-ref.html"/>
|
||||
<meta name="assert" content="Verify that the color is used for the text of token elements.">
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; color: red; width: 200px; height: 200px; padding: 1px;">
|
||||
<math><mi style="color: green">1</mi></math>
|
||||
<math><mn style="color: green">2</mn></math>
|
||||
<math><mo style="color: green">3</mo></math>
|
||||
<math><mtext style="color: green">4</mtext></math>
|
||||
<math><ms style="color: green">5</ms></math>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>color (reference)</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; width: 200px; height: 200px; padding: 1px;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>color</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fraction-with-nonzero-line-thickness">
|
||||
<link rel="match" href="color-002-ref.html"/>
|
||||
<meta name="assert" content="Verify that the color is used for text and fraction bar of the mfrac element.">
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; color: red; width: 200px; height: 200px; padding: 1px;">
|
||||
<math><mfrac style="color: green"><mn>1</mn><mn>2</mn></mfrac></math>
|
||||
</div>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_mfrac");</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>color (reference)</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; width: 200px; height: 200px; padding: 1px;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>color</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#radical-symbol">
|
||||
<link rel="match" href="color-003-ref.html"/>
|
||||
<meta name="assert" content="Verify that the color is used for text and radical symbol of the msqrt and mroot elements.">
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; color: red; width: 200px; height: 200px; padding: 1px;">
|
||||
<math><msqrt style="color: green"><mn>1</mn></msqrt></math>
|
||||
<math><mroot style="color: green"><mn>2</mn><mn>2</mn></mroot></math>
|
||||
</div>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_msqrt");</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>color (reference)</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; width: 200px; height: 200px; padding: 1px;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>color</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enclose-expression-inside-notation-menclose">
|
||||
<link rel="match" href="color-004-ref.html"/>
|
||||
<meta name="assert" content="Verify that the color is used for text and graphical elements of the menclose element.">
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; color: red; width: 200px; height: 200px; padding: 1px;">
|
||||
<math><menclose notation="left" style="color: green"><mn>1</mn></menclose></math>
|
||||
<math><menclose notation="right" style="color: green"><mn>2</mn></menclose></math>
|
||||
<math><menclose notation="top" style="color: green"><mn>3</mn></menclose></math>
|
||||
<math><menclose notation="bottom" style="color: green"><mn>4</mn></menclose></math>
|
||||
<math><menclose notation="box" style="color: green"><mn>5</mn></menclose></math>
|
||||
<math><menclose notation="roundedbox" style="color: green"><mn>6</mn></menclose></math>
|
||||
<math><menclose notation="actuarial" style="color: green"><mn>7</mn></menclose></math>
|
||||
<math><menclose notation="madruwb" style="color: green"><mn>8</mn></menclose></math>
|
||||
<math><menclose notation="horizontalstrike" style="color: green"><mn>9</mn></menclose></math>
|
||||
<math><menclose notation="verticalstrike" style="color: green"><mn>10</mn></menclose></math>
|
||||
<math><menclose notation="updiagonalstrike" style="color: green"><mn>11</mn></menclose></math>
|
||||
<math><menclose notation="downdiagonalstrike" style="color: green"><mn>12</mn></menclose></math>
|
||||
<math><menclose notation="longdiv" style="color: green"><mn>13</mn></menclose></math>
|
||||
<math><menclose notation="circle" style="color: green"><mn>14</mn></menclose></math>
|
||||
</div>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_menclose");</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,41 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>color</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fraction-with-nonzero-line-thickness">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#radical-symbol">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enclose-expression-inside-notation-menclose">
|
||||
<link rel="match" href="color-1-ref.html"/>
|
||||
<meta name="assert" content="Verify that the color is used for text and graphical elements.">
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; color: red; width: 200px; height: 200px; padding: 1px;">
|
||||
<math><mfrac style="color: green"><mn>1</mn><mn>2</mn></mfrac></math>
|
||||
<math><msqrt style="color: green"><mn>3</mn></msqrt></math>
|
||||
<math><mroot style="color: green"><mn>4</mn><mn>5</mn></mroot></math>
|
||||
<math><menclose notation="left" style="color: green"><mn>6</mn></menclose></math>
|
||||
<math><menclose notation="right" style="color: green"><mn>7</mn></menclose></math>
|
||||
<math><menclose notation="top" style="color: green"><mn>8</mn></menclose></math>
|
||||
<math><menclose notation="bottom" style="color: green"><mn>9</mn></menclose></math>
|
||||
<math><menclose notation="box" style="color: green"><mn>10</mn></menclose></math>
|
||||
<math><menclose notation="roundedbox" style="color: green"><mn>11</mn></menclose></math>
|
||||
<math><menclose notation="actuarial" style="color: green"><mn>12</mn></menclose></math>
|
||||
<math><menclose notation="madruwb" style="color: green"><mn>13</mn></menclose></math>
|
||||
<math><menclose notation="horizontalstrike" style="color: green"><mn>14</mn></menclose></math>
|
||||
<math><menclose notation="verticalstrike" style="color: green"><mn>15</mn></menclose></math>
|
||||
<math><menclose notation="updiagonalstrike" style="color: green"><mn>16</mn></menclose></math>
|
||||
<math><menclose notation="downdiagonalstrike" style="color: green"><mn>17</mn></menclose></math>
|
||||
<math><menclose notation="longdiv" style="color: green"><mn>18</mn></menclose></math>
|
||||
<math><menclose notation="circle" style="color: green"><mn>19</mn></menclose></math>
|
||||
<math><mi style="color: green">20</mi></math>
|
||||
<math><mn style="color: green">21</mn></math>
|
||||
<math><mo style="color: green">22</mo></math>
|
||||
<math><mtext style="color: green">23</mtext></math>
|
||||
<math><ms style="color: green">24</ms></math>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -12,5 +12,7 @@
|
|||
<div style="background: green; color: red; width: 200px; height: 200px;">
|
||||
<math style="display: none;"><mspace width="200px" height="200px" style="background: red"/></math>
|
||||
</div>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
verify_displaystyle("mtable_true", true, "explicit displaystyle true");
|
||||
}, "mtable element");
|
||||
test(function() {
|
||||
verify_displaystyle("mfrac_sibling", true, "sibling");
|
||||
verify_displaystyle("mfrac_numerator", false, "numerator");
|
||||
verify_displaystyle("mfrac_denominator", false, "denominator");
|
||||
}, "mfrac element");
|
||||
|
@ -105,7 +106,7 @@
|
|||
<math displaystyle="true"><mtable><mtr><mtd><mo id="mtable_default">⫿</mo></mtd></mtr></mtable></math>
|
||||
<math><mtable displaystyle="true"><mtr><mtd><mo id="mtable_true">⫿</mo></mtd></mtr></mtable></math>
|
||||
<math displaystyle="true"><mtable displaystyle="false"><mtr><mtd><mo id="mtable_false">⫿</mo></mtd></mtr></mtable></math>
|
||||
<math displaystyle="true"><mfrac><mo id="mfrac_numerator">⫿</mo><mo id="mfrac_denominator">⫿</mo></mfrac></math>
|
||||
<math displaystyle="true"><mo id="mfrac_sibling">⫿</mo><mfrac><mo id="mfrac_numerator">⫿</mo><mo id="mfrac_denominator">⫿</mo></mfrac></math>
|
||||
<math displaystyle="true"><mroot><mo id="mroot_base">⫿</mo><mo id="mroot_index">⫿</mo></mroot></math>
|
||||
<math displaystyle="true"><msub><mo id="msub_base">⫿</mo><mo id="msub_subscript">⫿</mo></msub></math>
|
||||
<math displaystyle="true"><msup><mo id="msup_base">⫿</mo><mo id="msup_supscript">⫿</mo></msup></math>
|
||||
|
|
|
@ -99,5 +99,7 @@
|
|||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_dir");</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<meta name="assert" content="Verify various cases of the MathML length syntax.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: TestFont;
|
||||
|
@ -35,6 +36,7 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
assert_equals(getBox("unitCm").width, 96, "cm");
|
||||
assert_equals(getBox("unitEm").width, 120, "em");
|
||||
assert_equals(getBox("unitEx").width, 500, "ex");
|
||||
|
@ -47,6 +49,7 @@
|
|||
}, "Units");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
assert_equals(getBox("spaceCm").width, 96, "cm");
|
||||
assert_equals(getBox("spaceEm").width, 120, "em");
|
||||
assert_equals(getBox("spaceEx").width, 500, "ex");
|
||||
|
@ -59,6 +62,7 @@
|
|||
}, "Trimming of space");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
assert_approx_equals(getBox("n0").width, 0, epsilon, "n0");
|
||||
assert_approx_equals(getBox("n1").width, 90, epsilon, "n1");
|
||||
assert_approx_equals(getBox("n2").width, 8, epsilon, "n2");
|
||||
|
@ -72,6 +76,7 @@
|
|||
}, "Non-negative numbers");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
var topRef = getBox("ref").top;
|
||||
assert_approx_equals(getBox("N0").top - topRef, -0, epsilon, "N0");
|
||||
assert_approx_equals(topRef - getBox("N1").top, -90, epsilon, "N1");
|
||||
|
@ -86,6 +91,7 @@
|
|||
}, "Non-positive numbers");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
// Namedspace values are invalid in MathML Core.
|
||||
["veryverythinmathspace",
|
||||
"verythinmathspace",
|
||||
|
@ -110,6 +116,7 @@
|
|||
}, "Legacy namedspaces");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
// These values are invalid in MathML Core.
|
||||
assert_equals(getBox("unitNone").width, 30, "Unitless");
|
||||
assert_approx_equals(getBox("n3").width, 0, epsilon, "n3");
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>border</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#layout-algorithms">
|
||||
<meta name="assert" content="Verify that border is taken into account.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script>
|
||||
var epsilon = 1;
|
||||
|
||||
setup({ explicit_done: true });
|
||||
window.addEventListener("load", runTests);
|
||||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-border")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left border");
|
||||
assert_approx_equals(s.right, 30, epsilon, "right border");
|
||||
assert_approx_equals(s.top, 40, epsilon, "top border");
|
||||
assert_approx_equals(s.bottom, 50, epsilon, "bottom border");
|
||||
}, "Border properties on mrow");
|
||||
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-border-shorthand")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left border");
|
||||
assert_approx_equals(s.right, 20, epsilon, "right border");
|
||||
assert_approx_equals(s.top, 20, epsilon, "top border");
|
||||
assert_approx_equals(s.bottom, 20, epsilon, "bottom border");
|
||||
}, "Border properties on mrow (shorthand)");
|
||||
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-border-logical")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left border");
|
||||
assert_approx_equals(s.right, 30, epsilon, "right border");
|
||||
assert_approx_equals(s.top, 40, epsilon, "top border");
|
||||
assert_approx_equals(s.bottom, 50, epsilon, "bottom border");
|
||||
}, "Border properties on mrow (logical)");
|
||||
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-border-logical-shorthand")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left border");
|
||||
assert_approx_equals(s.right, 20, epsilon, "right border");
|
||||
assert_approx_equals(s.top, 30, epsilon, "top border");
|
||||
assert_approx_equals(s.bottom, 30, epsilon, "bottom border");
|
||||
}, "Border properties on mrow (logical, shorthand)");
|
||||
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-border"
|
||||
style="border-left: 20px;
|
||||
border-right: 30px;
|
||||
border-top: 40px;
|
||||
border-bottom: 50px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-border-shorthand"
|
||||
style="border: 20px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-border-logical"
|
||||
style="border-inline-start: 20px;
|
||||
border-inline-end: 30px;
|
||||
border-block-start: 40px;
|
||||
border-block-end: 50px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-border-logical-shorthand"
|
||||
style="border-inline: 20px;
|
||||
border-block: 30px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
function measureSpaceAround(id) {
|
||||
var mrow = document.getElementById(id);
|
||||
var mrowBox = mrow.getBoundingClientRect();
|
||||
var parentBox = mrow.parentNode.getBoundingClientRect();
|
||||
var childBox = mrow.firstElementChild.getBoundingClientRect();
|
||||
return {
|
||||
left: childBox.left - parentBox.left,
|
||||
right: parentBox.right - childBox.right,
|
||||
top: childBox.top - parentBox.top,
|
||||
bottom: parentBox.bottom - childBox.bottom
|
||||
};
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>margin</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#layout-algorithms">
|
||||
<meta name="assert" content="Verify that margin is taken into account.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script>
|
||||
var epsilon = 1;
|
||||
|
||||
setup({ explicit_done: true });
|
||||
window.addEventListener("load", runTests);
|
||||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-margin")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left margin");
|
||||
assert_approx_equals(s.right, 30, epsilon, "right margin");
|
||||
assert_approx_equals(s.top, 40, epsilon, "top margin");
|
||||
assert_approx_equals(s.bottom, 50, epsilon, "bottom margin");
|
||||
}, "Margin properties on mrow");
|
||||
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-margin-shorthand")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left margin");
|
||||
assert_approx_equals(s.right, 20, epsilon, "right margin");
|
||||
assert_approx_equals(s.top, 20, epsilon, "top margin");
|
||||
assert_approx_equals(s.bottom, 20, epsilon, "bottom margin");
|
||||
}, "Margin properties on mrow (shorthand)");
|
||||
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-margin-logical")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left margin");
|
||||
assert_approx_equals(s.right, 30, epsilon, "right margin");
|
||||
assert_approx_equals(s.top, 40, epsilon, "top margin");
|
||||
assert_approx_equals(s.bottom, 50, epsilon, "bottom margin");
|
||||
}, "Margin properties on mrow (logical)");
|
||||
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-margin-logical-shorthand")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left margin");
|
||||
assert_approx_equals(s.right, 20, epsilon, "right margin");
|
||||
assert_approx_equals(s.top, 30, epsilon, "top margin");
|
||||
assert_approx_equals(s.bottom, 30, epsilon, "bottom margin");
|
||||
}, "Margin properties on mrow (logical, shorthand)");
|
||||
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-margin"
|
||||
style="margin-left: 20px;
|
||||
margin-right: 30px;
|
||||
margin-top: 40px;
|
||||
margin-bottom: 50px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-margin-shorthand"
|
||||
style="margin: 20px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-margin-logical"
|
||||
style="margin-inline-start: 20px;
|
||||
margin-inline-end: 30px;
|
||||
margin-block-start: 40px;
|
||||
margin-block-end: 50px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-margin-logical-shorthand"
|
||||
style="margin-inline: 20px;
|
||||
margin-block: 30px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,104 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>padding</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#layout-algorithms">
|
||||
<meta name="assert" content="Verify that padding is taken into account.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script>
|
||||
var epsilon = 1;
|
||||
|
||||
setup({ explicit_done: true });
|
||||
window.addEventListener("load", runTests);
|
||||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-padding")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left padding");
|
||||
assert_approx_equals(s.right, 30, epsilon, "right padding");
|
||||
assert_approx_equals(s.top, 40, epsilon, "top padding");
|
||||
assert_approx_equals(s.bottom, 50, epsilon, "bottom padding");
|
||||
}, "Padding properties on mrow");
|
||||
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-padding-shorthand")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left padding");
|
||||
assert_approx_equals(s.right, 20, epsilon, "right padding");
|
||||
assert_approx_equals(s.top, 20, epsilon, "top padding");
|
||||
assert_approx_equals(s.bottom, 20, epsilon, "bottom padding");
|
||||
}, "Padding properties on mrow (shorthand)");
|
||||
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-padding-logical")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left padding");
|
||||
assert_approx_equals(s.right, 30, epsilon, "right padding");
|
||||
assert_approx_equals(s.top, 40, epsilon, "top padding");
|
||||
assert_approx_equals(s.bottom, 50, epsilon, "bottom padding");
|
||||
}, "Padding properties on mrow (logical)");
|
||||
|
||||
test(function() {
|
||||
var s = measureSpaceAround("mrow-padding-logical-shorthand")
|
||||
assert_approx_equals(s.left, 20, epsilon, "left padding");
|
||||
assert_approx_equals(s.right, 20, epsilon, "right padding");
|
||||
assert_approx_equals(s.top, 30, epsilon, "top padding");
|
||||
assert_approx_equals(s.bottom, 30, epsilon, "bottom padding");
|
||||
}, "Padding properties on mrow (logical, shorthand)");
|
||||
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-padding"
|
||||
style="padding-left: 20px;
|
||||
padding-right: 30px;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 50px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-padding-shorthand"
|
||||
style="padding: 20px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-padding-logical"
|
||||
style="padding-inline-start: 20px;
|
||||
padding-inline-end: 30px;
|
||||
padding-block-start: 40px;
|
||||
padding-block-end: 50px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
<p>
|
||||
<math>
|
||||
<mrow>
|
||||
<mrow id="mrow-padding-logical-shorthand"
|
||||
style="padding-inline: 20px;
|
||||
padding-block: 30px;">
|
||||
<mspace width="50px" height="50px"></mspace>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>visibility</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
|
||||
<link rel="match" href="visibility-001-ref.html"/>
|
||||
<meta name="assert" content="Verify that visibility=hidden is used for the text of token elements.">
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; color: red; width: 200px; height: 200px;">
|
||||
<math><mi style="visibility: hidden">1</mi></math>
|
||||
<math><mn style="visibility: hidden">2</mn></math>
|
||||
<math><mo style="visibility: hidden">3</mo></math>
|
||||
<math><mtext style="visibility: hidden">4</mtext></math>
|
||||
<math><ms style="visibility: hidden">5</ms></math>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>visibility (reference)</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; width: 200px; height: 200px;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>visibility</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fraction-with-nonzero-line-thickness">
|
||||
<link rel="match" href="visibility-002-ref.html"/>
|
||||
<meta name="assert" content="Verify that visibility=hidden is used for the text and fraction bar of the mfrac element.">
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; color: red; width: 200px; height: 200px;">
|
||||
<math><mfrac style="visibility: hidden"><mn>1</mn><mn>2</mn></mfrac></math>
|
||||
</div>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_mfrac");</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>visibility (reference)</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; width: 200px; height: 200px;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>visibility</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#radical-symbol">
|
||||
<link rel="match" href="visibility-003-ref.html"/>
|
||||
<meta name="assert" content="Verify that visibility=hidden is used for the text and radical symbol of the msqrt and mroot elements.">
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; color: red; width: 200px; height: 200px;">
|
||||
<math><msqrt style="visibility: hidden"><mn>1</mn></msqrt></math>
|
||||
<math><mroot style="visibility: hidden"><mn>2</mn><mn>3</mn></mroot></math>
|
||||
</div>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_msqrt");</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>visibility (reference)</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; width: 200px; height: 200px;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,37 +5,29 @@
|
|||
<title>visibility</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#text-mtext">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#fraction-with-nonzero-line-thickness">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#radical-symbol">
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#enclose-expression-inside-notation-menclose">
|
||||
<link rel="match" href="visibility-1-ref.html"/>
|
||||
<meta name="assert" content="Verify that visibility=hidden is used for text and graphical elements.">
|
||||
<link rel="match" href="visibility-004-ref.html"/>
|
||||
<meta name="assert" content="Verify that visibility=hidden is used for the text and graphical elements of the menclose element.">
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if you see a green square.</p>
|
||||
<div style="background: green; color: red; width: 200px; height: 200px;">
|
||||
<math><mfrac style="visibility: hidden"><mn>1</mn><mn>2</mn></mfrac></math>
|
||||
<math><msqrt style="visibility: hidden"><mn>3</mn></msqrt></math>
|
||||
<math><mroot style="visibility: hidden"><mn>4</mn><mn>5</mn></mroot></math>
|
||||
<math><menclose notation="left" style="visibility: hidden"><mn>6</mn></menclose></math>
|
||||
<math><menclose notation="right" style="visibility: hidden"><mn>7</mn></menclose></math>
|
||||
<math><menclose notation="top" style="visibility: hidden"><mn>8</mn></menclose></math>
|
||||
<math><menclose notation="bottom" style="visibility: hidden"><mn>9</mn></menclose></math>
|
||||
<math><menclose notation="box" style="visibility: hidden"><mn>10</mn></menclose></math>
|
||||
<math><menclose notation="roundedbox" style="visibility: hidden"><mn>11</mn></menclose></math>
|
||||
<math><menclose notation="actuarial" style="visibility: hidden"><mn>12</mn></menclose></math>
|
||||
<math><menclose notation="madruwb" style="visibility: hidden"><mn>13</mn></menclose></math>
|
||||
<math><menclose notation="horizontalstrike" style="visibility: hidden"><mn>14</mn></menclose></math>
|
||||
<math><menclose notation="verticalstrike" style="visibility: hidden"><mn>15</mn></menclose></math>
|
||||
<math><menclose notation="updiagonalstrike" style="visibility: hidden"><mn>16</mn></menclose></math>
|
||||
<math><menclose notation="downdiagonalstrike" style="visibility: hidden"><mn>17</mn></menclose></math>
|
||||
<math><menclose notation="longdiv" style="visibility: hidden"><mn>18</mn></menclose></math>
|
||||
<math><menclose notation="circle" style="visibility: hidden"><mn>19</mn></menclose></math>
|
||||
<math><mi style="visibility: hidden">20</mi></math>
|
||||
<math><mn style="visibility: hidden">21</mn></math>
|
||||
<math><mo style="visibility: hidden">22</mo></math>
|
||||
<math><mtext style="visibility: hidden">23</mtext></math>
|
||||
<math><ms style="visibility: hidden">24</ms></math>
|
||||
<math><menclose notation="left" style="visibility: hidden"><mn>1</mn></menclose></math>
|
||||
<math><menclose notation="right" style="visibility: hidden"><mn>2</mn></menclose></math>
|
||||
<math><menclose notation="top" style="visibility: hidden"><mn>3</mn></menclose></math>
|
||||
<math><menclose notation="bottom" style="visibility: hidden"><mn>4</mn></menclose></math>
|
||||
<math><menclose notation="box" style="visibility: hidden"><mn>5</mn></menclose></math>
|
||||
<math><menclose notation="roundedbox" style="visibility: hidden"><mn>6</mn></menclose></math>
|
||||
<math><menclose notation="actuarial" style="visibility: hidden"><mn>7</mn></menclose></math>
|
||||
<math><menclose notation="madruwb" style="visibility: hidden"><mn>8</mn></menclose></math>
|
||||
<math><menclose notation="horizontalstrike" style="visibility: hidden"><mn>9</mn></menclose></math>
|
||||
<math><menclose notation="verticalstrike" style="visibility: hidden"><mn>10</mn></menclose></math>
|
||||
<math><menclose notation="updiagonalstrike" style="visibility: hidden"><mn>11</mn></menclose></math>
|
||||
<math><menclose notation="downdiagonalstrike" style="visibility: hidden"><mn>12</mn></menclose></math>
|
||||
<math><menclose notation="longdiv" style="visibility: hidden"><mn>13</mn></menclose></math>
|
||||
<math><menclose notation="circle" style="visibility: hidden"><mn>14</mn></menclose></math>
|
||||
</div>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<script>MathMLFeatureDetection.ensure_for_match_reftest("has_menclose");</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue