diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/mathml/relations/css-styling | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/mathml/relations/css-styling')
167 files changed, 10070 insertions, 0 deletions
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/attribute-mapping-001.html b/testing/web-platform/tests/mathml/relations/css-styling/attribute-mapping-001.html new file mode 100644 index 0000000000..e423b16fd7 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/attribute-mapping-001.html @@ -0,0 +1,111 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Attribute mapping</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements"> +<meta name="assert" content="Verify that dir, mathcolor, mathbackground and mathsize are mapped to CSS but that deprecated MathML3 attributes are not."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<style> + #container { + color: blue; + font-size: 50px; + } +</style> +<script> + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + function runTests() { + var container = document.getElementById("container"); + for (tag in MathMLFragments) { + container.insertAdjacentHTML("beforeend", `<math>${MathMLFragments[tag]}</math>`); + } + Array.from(document.getElementsByClassName("element")).forEach(element => { + var tag = element.tagName; + var style = window.getComputedStyle(element); + + test(function() { + assert_equals(style.getPropertyValue("direction"), "ltr", "no attribute"); + element.setAttribute("dir", "rtl"); + assert_equals(style.getPropertyValue("direction"), "rtl", "attribute specified"); + element.setAttribute("dir", "RtL"); + assert_equals(style.getPropertyValue("direction"), "rtl", "case insensitive"); + element.setAttribute("dir", "auto"); + assert_equals(style.getPropertyValue("direction"), "ltr", "auto"); + element.setAttribute("dir", "foo"); + assert_equals(style.getPropertyValue("direction"), "ltr", "random value"); + }, `dir on the ${tag} element is mapped to CSS direction`) + + test(function() { + assert_equals(style.getPropertyValue("color"), + "rgb(0, 0, 255)", + "no attribute"); + element.setAttribute("mathcolor", "black"); + assert_equals(style.getPropertyValue("color"), "rgb(0, 0, 0)", "attribute specified"); + // The color names are case-insensitive. + // See https://www.w3.org/TR/css-color-3/#html4 + element.setAttribute("mathcolor", "GrEeN"); + assert_equals(style.getPropertyValue("color"), "rgb(0, 128, 0)", "case insensitive"); + }, `mathcolor on the ${tag} element is mapped to CSS color`); + + test(function() { + assert_equals(style.getPropertyValue("background-color"), + tag === "merror" ? + "rgb(255, 255, 224)" : "rgba(0, 0, 0, 0)", + "no attribute"); + element.setAttribute("mathbackground", "lightblue"); + assert_equals(style.getPropertyValue("background-color"), "rgb(173, 216, 230)", "attribute specified"); + // The color names are case-insensitive. + // See https://www.w3.org/TR/css-color-3/#html4 + element.setAttribute("mathbackground", "YeLlOw"); + assert_equals(style.getPropertyValue("background-color"), "rgb(255, 255, 0)", "case insensitive"); + }, `mathbackground on the ${tag} element is mapped to CSS background-color`); + + test(function() { + // "none" and "mprescripts" can only be used as non-first children of mmultiscripts so font-size + // is incremented and the resulting fraction string is hard to test accurately, skip for now. + if (tag === "none" || tag === "mprescripts") + return; + assert_equals(style.getPropertyValue("font-size"), "50px", "no attribute"); + element.setAttribute("mathsize", "20px"); + assert_equals(style.getPropertyValue("font-size"), "20px", "attribute specified"); + // unit identifiers are ASCII case-insensitive. + // https://www.w3.org/TR/css-values-3/#typedef-dimension + element.setAttribute("mathsize", "30Px"); + assert_equals(style.getPropertyValue("font-size"), "30px", "case insensitive"); + }, `mathsize on the ${tag} element is mapped to CSS font-size`); + + test(function() { + assert_true(MathMLFeatureDetection.has_mathsize(), "Superseding attributes are supported"); + var properties = ["background-color", "color", "fontfamily", "font-size", "font-style", "font-weight"]; + var oldStyle = {}; + properties.forEach(property => { + oldStyle[property] = style.getPropertyValue(property); + }); + element.setAttribute("background", "red"); + element.setAttribute("color", "blue"); + element.setAttribute("fontfamily", "monospace"); + element.setAttribute("fontsize", "50px"); + element.setAttribute("fontstyle", "italic"); + element.setAttribute("fontweight", "bold"); + properties.forEach(property => { + assert_equals(style.getPropertyValue(property), oldStyle[property], `${property}`); + }); + }, `deprecated MathML3 attributes on the ${tag} element are not mapped to CSS`); + }); + + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <div id="container"> + <math class="element"></math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/attribute-mapping-002.html b/testing/web-platform/tests/mathml/relations/css-styling/attribute-mapping-002.html new file mode 100644 index 0000000000..e38f8560bf --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/attribute-mapping-002.html @@ -0,0 +1,112 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Attribute mapping</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-mathvariant-attribute"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> +<meta name="assert" content="Verify that mathvariant, scriptlevel, displaystyle are mapped to CSS"> +<link rel="stylesheet" href="/fonts/ahem.css"> +<style> + #container { + /* Ahem font does not have a MATH table so the font-size scale factor + is always 0.71^{computed - inherited math script level} */ + font: 100px/1 Ahem; + } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script> + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + function fontSize(style) { + return parseFloat((/(.+)px/).exec(style.getPropertyValue("font-size"))[1]); + } + function runTests() { + var container = document.getElementById("container"); + for (tag in MathMLFragments) { + container.insertAdjacentHTML("beforeend", `<math>${MathMLFragments[tag]}</math>`); + } + Array.from(document.getElementsByClassName("element")).forEach(element => { + var tag = element.tagName; + var style = window.getComputedStyle(element); + + test(function() { + assert_equals(style.getPropertyValue("text-transform"), + tag === "mi" ? "math-auto" : "none", + "no attribute"); + element.setAttribute("mathvariant", "fraktur"); + assert_equals(style.getPropertyValue("text-transform"), "math-fraktur", "attribute specified"); + element.setAttribute("mathvariant", "DoUbLe-StRuCk"); + assert_equals(style.getPropertyValue("text-transform"), "math-double-struck", "case insensitive"); + }, `mathvariant on the ${tag} element is mapped to CSS text-transform`) + + test(function() { + // none and mprescripts appear as scripts + assert_equals(style.getPropertyValue("math-depth"), tag === "none" || tag === "mprescripts" ? "1" : "0", "no attribute"); + + var absoluteScriptlevel = 2; + element.setAttribute("scriptlevel", absoluteScriptlevel); + assert_equals(style.getPropertyValue("math-depth"), "" + absoluteScriptlevel, "attribute specified <U>"); + + var positiveScriptlevelDelta = 1; + element.setAttribute("scriptlevel", `+${positiveScriptlevelDelta}`); + assert_equals(style.getPropertyValue("math-depth"), "" + positiveScriptlevelDelta, "attribute specified +<U>"); + + var negativeScriptlevelDelta = -3; + element.setAttribute("scriptlevel", `${negativeScriptlevelDelta}`); + assert_equals(style.getPropertyValue("math-depth"), "" + negativeScriptlevelDelta, "attribute specified -<U>"); + + element.setAttribute("scriptlevel", absoluteScriptlevel); + element.setAttribute("mathsize", "42px"); + assert_approx_equals(fontSize(style), 42, 1, "mathsize wins over scriptlevel"); + + }, `scriptlevel on the ${tag} element is mapped to math-depth(...)`); + + test(function() { + // none and mprescripts appear as scripts + let expected = 0; + element.setAttribute("scriptlevel", "" + expected); + assert_equals(style.getPropertyValue("math-depth"), "" + expected, "no attribute"); + + element.setAttribute("scriptlevel", " +1"); + assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value"); + + element.setAttribute("scriptlevel", " + 1"); + assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value"); + + element.setAttribute("scriptlevel", "2.0"); + assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value"); + + element.setAttribute("scriptlevel", "-3\""); + assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value"); + + element.setAttribute("scriptlevel", "200px"); + assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value"); + + element.setAttribute("scriptlevel", "add(2)"); + assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value"); + + }, `invalid scriptlevel values on the ${tag} element are not mapped to math-depth(...)`); + + test(function() { + assert_equals(style.getPropertyValue("math-style"), "compact", "no attribute"); + element.setAttribute("displaystyle", "true"); + assert_equals(style.getPropertyValue("math-style"), "normal", "attribute specified"); + element.setAttribute("displaystyle", "TrUe"); + assert_equals(style.getPropertyValue("math-style"), "normal", "case insensitive"); + }, `displaystyle on the ${tag} element is mapped to CSS math-style`); + }); + + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <div id="container"> + <math class="element"></math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/blur-filter-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/blur-filter-ref.html new file mode 100644 index 0000000000..21fc165b7d --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/blur-filter-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Blur filter (reference)</title> +</head> +<body> + <p>Rectangles should be blurred.</p> + <div style="background: green; filter: blur(5px); width: 200px; height: 200px;"></div> + <div style="background: green; filter: blur(5px); width: 200px; height: 200px; position: absolute; top: 300px"></div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/blur-filter.html b/testing/web-platform/tests/mathml/relations/css-styling/blur-filter.html new file mode 100644 index 0000000000..92a894bf34 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/blur-filter.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Blur filter</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="match" href="blur-filter-ref.html"/> +<meta name="assert" content="Verify that 'filter: blur' works on MathML elements."> +</head> +<body> + <p>Rectangles should be blurred.</p> + <div> + <math><mspace width="200px" height="200px" style="background: green; filter: blur(5px)"/></math> + </div> + <div style="position: absolute; top: 300px"> + <math style="filter: blur(5px)"><mspace width="200px" height="200px" style="background: green"/></math> + </div> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/clip-path-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/clip-path-ref.html new file mode 100644 index 0000000000..57935564bf --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/clip-path-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Clip property (reference)</title> +</head> +<body> + <p>Rectangles should be clipped to a polygon.</p> + <div style="background: green; width: 200px; height: 200px; clip-path: polygon(10% 10%, 90% 10%, 90% 90%, 10% 90%)"></div> + <div style="background: green; width: 200px; height: 200px; position: absolute; top: 300px; clip-path: polygon(10% 10%, 90% 10%, 90% 90%, 10% 90%)"></div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/clip-path.html b/testing/web-platform/tests/mathml/relations/css-styling/clip-path.html new file mode 100644 index 0000000000..abe58e2261 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/clip-path.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Clip property</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="match" href="clip-path-ref.html"/> +<meta name="assert" content="Verify that the clip property works on MathML elements."> +</head> +<body> + <p>Rectangles should be clipped to a polygon.</p> + <div> + <math><mspace width="200px" height="200px" style="background: green; clip-path: polygon(10% 10%, 90% 10%, 90% 90%, 10% 90%)"/></math> + </div> + <div style="position: absolute; top: 300px; width: 200px; height: 200px"> + <math style="position: absolute; clip-path: polygon(10% 10%, 90% 10%, 90% 90%, 10% 90%)"><mspace width="200px" height="200px" style="background: green"/></math> + </div> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/clip-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/clip-ref.html new file mode 100644 index 0000000000..7882ac8c31 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/clip-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Clip property (reference)</title> +</head> +<body> + <p>Rectangles should be clipped.</p> + <div style="background: green; width: 200px; height: 200px; position: absolute; top: 100px; clip: rect(0px 100px 100px 0px)"></div> + <div style="background: green; width: 200px; height: 200px; position: absolute; top: 300px; clip: rect(0px 100px 100px 0px)"></div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/clip.html b/testing/web-platform/tests/mathml/relations/css-styling/clip.html new file mode 100644 index 0000000000..48b7753fd8 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/clip.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Clip property</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="match" href="clip-ref.html"/> +<meta name="assert" content="Verify that the clip property works on MathML elements."> +</head> +<body> + <p>Rectangles should be clipped.</p> + <div> + <math><mspace width="200px" height="200px" style="position:absolute; top:100px; background: green; clip: rect(0px 100px 100px 0px)"/></math> + </div> + <div style="position: absolute; top: 300px; width: 200px; height: 200px"> + <math style="position: absolute; clip: rect(0px 100px 100px 0px)"><mspace width="200px" height="200px" style="background: green"/></math> + </div> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/color-001-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/color-001-ref.html new file mode 100644 index 0000000000..0efca480ee --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/color-001-ref.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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/color-001.html b/testing/web-platform/tests/mathml/relations/css-styling/color-001.html new file mode 100644 index 0000000000..76d65f579c --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/color-001.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<title>color</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.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 id="dynamic"> + <math><mi>1</mi></math> + <math><mn>2</mn></math> + <math><mo>3</mo></math> + <math><mtext>4</mtext></math> + <math><ms>5</ms></math> + </div> + </div> + <script> + window.addEventListener("load", () => { + document.getElementById("dynamic").style.color = "green"; + document.documentElement.classList.remove("reftest-wait"); + }); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/color-002-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/color-002-ref.html new file mode 100644 index 0000000000..0efca480ee --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/color-002-ref.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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/color-002.html b/testing/web-platform/tests/mathml/relations/css-styling/color-002.html new file mode 100644 index 0000000000..bce24f54c8 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/color-002.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<title>color</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://w3c.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 id="dynamic"> + <math><mfrac><mn>1</mn><mn>2</mn></mfrac></math> + </div> + </div> + <script> + window.addEventListener("load", () => { + document.getElementById("dynamic").style.color = "green"; + document.documentElement.classList.remove("reftest-wait"); + }); + </script> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mfrac");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/color-003-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/color-003-ref.html new file mode 100644 index 0000000000..0efca480ee --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/color-003-ref.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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/color-003.html b/testing/web-platform/tests/mathml/relations/css-styling/color-003.html new file mode 100644 index 0000000000..dd04b61054 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/color-003.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<title>color</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://w3c.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 id="dynamic"> + <math><msqrt><mn>1</mn></msqrt></math> + <math><mroot><mn>2</mn><mn>2</mn></mroot></math> + </div> + </div> + <script> + window.addEventListener("load", () => { + document.getElementById("dynamic").style.color = "green"; + document.documentElement.classList.remove("reftest-wait"); + }); + </script> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_msqrt");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/color-004.tentative-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/color-004.tentative-ref.html new file mode 100644 index 0000000000..0efca480ee --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/color-004.tentative-ref.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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/color-004.tentative.html b/testing/web-platform/tests/mathml/relations/css-styling/color-004.tentative.html new file mode 100644 index 0000000000..4bd15e62a0 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/color-004.tentative.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<title>color</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://github.com/mathml-refresh/mathml-core/pull/24"> +<link rel="match" href="color-004.tentative-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 id="dynamic"> + <math><menclose notation="left"><mn>1</mn></menclose></math> + <math><menclose notation="right"><mn>2</mn></menclose></math> + <math><menclose notation="top"><mn>3</mn></menclose></math> + <math><menclose notation="bottom"><mn>4</mn></menclose></math> + <math><menclose notation="box"><mn>5</mn></menclose></math> + <math><menclose notation="roundedbox"><mn>6</mn></menclose></math> + <math><menclose notation="actuarial"><mn>7</mn></menclose></math> + <math><menclose notation="madruwb"><mn>8</mn></menclose></math> + <math><menclose notation="horizontalstrike"><mn>9</mn></menclose></math> + <math><menclose notation="verticalstrike"><mn>10</mn></menclose></math> + <math><menclose notation="updiagonalstrike"><mn>11</mn></menclose></math> + <math><menclose notation="downdiagonalstrike"><mn>12</mn></menclose></math> + <math><menclose notation="longdiv"><mn>13</mn></menclose></math> + <math><menclose notation="circle"><mn>14</mn></menclose></math> + </div> + </div> + <script> + window.addEventListener("load", () => { + document.getElementById("dynamic").style.color = "green"; + document.documentElement.classList.remove("reftest-wait"); + }); + </script> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_menclose");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/color-005-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/color-005-ref.html new file mode 100644 index 0000000000..0efca480ee --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/color-005-ref.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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/color-005.html b/testing/web-platform/tests/mathml/relations/css-styling/color-005.html new file mode 100644 index 0000000000..f2660c9e62 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/color-005.html @@ -0,0 +1,88 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<title>color</title> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo"> +<link rel="match" href="color-005-ref.html"/> +<meta name="assert" content="Verify that the color is used for normal, stretchy and large operators."> +<style> + math { + font: 20px/1 Ahem; + } + @font-face { + font-family: operators; + src: url("/fonts/math/operators.woff"); + } + mo { + font-family: operators; + } +</style> +</head> +<body> + <p>Test passes if you see a green square.</p> + <div id="square" style="background: green; color: red; width: 200px; height: 200px; padding: 1px;"> + <math> + <!-- unstretched operators --> + <mo style="color: green">⥯</mo> + <mo style="color: green">+</mo> + <mo style="color: green">-</mo> + </math> + <math displaystyle="true"> + <!-- large operator --> + <mo largeop="true" style="color: green">⥯</mo> + </math> + <math> + <mrow> + <!-- stretchy, small size --> + <mspace height="2em"/> + <mo style="color: green">⥯</mo> + </mrow> + </math> + <math> + <mrow> + <!-- stretchy, large size --> + <mspace height="4em"/> + <mo style="color: green">⥯</mo> + </mrow> + </math> + <div id="dynamic"> + <math> + <!-- unstretched operators --> + <mo stretchy="false">⥯</mo> + <mo>+</mo> + <mo>-</mo> + </math> + <math displaystyle="true"> + <!-- large operator --> + <mo largeop="true">⥯</mo> + </math> + <math> + <mrow> + <!-- stretchy, small size --> + <mspace height="2em"/> + <mo>⥯</mo> + </mrow> + </math> + <math> + <mrow> + <!-- stretchy, large size --> + <mspace height="4em"/> + <mo>⥯</mo> + </mrow> + </math> + </div> + </div> + <script src="/mathml/support/fonts.js"></script> + <script> + window.addEventListener("load", () => loadAllFonts().then(() => { + document.getElementById("dynamic").style.color = "green"; + document.documentElement.classList.remove("reftest-wait"); + })); + </script> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_operator_spacing");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/default-font-family.html b/testing/web-platform/tests/mathml/relations/css-styling/default-font-family.html new file mode 100644 index 0000000000..c471b0fc9d --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/default-font-family.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Default font-family on the <math> root</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-top-level-math-element"> +<link rel="help" href="https://w3c.github.io/mathml-core/#user-agent-stylesheet"> +<meta name="assert" content="Verify that the default font-family is 'math'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +</head> +<body> + <div id="log"></div> + <div style="font-family: BB2F7F3E9FEE11EA96DF67A737751C2F;"> + <div id="inherited-reference"></div> + <math id="math-not-inherited"></math> + </div> + <math id="math-default"></math> + + <script> + function getFontFamily(id) { + return window.getComputedStyle(document.getElementById(id)).fontFamily; + } + + test(function () { + assert_equals(getFontFamily("inherited-reference"), "BB2F7F3E9FEE11EA96DF67A737751C2F"); + assert_not_equals(getFontFamily("math-not-inherited"), getFontFamily("inherited-reference")); + }, "Default font-family on <math> is not inherited"); + + test(function () { + assert_equals(getFontFamily("math-not-inherited"), "math"); + assert_equals(getFontFamily("math-default"), "math"); + }, "Default font-family on <math> is 'math'"); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/default-properties-on-semantics-and-maction.html b/testing/web-platform/tests/mathml/relations/css-styling/default-properties-on-semantics-and-maction.html new file mode 100644 index 0000000000..23f8b62dfa --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/default-properties-on-semantics-and-maction.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Default properties on <semantics> and <maction></title> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="help" href="https://w3c.github.io/mathml-core/#enlivening-expressions"> +<link rel="help" href="https://w3c.github.io/mathml-core/#user-agent-stylesheet"> +<meta name="assert" content="Test that only the first children of semantics/maction are displayed."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +</head> +<body> + <div id="log"></div> + <div> + <math> + <semantics> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + <mn>4</mn> + <mn>5</mn> + </semantics> + <maction> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + <mn>4</mn> + <mn>5</mn> + </maction> + </math> + </div> + + <script> + ["semantics", "maction"].forEach(name => { + let element = document.getElementsByTagName(name)[0]; + test(() => { + let child = element.firstElementChild; + assert_not_equals(window.getComputedStyle(child).display, "none", `Child ${child.innerText} does not have display: none`); + for (child = child.nextElementSibling; child; child = child.nextElementSibling) { + assert_equals(window.getComputedStyle(child).display, "none", `Child ${child.innerText} has display: none`); + } + }, `Display value of children of the <${name}> element`); + }); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/default-properties-on-the-math-root.html b/testing/web-platform/tests/mathml/relations/css-styling/default-properties-on-the-math-root.html new file mode 100644 index 0000000000..c329935f2e --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/default-properties-on-the-math-root.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Default properties on the <math> root</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-top-level-math-element"> +<link rel="help" href="https://w3c.github.io/mathml-core/#user-agent-stylesheet"> +<meta name="assert" content="Test properties on the math root set by the UA stylesheet."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + math { + font-size: 100px; + } + .styled { + direction: rtl; + writing-mode: vertical-lr; + text-indent: .5em; + letter-spacing: .5em; + line-height: .5em; + word-spacing: .5em; + font-style: italic; + font-weight: bold; + } +</style> + +</head> +<body> + <div id="log"></div> + <div class="styled"> + <math id="ua"></math> + <math id="author" class="styled"></math> + </div> + + <script> + function getProperty(id, property) { + return window.getComputedStyle(document.getElementById(id))[property]; + } + [ + // Property name, value when specified from the UA, from the author. + ["direction", "ltr", "rtl"], + ["writing-mode", "horizontal-tb", "horizontal-tb"], // MathML Core level 1 only supports horizontal mode. + ["text-indent", "0px", "50px"], + ["letter-spacing", "normal", "50px"], + ["line-height", "normal", "50px"], + ["word-spacing", "0px", "50px"], + ["font-style", "normal", "italic"], + ["font-weight", "400", "700"] + ].forEach(([name, ua_value, author_value]) => { + test(function () { + assert_equals(getProperty("ua", name), ua_value, "when specified from the UA sheet"); + assert_equals(getProperty("author", name), author_value, "when specified by the author"); + }, `Value of ${name} on the <math> root`); + }); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/display-1-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/display-1-ref.html new file mode 100644 index 0000000000..ce65aba18c --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/display-1-ref.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>display (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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/display-1.html b/testing/web-platform/tests/mathml/relations/css-styling/display-1.html new file mode 100644 index 0000000000..5a9e4db687 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/display-1.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>display</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="match" href="display-1-ref.html"/> +<meta name="assert" content="Verify that the 'display: none' property works on MathML elements."> +</head> +<body> + <p>Test passes if you see a green square.</p> + <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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/display-2.html b/testing/web-platform/tests/mathml/relations/css-styling/display-2.html new file mode 100644 index 0000000000..36a02952eb --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/display-2.html @@ -0,0 +1,139 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Verify that one can override the layout of MathML elements with the CSS display property</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<meta name="assert" content="Verify that one can override the display of a MathML element."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/layout-comparison.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script src="/mathml/support/fonts.js"></script> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> + math { + font-family: inherit; + } + mfrac { + padding: 0; + } +</style> +<script> + const Xsize = 25; + const templates = { + "block display": `<math style="display: block;">XXX</math>`, + "block display with contrained width": `<math style="display: block; width: ${2*Xsize}px;">XXX</math>`, + "list display inside display block": `<math style="display: block">\ + <mmultiscripts style="display: list-item;">X</mmultiscripts>\ + <maction style="display: list-item;">X</maction>\ + <mpadded style="display: list-item;">X</mpadded>\ +</math>`, + "inline display": `<math style="display: inline;">XXX</math>`, + "inline-block display": `<math style="display: inline-block">XXX</math>`, + "table display (math)": `<math style="display: table">\ + <mfrac style='display: table-row'>\ + <msub style='display: table-cell'>X</msub>\ + <msup style='display: table-cell'>X</msup>\ + <msubsup style='display: table-cell'>X</msubsup>\ + </mfrac>\ + <mtable style='display: table-row'>\ + <munder style='display: table-cell'>X</munder>\ + <mover style='display: table-cell'>X</mover>\ + <munderover style='display: table-cell'>X</munderover>\ + </mtable>\ +</math>`, + "table display (mrow)": `<math display="block">\ +<mrow style="display: table">\ + <mfrac style='display: table-row'>\ + <msub style='display: table-cell'>X</msub>\ + <msup style='display: table-cell'>X</msup>\ + <msubsup style='display: table-cell'>X</msubsup>\ + </mfrac>\ + <mtable style='display: table-row'>\ + <munder style='display: table-cell'>X</munder>\ + <mover style='display: table-cell'>X</mover>\ + <munderover style='display: table-cell'>X</munderover>\ + </mtable>\ +</mrow></math>`, + "inline-table display (math)": `<math style="display: inline-table">\ + <mfrac style='display: table-row'>\ + <msub style='display: table-cell'>X</msub>\ + <msup style='display: table-cell'>X</msup>\ + <msubsup style='display: table-cell'>X</msubsup>\ + </mfrac>\ + <mtable style='display: table-row'>\ + <munder style='display: table-cell'>X</munder>\ + <mover style='display: table-cell'>X</mover>\ + <munderover style='display: table-cell'>X</munderover>\ + </mtable>\ +</math>`, + "inline-table display (mrow)": `<math display="block">\ +<mrow style="display: inline-table">\ + <mfrac style='display: table-row'>\ + <msub style='display: table-cell'>X</msub>\ + <msup style='display: table-cell'>X</msup>\ + <msubsup style='display: table-cell'>X</msubsup>\ + </mfrac>\ + <mtable style='display: table-row'>\ + <munder style='display: table-cell'>X</munder>\ + <mover style='display: table-cell'>X</mover>\ + <munderover style='display: table-cell'>X</munderover>\ + </mtable>\ +</mrow></math>`, + "flexbox display (math)": `<math style="display: flex; flex-direction: column;">XXX</math>`, + "flexbox display (mrow)": `<math display="block"><mrow style="display: flex; flex-direction: column;">XXX</mrow></math>`, + "grid display (math)": `<math style="display: grid; grid-gap: 2px; grid-template-columns: ${Xsize}px ${Xsize}px ${Xsize}px;>">XXXXXXXXX</math>`, + "grid display (mrow)": `<math display="block"><mrow style="display: grid; grid-gap: 2px; grid-template-columns: ${Xsize}px ${Xsize}px ${Xsize}px;>">XXXXXXXXX</mrow></math>`, + "ruby display (math)": `<math style="display: ruby;">\ +<mrow style="display: ruby-base;">X</mrow>\ +<mrow style="display: ruby-text">XX</mrow>\ +</math>`, + "ruby display (mrow)": `<math display="block"><mrow style="display: ruby;">\ +<mrow style="display: ruby-base;">X</mrow>\ +<mrow style="display: ruby-text">XX</mrow>\ +</mrow></math>`, + "block display with column width (math)": `<math style="display: block; column-width: ${2*Xsize}px">\ + <mrow>XXXX</mrow><mrow>XXXX</mrow><mrow>XXXX</mrow>\ +</math>`, + "block display with column width (mrow)": `<math style="display: block"><mrow style="display: block; column-width: ${2*Xsize}px">\ + <mrow>XXXX</mrow><mrow>XXXX</mrow><mrow>XXXX</mrow>\ +</mrow></math>`, + }; + + setup({ explicit_done: true }); + window.addEventListener("load", () => { loadAllFonts().then(runTests); }); + + function runTests() { + + for (let key in templates) { + if (!templates.hasOwnProperty(key)) + continue; + let mathtest = templates[key]. + replace(/X/g, `<mspace style="display: inline-block; width: ${Xsize}px; height: ${Xsize}px; background: black"></mspace>`); + let reference = mathtest. + replace(/maction|math|mfrac|mmultiscripts|mover|mover|mpadded|mrow|mspace|msubsup|msub|msup|mtable|munderover|munder/g, "div"); + document.body.insertAdjacentHTML("beforeend", `<div style="font: 20px/1 Ahem; position: absolute;">\ +<div><span>${key}:</span>${mathtest}</div>\ +<div><span>${key}:</span>${reference}</div>\ +</div>`); + let div = document.body.lastElementChild; + let elementDiv = div.firstElementChild; + let referenceDiv = div.lastElementChild; + + test(function() { + const epsilon = 1; + compareLayout(elementDiv, referenceDiv, epsilon); + }, `${key}`); + + div.style = "display: none;"; // Hide the div after measurement. + } + + done(); + } +</script> +</head> +<body> + <div id="log"></div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/display-contents.html b/testing/web-platform/tests/mathml/relations/css-styling/display-contents.html new file mode 100644 index 0000000000..b18fdd6c8b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/display-contents.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>display: contents</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<meta name="assert" content="Verify that display: contents computes to display: none"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script> + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + function runTests() { + var container = document.getElementById("container"); + for (tag in MathMLFragments) { + container.insertAdjacentHTML("beforeend", `<math>${MathMLFragments[tag]}</math>`); + } + test(function() { + Array.from(document.getElementsByClassName("element")).forEach(element => { + var style = window.getComputedStyle(element); + element.setAttribute("style", "display: contents"); + assert_equals(style.getPropertyValue("display"), "none", `${tag}`); + }); + }, "display: contents computes to display: none"); + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <div id="container"> + <math class="element"></math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-011-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-011-ref.html new file mode 100644 index 0000000000..400c46a245 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-011-ref.html @@ -0,0 +1,155 @@ +<!DOCTYPE html> +<html> + <head> + <title>displaystyle</title> + <meta charset="utf-8"> + <link rel="stylesheet" href="/fonts/ahem.css"> + <style> + math { + font: 25px Ahem; + } + </style> + </head> + <body> + + <!-- Test displaystyle on mstyle --> + <math> + <mstyle displaystyle="true"> + <munder><mo>O</mo><mo>O</mo></munder> + </mstyle> + <mstyle displaystyle="false"> + <msub><mo>O</mo><mo>O</mo></munder> + </mstyle> + </math> + + <!-- The mfrac element sets displaystyle to "false", or if it was already + false increments scriptlevel by 1, within numerator and denominator. + --> + <math> + <mstyle displaystyle="true"> + <mfrac> + <msub><mo>O</mo><mo>O</mo></msub> + <msub><mo>O</mo><mo>O</mo></msub> + </mfrac> + </mstyle> + </math> + + <!-- The mroot element increments scriptlevel by 2, and sets + displaystyle to "false", within index, but leaves both attributes + unchanged within base. + The msqrt element leaves both attributes unchanged within its + argument. --> + <math> + <mstyle displaystyle="true"> + <mroot> + <munder><mo>O</mo><mo>O</mo></munder> + <msub><mo>O</mo><mo>O</mo></msub> + </mroot> + <msqrt> + <munder><mo>O</mo><mo>O</mo></munder> + </msqrt> + </mstyle> + </math> + +<!-- + The msub element [...] increments scriptlevel by 1, and sets displaystyle to + "false", within subscript, but leaves both attributes unchanged within base. + + The msup element [...] increments scriptlevel by 1, and sets displaystyle to + "false", within superscript, but leaves both attributes unchanged within + base. + + The msubsup element [...] increments scriptlevel by 1, and sets displaystyle + to "false", within subscript and superscript, but leaves both attributes + unchanged within base. + + The mmultiscripts element increments scriptlevel by 1, and sets displaystyle + to "false", within each of its arguments except base, but leaves both + attributes unchanged within base. + --> + <math> + <mstyle displaystyle="true"> + <msub> + <munder><mo>O</mo><mo>O</mo></munder> + <msub><mo>O</mo><mo>O</mo></msub> + </msub> + <msup> + <munder><mo>O</mo><mo>O</mo></munder> + <msub><mo>O</mo><mo>O</mo></msub> + </msup> + <msubsup> + <munder><mo>O</mo><mo>O</mo></munder> + <msub><mo>O</mo><mo>O</mo></msub> + <msub><mo>O</mo><mo>O</mo></msub> + </msubsup> + <mmultiscripts> + <munder><mo>O</mo><mo>O</mo></munder> + <msub><mo>O</mo><mo>O</mo></msub> + <msub><mo>O</mo><mo>O</mo></msub> + <mprescripts/> + <msub><mo>O</mo><mo>O</mo></msub> + <msub><mo>O</mo><mo>O</mo></msub> + </mmultiscripts> + </mstyle> + </math> + +<!-- + The munder element [...] always sets displaystyle to "false" within the + underscript, but increments scriptlevel by 1 only when accentunder is + "false". Within base, it always leaves both attributes unchanged. + + The mover element [...] always sets displaystyle to "false" within + overscript, but increments scriptlevel by 1 only when accent is "false". + Within base, it always leaves both attributes unchanged. + + The munderover [..] always sets displaystyle to "false" within underscript + and overscript, but increments scriptlevel by 1 only when accentunder or + accent, respectively, are "false". Within base, it always leaves both + attributes unchanged. +--> + <math> + <mstyle displaystyle="true"> + <munder> + <munder><mo>O</mo><mo>O</mo></munder> + <msub><mo>O</mo><mo>O</mo></msub> + </munder> + <mover> + <munder><mo>O</mo><mo>O</mo></munder> + <msub><mo>O</mo><mo>O</mo></msub> + </mover> + <munderover> + <munder><mo>O</mo><mo>O</mo></munder> + <msub><mo>O</mo><mo>O</mo></msub> + <msub><mo>O</mo><mo>O</mo></msub> + </munderover> + </mstyle> + </math> + +<!-- + The displaystyle attribute is allowed on the mtable element to set the + inherited value of the attribute. If the attribute is not present, the + mtable element sets displaystyle to "false" within the table elements. +--> + <math> + <mstyle displaystyle="false"> + <mtable displaystyle="true"> + <mtr> + <mtd> + <munder><mo>O</mo><mo>O</mo></munder> + </mtd> + </mtr> + </mtable> + </mstyle> + <mstyle displaystyle="true"> + <mtable> + <mtr> + <mtd> + <msub><mo>O</mo><mo>O</mo></msub> + </mtd> + </mtr> + </mtable> + </mstyle> + </math> + + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-011.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-011.html new file mode 100644 index 0000000000..a0bfc29ae5 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-011.html @@ -0,0 +1,168 @@ +<!DOCTYPE html> +<html> + <head> + <title>displaystyle</title> + <meta charset="utf-8"> + <link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> + <link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle"> + <link rel="help" href="https://w3c.github.io/mathml-core/#fractions-mfrac"> + <link rel="help" href="https://w3c.github.io/mathml-core/#radicals-msqrt-mroot"> + <link rel="help" href="https://w3c.github.io/mathml-core/#subscripts-and-superscripts-msub-msup-msubsup"> + <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover"> + <link rel="help" href="https://w3c.github.io/mathml-core/#prescripts-and-tensor-indices-mmultiscripts"> + <link rel="help" href="https://w3c.github.io/mathml-core/#table-or-matrix-mtable"> + <link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo"> + <link rel="match" href="displaystyle-011-ref.html"/> + <meta name="assert" content="Test the effect on displaystyle and movablelimits"> + <link rel="stylesheet" href="/fonts/ahem.css"> + <style> + math { + font: 25px Ahem; + } + </style> + </head> + <body> + + <!-- Test displaystyle on mstyle --> + <math> + <mstyle displaystyle="true"> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </mstyle> + <mstyle displaystyle="false"> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </mstyle> + </math> + + <!-- The mfrac element sets displaystyle to "false", or if it was already + false increments scriptlevel by 1, within numerator and denominator. + --> + <math> + <mstyle displaystyle="true"> + <mfrac> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </mfrac> + </mstyle> + </math> + + <!-- The mroot element increments scriptlevel by 2, and sets + displaystyle to "false", within index, but leaves both attributes + unchanged within base. + The msqrt element leaves both attributes unchanged within its + argument. --> + <math> + <mstyle displaystyle="true"> + <mroot> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </mroot> + <msqrt> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </msqrt> + </mstyle> + </math> + +<!-- + The msub element [...] increments scriptlevel by 1, and sets displaystyle to + "false", within subscript, but leaves both attributes unchanged within base. + + The msup element [...] increments scriptlevel by 1, and sets displaystyle to + "false", within superscript, but leaves both attributes unchanged within + base. + + The msubsup element [...] increments scriptlevel by 1, and sets displaystyle + to "false", within subscript and superscript, but leaves both attributes + unchanged within base. + + The mmultiscripts element increments scriptlevel by 1, and sets displaystyle + to "false", within each of its arguments except base, but leaves both + attributes unchanged within base. + --> + <math> + <mstyle displaystyle="true"> + <msub> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </msub> + <msup> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </msup> + <msubsup> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </msubsup> + <mmultiscripts> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <mprescripts/> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </mmultiscripts> + </mstyle> + </math> + +<!-- + The munder element [...] always sets displaystyle to "false" within the + underscript, but increments scriptlevel by 1 only when accentunder is + "false". Within base, it always leaves both attributes unchanged. + + The mover element [...] always sets displaystyle to "false" within + overscript, but increments scriptlevel by 1 only when accent is "false". + Within base, it always leaves both attributes unchanged. + + The munderover [..] always sets displaystyle to "false" within underscript + and overscript, but increments scriptlevel by 1 only when accentunder or + accent, respectively, are "false". Within base, it always leaves both + attributes unchanged. +--> + <math> + <mstyle displaystyle="true"> + <munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </munder> + <mover> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </mover> + <munderover> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </munderover> + </mstyle> + </math> + +<!-- + The displaystyle attribute is allowed on the mtable element to set the + inherited value of the attribute. If the attribute is not present, the + mtable element sets displaystyle to "false" within the table elements. +--> + <math> + <mstyle displaystyle="false"> + <mtable displaystyle="true"> + <mtr> + <mtd> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </mtd> + </mtr> + </mtable> + </mstyle> + <mstyle displaystyle="true"> + <mtable> + <mtr> + <mtd> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + </mtd> + </mtr> + </mtable> + </mstyle> + </math> + + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_movablelimits");</script> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-012-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-012-ref.html new file mode 100644 index 0000000000..96042b696f --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-012-ref.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> + <head> + <title>displaystyle</title> + <meta charset="utf-8"> + <link rel="stylesheet" href="/fonts/ahem.css"> + <style> + math { + font: 25px Ahem; + } + </style> + </head> + <body> + + <!-- Test the effect of displaystyle on munder, mover and munderover --> + <math> + <mstyle displaystyle="true"> + <munder><mo>O</mo><mo>O</mo></munder> + <mover><mo>O</mo><mo>O</mo></mover> + <munderover><mo>O</mo><mo>O</mo><mo>O</mo></munderover> + </mstyle> + <mstyle displaystyle="false"> + <msub><mo>O</mo><mo>O</mo></msub> + <msup><mo>O</mo><mo>O</mo></msup> + <msubsup><mo>O</mo><mo>O</mo><mo>O</mo></msubsup> + </mstyle> + </math> + + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-012.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-012.html new file mode 100644 index 0000000000..9fd4c784dd --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-012.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> + <head> + <title>displaystyle</title> + <meta charset="utf-8"> + <link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> + <link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle"> + <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover"> + <link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo"> + <link rel="match" href="displaystyle-012-ref.html"/> + <meta name="assert" content="Test the effect on displaystyle on munder, mover and munderover"> + <link rel="stylesheet" href="/fonts/ahem.css"> + <style> + math { + font: 25px Ahem; + } + </style> + </head> + <body> + + <math> + <mstyle displaystyle="true"> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <mover><mo movablelimits="true">O</mo><mo>O</mo></mover> + <munderover><mo movablelimits="true">O</mo><mo>O</mo><mo>O</mo></munderover> + </mstyle> + <mstyle displaystyle="false"> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <mover><mo movablelimits="true">O</mo><mo>O</mo></mover> + <munderover><mo movablelimits="true">O</mo><mo>O</mo><mo>O</mo></munderover> + </mstyle> + </math> + + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_movablelimits");</script> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-013-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-013-ref.html new file mode 100644 index 0000000000..9a580350de --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-013-ref.html @@ -0,0 +1,58 @@ +<!DOCTYPE html> +<html> + <head> + <title>displaystyle</title> + <meta charset="utf-8"> + <link rel="stylesheet" href="/fonts/ahem.css"> + <style> + math { + font: 25px Ahem; + } + </style> + </head> + <body> + + <!-- Test dynamic change of displaystyle --> + <math id="m1" displaystyle="true"> + <munder><mo>O</mo><mo>O</mo></munder> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </math> + <math> + <mstyle id="m2" displaystyle="true"> + <munder><mo>O</mo><mo>O</mo></munder> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </mstyle> + </math> + <math> + <mtable id="m3" displaystyle="true"> + <mtr> + <mtd> + <munder><mo>O</mo><mo>O</mo></munder> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </mtd> + </mtr> + </mtable> + </math> + <math id="m4" displaystyle="false"> + <msub><mo>O</mo><mo>O</mo></msub> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </math> + <math> + <mstyle id="m5" displaystyle="false"> + <msub><mo>O</mo><mo>O</mo></msub> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </mstyle> + </math> + <math> + <mtable id="m6" displaystyle="false"> + <mtr> + <mtd> + <msub><mo>O</mo><mo>O</mo></msub> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </mtd> + </mtr> + </mtable> + </math> + + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-013.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-013.html new file mode 100644 index 0000000000..3ce9fff062 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-013.html @@ -0,0 +1,80 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <head> + <title>displaystyle</title> + <meta charset="utf-8"> + <link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> + <link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle"> + <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover"> + <link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo"> + <link rel="help" href="https://w3c.github.io/mathml-core/#table-or-matrix-mtable"> + <link rel="match" href="displaystyle-013-ref.html"/> + <meta name="assert" content="Test dynamic change of displaystyle"> + <script src="/mathml/support/fonts.js"></script> + <script type="text/javascript"> + function doTest() { + document.body.offsetTop; // Update layout + document.getElementById("m1").setAttribute("displaystyle", "true"); + document.getElementById("m2").setAttribute("displaystyle", "true"); + document.getElementById("m3").setAttribute("displaystyle", "true"); + document.getElementById("m4").removeAttribute("displaystyle"); + document.getElementById("m5").removeAttribute("displaystyle"); + document.getElementById("m6").removeAttribute("displaystyle"); + document.documentElement.removeAttribute("class"); + } + window.addEventListener("load", () => { loadAllFonts().then(doTest); }); + </script> + <link rel="stylesheet" href="/fonts/ahem.css"> + <style> + math { + font: 25px Ahem; + } + </style> + </head> + <body> + + <math id="m1"> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </math> + <math> + <mstyle id="m2"> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </mstyle> + </math> + <math> + <mtable id="m3"> + <mtr> + <mtd> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </mtd> + </mtr> + </mtable> + </math> + <math id="m4" displaystyle="true"> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </math> + <math> + <mstyle id="m5" displaystyle="true"> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </mstyle> + </math> + <math> + <mtable id="m6" displaystyle="true"> + <mtr> + <mtd> + <munder><mo movablelimits="true">O</mo><mo>O</mo></munder> + <mfrac><mn>1</mn><mn>2</mn></mfrac> + </mtd> + </mtr> + </mtable> + </math> + + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_movablelimits");</script> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-014-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-014-ref.html new file mode 100644 index 0000000000..085e2c429d --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-014-ref.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> + <head> + <title>displaystyle</title> + <meta charset="utf-8"> + <link rel="stylesheet" href="/fonts/ahem.css"> + <style> + math { + font: 25px Ahem; + } + </style> + </head> + <body> + + <!-- See https://bugzilla.mozilla.org/show_bug.cgi?id=832800 --> + <math> + <mstyle displaystyle="true"> + <mfrac> + <mrow> + <mn>X</mn> + <mo id="mathOperator" mathbackground="red">+</mo> + <mfrac> + <mrow><mn>X</mn></mrow> + <mrow><mn>X</mn></mrow> + </mfrac> + </mrow> + <mrow> + <mn>X</mn> + </mrow> + </mfrac> + </mstyle> + </math> + + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-014.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-014.html new file mode 100644 index 0000000000..a4f1208e35 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-014.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <head> + <title>displaystyle</title> + <meta charset="utf-8"> + <link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> + <link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle"> + <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover"> + <link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo"> + <link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> + <link rel="help" href="https://w3c.github.io/mathml-core/#fractions-mfrac"> + <link rel="match" href="displaystyle-014-ref.html"/> + <meta name="assert" content="Test dynamic change of mathbackground on an operator does not interfer with its displaystyle"> + <script src="/mathml/support/fonts.js"></script> + <script type="text/javascript"> + function doTest() { + document.body.offsetTop; // Update layout + document.getElementById('mathOperator'). + setAttribute('mathbackground', 'red'); + document.documentElement.removeAttribute("class"); + } + window.addEventListener("load", () => { loadAllFonts().then(doTest); }); + </script> + <link rel="stylesheet" href="/fonts/ahem.css"> + <style> + math { + font: 25px Ahem; + } + </style> + </head> + <body> + + <!-- See https://bugzilla.mozilla.org/show_bug.cgi?id=832800 --> + <math> + <mstyle displaystyle="true"> + <mfrac> + <mrow> + <mn>X</mn> + <mo id="mathOperator">+</mo> + <mfrac> + <mrow><mn>X</mn></mrow> + <mrow><mn>X</mn></mrow> + </mfrac> + </mrow> + <mrow> + <mn>X</mn> + </mrow> + </mfrac> + </mstyle> + </math> + + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mfrac");</script> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-015-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-015-ref.html new file mode 100644 index 0000000000..2e375c6886 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-015-ref.html @@ -0,0 +1,58 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>displaystyle and display</title> + </head> + <body> + <math> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </math> + <math displaystyle="true"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </math> + <math display="inline" displaystyle="true"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </math> + <math display="block" displaystyle="true"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </math> + <math displaystyle="false"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </math> + <math display="inline" displaystyle="false"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </math> + <math display="block" displaystyle="false"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </math> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-015.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-015.html new file mode 100644 index 0000000000..e4a747fb20 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-015.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>displaystyle and display</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> + <link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle"> + <link rel="help" href="https://w3c.github.io/mathml-core/#the-top-level-math-element"> + <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover"> + <link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo"> + <link rel="help" href="https://w3c.github.io/mathml-core/#operator-dictionary"> + <link rel="match" href="displaystyle-015-ref.html"/> + <meta name="assert" content="Test interaction of math@display and displaystyle on an operator with movablelimits"> + </head> + <body> + <math> + <mstyle displaystyle="false"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </mstyle> + </math> + <math> + <mstyle displaystyle="true"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </mstyle> + </math> + <math display="inline"> + <mstyle displaystyle="true"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </mstyle> + </math> + <math display="block"> + <mstyle displaystyle="true"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </mstyle> + </math> + <math> + <mstyle displaystyle="false"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </mstyle> + </math> + <math display="inline"> + <mstyle displaystyle="false"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </mstyle> + </math> + <math display="block"> + <mstyle displaystyle="false"> + <munderover> + <mo>∑</mo> + <mi>b</mi> + <mi>c</mi> + </munderover> + </mstyle> + </math> + + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_movablelimits");</script> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-1.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-1.html new file mode 100644 index 0000000000..26aed81d03 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-1.html @@ -0,0 +1,136 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>displaystyle</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-math-style-property"> +<meta name="assert" content="Verify that the correct inheritance of the displaystyle value by measuring the size of large operators."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/largeop-displayoperatorminheight5000.woff"); + } + math { + font-family: TestFont; + font-size: 10px; + } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/attribute-values.js"></script> +<script src="/mathml/support/fonts.js"></script> +<script> + setup({ explicit_done: true }); + var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000 + var epsilon = 5; + function verify_displaystyle(elementId, displaystyle, description) { + var expectedSize = (displaystyle ? 5000 : 1000) * emToPx; + var elementSize = document.getElementById(elementId). + getBoundingClientRect().height; + assert_approx_equals(elementSize, expectedSize, epsilon, description); + } + + window.addEventListener("load", () => { loadAllFonts().then(runTests); }); + + function runTests() { + for (transform in AttributeValueTransforms) { + TransformAttributeValues(transform, ["display", "displaystyle"]); + test(function() { + verify_displaystyle("math_default", false, "default"); + verify_displaystyle("math_false", false, "explicit displaystyle false"); + verify_displaystyle("math_true", true, "explicit displaystyle true"); + }, `math element (${transform})`); + test(function() { + verify_displaystyle("math_inline", false, "explicit display inline"); + verify_displaystyle("math_block", true, "explicit display block"); + verify_displaystyle("math_block_false", false, "explicit display block and displaystyle false"); + verify_displaystyle("math_block_true", true, "explicit display block and displaystyle true"); + verify_displaystyle("math_inline_false", false, "explicit display inline and displaystyle false"); + verify_displaystyle("math_inline_true", true, "explicit display inline and displaystyle true"); + }, `math element (explicit display, ${transform})`); + test(function() { + verify_displaystyle("mstyle_false", false, "explicit displaystyle false"); + verify_displaystyle("mstyle_true", true, "explicit displaystyle true"); + }, `mstyle element (${transform})`); + test(function() { + verify_displaystyle("mtable_default", false, "default"); + verify_displaystyle("mtable_false", false, "explicit displaystyle false"); + verify_displaystyle("mtable_true", true, "explicit displaystyle true"); + }, `mtable element (${transform})`); + test(function() { + verify_displaystyle("mfrac_sibling", true, "sibling"); + verify_displaystyle("mfrac_numerator", false, "numerator"); + verify_displaystyle("mfrac_denominator", false, "denominator"); + }, `mfrac element (${transform})`); + test(function() { + verify_displaystyle("mroot_base", true, "base"); + verify_displaystyle("mroot_index", false, "index"); + }, `mroot element (${transform})`); + test(function() { + verify_displaystyle("msub_base", true, "base"); + verify_displaystyle("msub_subscript", false, "subscript"); + }, `msub element (${transform})`); + test(function() { + verify_displaystyle("msup_base", true, "base"); + verify_displaystyle("msup_supscript", false, "supscript"); + }, `msup element (${transform})`); + test(function() { + verify_displaystyle("msubsup_base", true, "base"); + verify_displaystyle("msubsup_subscript", false, "subscript"); + verify_displaystyle("msubsup_supscript", false, "supscript"); + }, `msubsup element (${transform})`); + test(function() { + verify_displaystyle("munder_base", true, "base"); + verify_displaystyle("munder_underscript", false, "underscript"); + }, `munder element (${transform})`); + test(function() { + verify_displaystyle("mover_base", true, "base"); + verify_displaystyle("mover_overscript", false, "overscript"); + }, `mover element (${transform})`); + test(function() { + verify_displaystyle("munderover_base", true, "base"); + verify_displaystyle("munderover_underscript", false, "underscript"); + verify_displaystyle("munderover_overscript", false, "overscript"); + }, `munderover element (${transform})`); + } + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <math><mo id="math_default">⫿</mo></math> + <math display="inline"><mo id="math_inline">⫿</mo></math> + <math display="block"><mo id="math_block">⫿</mo></math> + <math displaystyle="false"><mo id="math_false">⫿</mo></math> + <math displaystyle="true"><mo id="math_true">⫿</mo></math> + <math display="block" displaystyle="false"> + <mo id="math_block_false">⫿</mo> + </math> + <math display="block" displaystyle="true"> + <mo id="math_block_true">⫿</mo> + </math> + <math display="inline" displaystyle="false"> + <mo id="math_inline_false">⫿</mo> + </math> + <math display="inline" displaystyle="true"> + <mo id="math_inline_true">⫿</mo> + </math> + <math><mstyle displaystyle="false"><mo id="mstyle_false">⫿</mo></mstyle></math> + <math><mstyle displaystyle="true"><mo id="mstyle_true">⫿</mo></mstyle></math> + <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"><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> + <math displaystyle="true"><msubsup><mo id="msubsup_base">⫿</mo><mo id="msubsup_subscript">⫿</mo><mo id="msubsup_supscript">⫿</mo></msubsup></math> + <math displaystyle="true"><mmultiscripts><mo id="mmultiscripts_base">⫿</mo><mo id="mmultiscripts_subscript">⫿</mo><mo id="mmultiscripts_supscript">⫿</mo><mprescripts/><mo id="mmultiscripts_presubscript">⫿</mo><mo id="mmultiscripts_presupscript">⫿</mo></mmultiscripts></math> + <math displaystyle="true"><munder><mo id="munder_base">⫿</mo><mo id="munder_underscript">⫿</mo></munder></math> + <math displaystyle="true"><mover><mo id="mover_base">⫿</mo><mo id="mover_overscript">⫿</mo></mover></math> + <math displaystyle="true"><munderover><mo id="munderover_base">⫿</mo><mo id="munderover_underscript">⫿</mo><mo id="munderover_overscript">⫿</mo></munderover></math> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-2.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-2.html new file mode 100644 index 0000000000..68566cfc25 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-2.html @@ -0,0 +1,208 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>displaystyle</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-math-style-property"> +<meta name="assert" content="Verify interaction between automatic displaystyle and specified displaystyle on descendants."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/largeop-displayoperatorminheight5000.woff"); + } + math, math * { + font-family: TestFont; + font-size: 10px; + } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/attribute-values.js"></script> +<script src="/mathml/support/fonts.js"></script> +<script> + setup({ explicit_done: true }); + var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000 + var epsilon = 5; + function verify_displaystyle(elementId, displaystyle, description) { + var expectedSize = (displaystyle ? 5000 : 1000) * emToPx; + var elementSize = document.getElementById(elementId). + getBoundingClientRect().height; + assert_approx_equals(elementSize, expectedSize, epsilon, description); + } + + window.addEventListener("load", () => { loadAllFonts().then(runTests); }); + + function runTests() { + for (transform in AttributeValueTransforms) { + TransformAttributeValues(transform, ["display", "displaystyle"]); + test(function() { + verify_displaystyle("cell_false", false, "cell with displaystyle false"); + verify_displaystyle("cell_true", true, "cell with displaystyle true"); + }, `mtable element (${transform})`); + test(function() { + verify_displaystyle("mfrac_numerator", true, "numerator"); + verify_displaystyle("mfrac_denominator", true, "denominator"); + }, `mfrac element (${transform})`); + test(function() { + verify_displaystyle("mroot_base", false, "base"); + verify_displaystyle("mroot_index", true, "index"); + }, `mroot element (${transform})`); + test(function() { + verify_displaystyle("msub_base", false, "base"); + verify_displaystyle("msub_subscript", true, "subscript"); + }, `msub element (${transform})`); + test(function() { + verify_displaystyle("msup_base", false, "base"); + verify_displaystyle("msup_superscript", true, "superscript"); + }, `msup element (${transform})`); + test(function() { + verify_displaystyle("msubsup_base", false, "base"); + verify_displaystyle("msubsup_subscript", true, "subscript"); + verify_displaystyle("msubsup_superscript", true, "superscript"); + }, `msubsup element (${transform})`); + test(function() { + verify_displaystyle("munder_base", false, "base"); + verify_displaystyle("munder_underscript", true, "underscript"); + }, `munder element (${transform})`); + test(function() { + verify_displaystyle("mover_base", false, "base"); + verify_displaystyle("mover_overscript", true, "overscript"); + }, `mover element (${transform})`); + test(function() { + verify_displaystyle("munderover_base", false, "base"); + verify_displaystyle("munderover_underscript", true, "underscript"); + verify_displaystyle("munderover_overscript", true, "overscript"); + }, `munderover element (${transform})`); + } + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <math displaystyle="true"> + <mtable> + <mtr> + <mtd> + <mstyle displaystyle="false"> + <mo id="cell_false">⫿</mo> + </mstyle> + </mtd> + <mtd> + <mstyle displaystyle="true"> + <mo id="cell_true">⫿</mo> + </mstyle> + </mtd> + </mtr> + </mtable> + </math> + <math> + <mfrac> + <mstyle displaystyle="true"> + <mo id="mfrac_numerator">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="mfrac_denominator">⫿</mo> + </mstyle> + </mfrac> + </math> + <math displaystyle="true"> + <mroot> + <mstyle displaystyle="false"> + <mo id="mroot_base">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="mroot_index">⫿</mo> + </mstyle> + </mroot> + </math> + <math displaystyle="true"> + <msub> + <mstyle displaystyle="false"> + <mo id="msub_base">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="msub_subscript">⫿</mo> + </mstyle> + </msub> + </math> + <math displaystyle="true"> + <msup> + <mstyle displaystyle="false"> + <mo id="msup_base">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="msup_superscript">⫿</mo> + </mstyle> + </msup> + </math> + <math displaystyle="true"> + <msubsup> + <mstyle displaystyle="false"> + <mo id="msubsup_base">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="msubsup_subscript">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="msubsup_superscript">⫿</mo> + </mstyle> + </msubsup> + </math> + <math displaystyle="true"> + <mmultiscripts> + <mstyle displaystyle="false"> + <mo id="mmultiscripts_base">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="mmultiscripts_subscript">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="mmultiscripts_superscript">⫿</mo> + </mstyle> + <mprescripts/> + <mstyle displaystyle="true"> + <mo id="mmultiscripts_presubscript">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="mmultiscripts_presuperscript">⫿</mo> + </mstyle> + </mmultiscripts> + </math> + <math displaystyle="true"> + <munder> + <mstyle displaystyle="false"> + <mo id="munder_base">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="munder_underscript">⫿</mo> + </mstyle> + </munder> + </math> + <math displaystyle="true"> + <mover> + <mstyle displaystyle="false"> + <mo id="mover_base">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="mover_overscript">⫿</mo> + </mstyle> + </mover> + </math> + <math displaystyle="true"> + <munderover> + <mstyle displaystyle="false"> + <mo id="munderover_base">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="munderover_underscript">⫿</mo> + </mstyle> + <mstyle displaystyle="true"> + <mo id="munderover_overscript">⫿</mo> + </mstyle> + </munderover> + </math> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-3.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-3.html new file mode 100644 index 0000000000..a5bcab2aaa --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-3.html @@ -0,0 +1,84 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>displaystyle</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-math-style-property"> +<meta name="assert" content="Verify the displaystyle of the underover element is considered (not the one of its base) to determine whether to move limits."> +<link rel="stylesheet" href="/fonts/ahem.css"> +<style> + math, math * { + font-family: Ahem; + font-size: 20px; + } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/fonts.js"></script> +<script> + setup({ explicit_done: true }); + window.addEventListener("load", () => { loadAllFonts().then(runTests); }); + function runTests() { + ["munder", "mover", "munderover"].forEach((tag) => { + Array.from(document.getElementsByTagName(tag)).forEach(e => { + var displaystyle = e.getAttribute('displaystyle') === "true"; + test(function() { + assert_true(MathMLFeatureDetection.has_movablelimits()); + var elementRight = e.getBoundingClientRect().right; + var baseRight = e.firstElementChild.getBoundingClientRect().right; + if (displaystyle) + assert_approx_equals(elementRight, baseRight, 1); + else + assert_greater_than(elementRight, baseRight + 10); + }, `movablelimits for ${tag} element (displaystyle=${displaystyle})`); + }); + }); + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <math> + <munder displaystyle="false"> + <mo displaystyle="true" movablelimits="true">XX</mo> + <mtext>X</mtext> + </munder> + </math> + <math> + <mover displaystyle="false"> + <mo displaystyle="true" movablelimits="true">XX</mo> + <mtext>X</mtext> + </mover> + </math> + <math> + <munderover displaystyle="false"> + <mo displaystyle="true" movablelimits="true">XX</mo> + <mtext>X</mtext> + <mtext>X</mtext> + </munderover> + </math> + <math> + <munder displaystyle="true"> + <mo displaystyle="false" movablelimits="true">XX</mo> + <mtext>X</mtext> + </munder> + </math> + <math> + <mover displaystyle="true"> + <mo displaystyle="false" movablelimits="true">XX</mo> + <mtext>X</mtext> + </mover> + </math> + <math> + <munderover displaystyle="true"> + <mo displaystyle="false" movablelimits="true">XX</mo> + <mtext>X</mtext> + <mtext>X</mtext> + </munderover> + </math> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/dynamic-dir-1-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/dynamic-dir-1-ref.html new file mode 100644 index 0000000000..111ea79e24 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/dynamic-dir-1-ref.html @@ -0,0 +1,75 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <title>Test dynamically changing dir attribute</title> +</head> +<body> + <p> + math: + <math dir="rtl"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </math> + <math dir="rtl"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </math> + <math> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </math> + </p> + <p> + mstyle: + <math> + <mstyle dir="rtl"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mstyle> + </math> + <math> + <mstyle dir="rtl"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mstyle> + </math> + <math> + <mstyle> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mstyle> + </math> + </p> + <p> + mrow: + <math> + <mrow dir="rtl"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mrow> + </math> + <math> + <mrow dir="rtl"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mrow> + </math> + <math> + <mrow> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mrow> + </math> + </p> +</body> +</html>
\ No newline at end of file diff --git a/testing/web-platform/tests/mathml/relations/css-styling/dynamic-dir-1.html b/testing/web-platform/tests/mathml/relations/css-styling/dynamic-dir-1.html new file mode 100644 index 0000000000..d97505eff1 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/dynamic-dir-1.html @@ -0,0 +1,105 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <meta charset="utf-8"> + <title>Test dynamically changing dir attribute</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> + <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/#dom-and-javascript"> + <meta name="assert" content="The dir attribute should update direction map to css properties dynamically"> + <link rel="match" href="dynamic-dir-1-ref.html"> + <script> + window.addEventListener("load", () => { + + // force initial layout so we're sure what we're testing against + document.documentElement.getBoundingClientRect(); + + ["math", "mstyle", "mrow"].forEach((tag) => { + let elements = document.getElementsByTagName(tag); + + // set an explicit rtl where there was none + elements[0].setAttribute("dir", "rtl"); + + // change explicit ltr to rtl + elements[1].setAttribute("dir", "rtl"); + + // remove an explicitly set dir="rtl" + elements[2].removeAttribute("dir"); + + }) + + document.documentElement.classList.remove('reftest-wait'); + }) + </script> +</head> +<body> + <p> + math: + <math> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </math> + <math dir="ltr"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </math> + <math dir="rtl"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </math> + </p> + <p> + mstyle: + <math> + <mstyle> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mstyle> + </math> + <math> + <mstyle dir="ltr"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mstyle> + </math> + <math> + <mstyle dir="rtl"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mstyle> + </math> + </p> + <p> + mrow: + <math> + <mrow> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mrow> + </math> + <math> + <mrow dir="ltr"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mrow> + </math> + <math> + <mrow dir="rtl"> + <mi>a</mi> + <mi>b</mi> + <mi>c</mi> + </mrow> + </math> + </p> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_dir");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-inside-mathml-with-block-display-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-inside-mathml-with-block-display-ref.html new file mode 100644 index 0000000000..8f25c9db06 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-inside-mathml-with-block-display-ref.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>floating inside display: block MathML (reference)</title> +</head> +<body> + <p>Test passes if you see a blue square on the left and a smaller magenta square on the right.</p> + <div> + <div style="display: block"> + <div style="display: inline-block; width: 50px; height: 50px; background: magenta"></div><div style="float: left; display: inline-block; width: 100px; height: 100px; background: blue"></div> + </div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-inside-mathml-with-block-display.html b/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-inside-mathml-with-block-display.html new file mode 100644 index 0000000000..f398094e15 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-inside-mathml-with-block-display.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>floating inside display: block MathML</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="match" href="floating-inside-mathml-with-block-display-ref.html"/> +<meta name="assert" content="Verify that float works within a display: block MathML element."> +</head> +<body> + <p>Test passes if you see a blue square on the left and a smaller magenta square on the right.</p> + <math> + <mrow style="display: block"> + <mspace style="display: inline-block; width: 50px; height: 50px; background: magenta"/><mspace style="float: left; display: inline-block; width: 100px; height: 100px; background: blue"/> + </mrow> + </math> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-math-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-math-ref.html new file mode 100644 index 0000000000..c82f395644 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-math-ref.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>floating math (reference)</title> +</head> +<body> + <p>Test passes if you see a blue square on the left and a smaller magenta square on the right.</p> + <div> + <div style="display: inline-block; width: 50px; height: 50px; background: magenta"></div> + <div style="float: left"><div style="width: 100px; height: 100px; background: blue"></div></div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-math.html b/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-math.html new file mode 100644 index 0000000000..1de54ccdcf --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/floats/floating-math.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>floating math</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="match" href="floating-math-ref.html"/> +<meta name="assert" content="Verify that float applies to the <math> element."> +</head> +<body> + <p>Test passes if you see a blue square on the left and a smaller magenta square on the right.</p> + <div> + <div style="display: inline-block; width: 50px; height: 50px; background: magenta"></div> + <math style="float: left"><mspace width="100px" height="100px" style="background: blue"/></math> + </div> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/floats/not-floating-001.html b/testing/web-platform/tests/mathml/relations/css-styling/floats/not-floating-001.html new file mode 100644 index 0000000000..7166dea5f8 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/floats/not-floating-001.html @@ -0,0 +1,74 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>float property in math layout</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#user-agent-stylesheet"> +<meta name="assert" content="Assert that float property is ignored for most math layout"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script src="/mathml/support/layout-comparison.js"></script> +<style> + /* .element class defined in mathml-fragments.js */ + .element > * { + padding: 10px; + background: black; + } + /* override display: none on children of maction/semantics */ + maction > *, semantics > * { + display: math; + } +</style> +</head> +<body> + <div id="log"></div> + <div id="container"></div> + + <script> + let container = document.getElementById("container"); + for (tag in MathMLFragments) { + if (!FragmentHelper.isValidChildOfMrow(tag) || + FragmentHelper.isEmpty(tag)) + continue; + + // Skip mtable since it does not use display: math. + if (tag == "mtable") + continue; + + document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\ +<div style="display: inline-block"><math>${MathMLFragments[tag]}</math></div>\ +<div style="display: inline-block"><math>${MathMLFragments[tag]}</math></div>\ +</div>`); + let div = document.body.lastElementChild; + let element = + FragmentHelper.element(div.firstElementChild); + let reference = + FragmentHelper.element(div.lastElementChild); + [element, reference].forEach(parent => { + if (parent.classList.contains("mathml-container") || + parent.classList.contains("foreign-container")) { + FragmentHelper.appendChild(parent); + FragmentHelper.appendChild(parent); + FragmentHelper.appendChild(parent); + } + }); + + // Try to use float to invert the order in which children are normally + // laid out. + function layoutChildrenFromLeftToRight(tag) { tag != 'mroot'; } + element.firstElementChild.style = + `float: ${layoutChildrenFromLeftToRight(tag) ? 'right' : 'left'};`; + element.lastElementChild.style = + `float: ${layoutChildrenFromLeftToRight(tag) ? 'left' : 'right'};`; + + test(function () { + let epsilon = 1; + compareLayout(element, reference, epsilon); + }, `float child ignored in ${tag}`); + + div.style = "display: none;"; // Hide the div after measurement. + } + </script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/ignored-properties-001.html b/testing/web-platform/tests/mathml/relations/css-styling/ignored-properties-001.html new file mode 100644 index 0000000000..0966d96917 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/ignored-properties-001.html @@ -0,0 +1,81 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Ignored CSS properties</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<meta name="assert" content="Verify style with ignored properties does not affect MathML layout."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/layout-comparison.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + + for (tag in MathMLFragments) { + if (!FragmentHelper.isValidChildOfMrow(tag)) + continue; + + var ignoredProperties = [ + "writing-mode: vertical-rl;", + "white-space: normal;", + "float: right;", + "align-content: end; justify-content: end;", + "align-self: end; justify-self: end;", + ]; + if (tag !== "mtable") { + ignoredProperties.push("width: 100px !important; height: 200px !important;"); + } + + ignoredProperties.forEach(ignoredStyle => { + document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\ +<div style="display: inline-block"><math>${MathMLFragments[tag]}</math></div>\ +<div style="display: inline-block"><math>${MathMLFragments[tag]}</math></div>\ +</div>`); + var div = document.body.lastElementChild; + + // Create MathML structure with ignored style properties. + var elementContainer = div.firstElementChild; + var elementContainerWidth = elementContainer.getBoundingClientRect().width; + var element = FragmentHelper.element(elementContainer); + if (!FragmentHelper.isEmpty(tag)) + FragmentHelper.forceNonEmptyDescendants(element); + element.setAttribute("style", ignoredStyle); + Array.from(element.getElementsByTagNameNS("*", FragmentHelper.mathml_namespace)).forEach(descendant => { + descendant.setAttribute("style", ignoredStyle); + }); + + var referenceContainer = div.lastElementChild; + var referenceContainerWidth = referenceContainer.getBoundingClientRect().width; + var reference = FragmentHelper.element(referenceContainer); + if (!FragmentHelper.isEmpty(tag)) + FragmentHelper.forceNonEmptyDescendants(reference); + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + assert_approx_equals(elementContainerWidth, referenceContainerWidth, epsilon); + }, `${tag} preferred width calculation is not affected by ${ignoredStyle}`); + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + compareLayout(element, reference, epsilon); + }, `${tag} layout is not affected by ${ignoredStyle}`); + + div.style = "display: none;"; // Hide the div after measurement. + }); + } + + done(); + } +</script> +</head> +<body> + <div id="log"></div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptminsize-attribute-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptminsize-attribute-ref.html new file mode 100644 index 0000000000..8e3d7b1c21 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptminsize-attribute-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>legacy scriptminsize attribute (reference)</title> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> + math { + /* Ahem font does not have a MATH table so the font-size scale factor + is always 0.71^{computed - inherited math script level} */ + font: 100px/1 Ahem; + } +</style> +</head> +<body> + <p>Test passes if you see a square of size 71px.</p> + <div> + <math> + <mstyle> + <mstyle scriptlevel="1"> + <mn>X</mn> + </mstyle> + </mstyle> + </math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptminsize-attribute.html b/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptminsize-attribute.html new file mode 100644 index 0000000000..0ce87b6147 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptminsize-attribute.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>legacy scriptminsize attribute</title> +<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.mstyle.attrs"> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="match" href="legacy-scriptminsize-attribute-ref.html"/> +<meta name="assert" content="Verify scriptminsize attribute is no longer parsed."> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> + math { + /* Ahem font does not have a MATH table so the font-size scale factor + is always 0.71^{computed - inherited math script level} */ + font: 100px/1 Ahem; + } +</style> +</head> +<body> + <p>Test passes if you see a square of size 71px.</p> + <div> + <math> + <mstyle scriptminsize="100px"> + <mstyle scriptlevel="1"> + <mn>X</mn> + </mstyle> + </mstyle> + </math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptsizemultiplier-attribute-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptsizemultiplier-attribute-ref.html new file mode 100644 index 0000000000..422325da28 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptsizemultiplier-attribute-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>legacy scriptsizemultiplier attribute (reference)</title> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> + math { + /* Ahem font does not have a MATH table so the font-size scale factor + is always 0.71^{computed - inherited math script level} */ + font: 100px/1 Ahem; + } +</style> +</head> +<body> + <p>Test passes if you see a square of size 71px.</p> + <div> + <math> + <mstyle> + <mstyle scriptlevel="1"> + <mn>X</mn> + </mstyle> + </mstyle> + </math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptsizemultiplier-attribute.html b/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptsizemultiplier-attribute.html new file mode 100644 index 0000000000..9a955612bc --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/legacy-scriptsizemultiplier-attribute.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>legacy scriptsizemultiplier attribute</title> +<link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.mstyle.attrs"> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="match" href="legacy-scriptsizemultiplier-attribute-ref.html"/> +<meta name="assert" content="Verify scriptsizemultiplier attribute is no longer parsed."> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> + math { + /* Ahem font does not have a MATH table so the font-size scale factor + is always 0.71^{computed - inherited math script level} */ + font: 100px/1 Ahem; + } +</style> +</head> +<body> + <p>Test passes if you see a square of size 71px.</p> + <div> + <math> + <mstyle scriptsizemultiplier="1"> + <mstyle scriptlevel="1"> + <mn>X</mn> + </mstyle> + </mstyle> + </math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/lengths-1-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/lengths-1-ref.html new file mode 100644 index 0000000000..9fca6f4963 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/lengths-1-ref.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>MathML lengths (reference)</title> +</head> +<body> + <p>Test passes if there is a green square and no red.</p> + <div> + <div id="red" style="position: absolute; width: 200px; height: 200px; background: green;"> + </div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/lengths-1.html b/testing/web-platform/tests/mathml/relations/css-styling/lengths-1.html new file mode 100644 index 0000000000..896f08d111 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/lengths-1.html @@ -0,0 +1,122 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>MathML lengths</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#types-for-mathml-attribute-values"> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#space-mspace"> +<link rel="match" href="lengths-1-ref.html"/> +<meta name="assert" content="Verify whether the different units are accepted for MathML lengths."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/xheight500.woff"); + } + span, math { + font-family: TestFont; + font-size: 10px; /* 1em = 10px, 1ex is about 5px */ + } + span { + position: absolute; + display: inline-block; + height: 10px; + } + #red > span { + background: red; + } + #green > span { + background: green; + } +</style> +</head> +<body> + <p>Test passes if there is a green square and no red.</p> + <div> + <div id="red" style="position: absolute; width: 200px; height: 200px; background: green;"> + <!-- px --> + <span style="top: 0px"><math><mspace width="200px"/></math></span> + <span style="top: 10px; width: 200px"></span> + + <!-- cm --> + <span style="top: 20px"><math><mspace width="5.08cm"/></math></span> + <span style="top: 30px; width: 192px"></span> + + <!-- em --> + <span style="top: 40px"><math><mspace width="20em"/></math></span> + <span style="top: 50px; width: 200px"></span> + + <!-- ex --> + <span style="top: 60px"><math><mspace width="30ex"/></math></span> + <span style="top: 70px; width: 30ex"></span> + + <!-- in --> + <span style="top: 80px"><math><mspace width="2in"/></math></span> + <span style="top: 90px; width: 192px"></span> + + <!-- mm --> + <span style="top: 100px"><math><mspace width="50.8mm"/></math></span> + <span style="top: 110px; width: 192px"></span> + + <!-- pc --> + <span style="top: 120px"><math><mspace width="12.5pc"/></math></span> + <span style="top: 130px; width: 200px"></span> + + <!-- pt --> + <span style="top: 140px"><math><mspace width="150pt"/></math></span> + <span style="top: 150px; width: 200px"></span> + + <!-- % --> + <span style="top: 160px"><math><mstyle mathsize="2000%"><mspace width="1em"/></mstyle></math></span> + <span style="top: 170px; width: 200px"></span> + + <!-- unitless nonzero values should be ignored --> + <span style="top: 180px"><math><mstyle mathsize="20.0"><mspace width="1em"/></mstyle></math></span> + <span style="top: 190px; width: 10px"></span> + </div> + + <div id="green" style="position: absolute; width: 200px; height: 200px;"> + <!-- px --> + <span style="top: 10px"><math><mspace width="200px"/></math></span> + <span style="top: 0px; width: 200px"></span> + + <!-- cm --> + <span style="top: 30px"><math><mspace width="5.08cm"/></math></span> + <span style="top: 20px; width: 192px"></span> + + <!-- em --> + <span title="em" style="top: 50px"><math><mspace width="20em"/></math></span> + <span title="em" style="top: 40px; width: 200px"></span> + + <!-- ex --> + <span title="ex" style="top: 70px"><math><mspace width="30ex"/></math></span> + <span title="ex" style="top: 60px; width: 30ex"></span> + + <!-- in --> + <span style="top: 90px"><math><mspace width="2in"/></math></span> + <span style="top: 80px; width: 192px"></span> + + <!-- mm --> + <span style="top: 110px"><math><mspace width="50.8mm"/></math></span> + <span style="top: 100px; width: 192px"></span> + + <!-- pc --> + <span style="top: 130px"><math><mspace width="12.5pc"/></math></span> + <span style="top: 120px; width: 200px"></span> + + <!-- pt --> + <span style="top: 150px"><math><mspace width="150pt"/></math></span> + <span style="top: 140px; width: 200px"></span> + + <!-- % --> + <span style="top: 170px"><math><mstyle mathsize="2000%"><mspace width="1em"/></mstyle></math></span> + <span style="top: 160px; width: 200px"></span> + + <!-- unitless nonzero values should be ignored --> + <span style="top: 190px"><math><mstyle mathsize="20.0"><mspace width="1em"/></mstyle></math></span> + <span style="top: 180px; width: 10px"></span> + </div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/lengths-2.html b/testing/web-platform/tests/mathml/relations/css-styling/lengths-2.html new file mode 100644 index 0000000000..942611a8da --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/lengths-2.html @@ -0,0 +1,266 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>MathML lengths</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#types-for-mathml-attribute-values"> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#space-mspace"> +<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> +<script src="/mathml/support/fonts.js"></script> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/xheight500.woff"); + } + math { + font-family: TestFont; + font-size: 10px; + } +</style> +<script> + var epsilon = .5; + + function getBox(aId) { + return document.getElementById(aId).getBoundingClientRect(); + } + + setup({ explicit_done: true }); + window.addEventListener("load", () => { loadAllFonts().then(runTests); }); + + 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"); + assert_equals(getBox("unitIn").width, 288, "in"); + assert_equals(getBox("unitMm").width, 576, "mm"); + assert_equals(getBox("unitPc").width, 96, "pc"); + assert_equals(getBox("unitPercentage").width, 60, "%"); + assert_equals(getBox("unitPt").width, 96, "pt"); + assert_equals(getBox("unitPx").width, 123, "px"); + }, "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"); + assert_equals(getBox("spaceIn").width, 288, "in"); + assert_equals(getBox("spaceMm").width, 576, "mm"); + assert_equals(getBox("spacePc").width, 96, "pc"); + assert_equals(getBox("spacePercentage").width, 60, "%"); + assert_equals(getBox("spacePt").width, 96, "pt"); + assert_equals(getBox("spacePx").width, 123, "px"); + }, "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"); + assert_approx_equals(getBox("n4").width, 650, epsilon, "n4"); + assert_approx_equals(getBox("n5").width, 4320, epsilon, "n5"); + assert_approx_equals(getBox("n6").width, 1, epsilon, "n6"); + assert_approx_equals(getBox("n7").width, 8, epsilon, "n7"); + assert_approx_equals(getBox("n8").width, 65, epsilon, "n8"); + assert_approx_equals(getBox("n9").width, 432, epsilon, "n9"); + assert_approx_equals(getBox("n10").width, 123, epsilon, "n10"); + }, "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"); + assert_approx_equals(topRef - getBox("N2").top, -8, epsilon, "N2"); + assert_approx_equals(topRef - getBox("N4").top, -650, epsilon, "N4"); + assert_approx_equals(topRef - getBox("N5").top, -4320, epsilon, "N5"); + assert_approx_equals(topRef - getBox("N6").top, -1, epsilon, "N6"); + assert_approx_equals(topRef - getBox("N7").top, -8, epsilon, "N7"); + assert_approx_equals(topRef - getBox("N8").top, -65, epsilon, "N8"); + assert_approx_equals(topRef - getBox("N9").top, -432, epsilon, "N9"); + assert_approx_equals(topRef - getBox("N10").top, -123, epsilon, "N10"); + }, "Non-positive numbers"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + // Namedspace values are invalid in MathML Core. + ["veryverythinmathspace", + "verythinmathspace", + "thinmathspace", + "mediummathspace", + "thickmathspace", + "verythickmathspace", + "veryverythickmathspace", + "negativeveryverythinmathspace", + "negativeverythinmathspace", + "negativethinmathspace", + "negativemediummathspace", + "negativethickmathspace", + "negativeverythickmathspace", + "negativeveryverythickmathspace" + ].forEach(function(space) { + var mrow = document.getElementById(space); + var boxBefore = mrow.firstElementChild.getBoundingClientRect(); + var boxAfter = mrow.lastElementChild.getBoundingClientRect(); + assert_equals(boxAfter.left - boxBefore.right, 0, space); + }); + }, "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"); + var topRef = getBox("ref").top; + assert_approx_equals(topRef - getBox("N3").top, 0, epsilon, "N3"); + }, "Legacy numbers"); + + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <p> + <math> + <mspace id="unitCm" width="2.54cm"/> + <mspace id="unitEm" width="12em"/> + <mspace id="unitEx" width="100ex"/> + <mspace id="unitIn" width="3in"/> + <mspace id="unitMm" width="152.4mm"/> + <mspace id="unitPc" width="6pc"/> + <mstyle mathsize="200%"><mspace id="unitPercentage" width="3em"/></mstyle> + <mspace id="unitPt" width="72pt"/> + <mspace id="unitPx" width="123px"/> + <mstyle mathsize="5"><mspace id="unitNone" width="3em"/></mstyle> + </math> + </p> + <p> + <math> + <mspace id="spaceCm" width=" 	

 	

2.54cm 	

 	

"/> + <mspace id="spaceEm" width=" 	

 	

12em 	

 	

"/> + <mspace id="spaceEx" width=" 	

 	

100ex 	

 	

"/> + <mspace id="spaceIn" width=" 	

 	

3in 	

 	

"/> + <mspace id="spaceMm" width=" 	

 	

152.4mm 	

 	

"/> + <mspace id="spacePc" width=" 	

 	

6pc 	

 	

"/> + <mstyle mathsize="200%"><mspace id="spacePercentage" width=" 	

 	

3em 	

 	

"/></mstyle> + <mspace id="spacePt" width=" 	

 	

72pt 	

 	

"/> + <mspace id="spacePx" width=" 	

 	

123px 	

 	

"/> + </math> + </p> + <p> + <math> + <mspace id="n0" width="0em"/> + <mspace id="n1" width="9em"/> + <mspace id="n2" width=".8em"/> + <mspace id="n3" width="7.em"/> + <mspace id="n4" width="65em"/> + <mspace id="n5" width="432em"/> + <mspace id="n6" width=".10em"/> + <mspace id="n7" width=".789em"/> + <mspace id="n8" width="6.5em"/> + <mspace id="n9" width="43.21em"/> + <mspace id="n10" width="012.345em"/> + </math> + </p> + <p> + <math> + <mspace id="ref"></mspace> + <mpadded voffset="-0em"><mspace id="N0"/></mpadded> + <mpadded voffset="-9em"><mspace id="N1"/></mpadded> + <mpadded voffset="-.8em"><mspace id="N2"/></mpadded> + <mpadded voffset="-7.em"><mspace id="N3"/></mpadded> + <mpadded voffset="-65em"><mspace id="N4"/></mpadded> + <mpadded voffset="-432em"><mspace id="N5"/></mpadded> + <mpadded voffset="-.10em"><mspace id="N6"/></mpadded> + <mpadded voffset="-.789em"><mspace id="N7"/></mpadded> + <mpadded voffset="-6.5em"><mspace id="N8"/></mpadded> + <mpadded voffset="-43.21em"><mspace id="N9"/></mpadded> + <mpadded voffset="-012.345em"><mspace id="N10"/></mpadded> + </math> + </p> + <p> + <math> + <mrow id="veryverythinmathspace"> + <mspace width="1em"/> + <mspace width="veryverythinmathspace"/> + <mspace/> + </mrow> + <mrow id="verythinmathspace"> + <mspace width="1em"/> + <mspace width="verythinmathspace"/> + <mspace/> + </mrow> + <mrow id="thinmathspace"> + <mspace width="1em"/> + <mspace width="thinmathspace"/> + <mspace/> + </mrow> + <mrow id="mediummathspace"> + <mspace width="1em"/> + <mspace width="mediummathspace"/> + <mspace/> + </mrow> + <mrow id="thickmathspace"> + <mspace width="1em"/> + <mspace width="thickmathspace"/> + <mspace/> + </mrow> + <mrow id="verythickmathspace"> + <mspace width="1em"/> + <mspace width="verythickmathspace"/> + <mspace/> + </mrow> + <mrow id="veryverythickmathspace"> + <mspace width="1em"/> + <mspace width="veryverythickmathspace"/> + <mspace/> + </mrow> + </math> + <math> + <mrow id="negativeveryverythinmathspace"> + <mspace width="1em"/> + <mspace width="veryverythinmathspace"/> + <mspace/> + </mrow> + <mrow id="negativeverythinmathspace"> + <mspace width="1em"/> + <mspace width="verythinmathspace"/> + <mspace/> + </mrow> + <mrow id="negativethinmathspace"> + <mspace width="1em"/> + <mspace width="thinmathspace"/> + <mspace/> + </mrow> + <mrow id="negativemediummathspace"> + <mspace width="1em"/> + <mspace width="mediummathspace"/> + <mspace/> + </mrow> + <mrow id="negativethickmathspace"> + <mspace width="1em"/> + <mspace width="thickmathspace"/> + <mspace/> + </mrow> + <mrow id="negativeverythickmathspace"> + <mspace width="1em"/> + <mspace width="verythickmathspace"/> + <mspace/> + </mrow> + <mrow id="negativeveryverythickmathspace"> + <mspace width="1em"/> + <mspace width="veryverythickmathspace"/> + <mspace/> + </mrow> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-001-notref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-001-notref.html new file mode 100644 index 0000000000..65e2781c5e --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-001-notref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathbackground on mrow (reference)</title> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mrow mathbackground="green"> + <mtext>□■□■□■□</mtext> + </mrow> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-001.html b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-001.html new file mode 100644 index 0000000000..e71fc53eaa --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-001.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathbackground on mrow</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://w3c.github.io/mathml-core/#horizontally-group-sub-expressions-mrow"> +<link rel="mismatch" href="mathbackground-001-notref.html"/> +<meta name="assert" content="mathbackground on a mrow has a visual effect."> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mrow mathbackground="red"> + <mtext>□■□■□■□</mtext> + </mrow> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-002-notref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-002-notref.html new file mode 100644 index 0000000000..8c984c2619 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-002-notref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathbackground on mstyle (reference)</title> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mstyle mathbackground="green"> + <mtext>□■□■□■□</mtext> + </mstyle> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-002.html b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-002.html new file mode 100644 index 0000000000..09407d9269 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-002.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathbackground on mstyle</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle"> +<link rel="mismatch" href="mathbackground-002-notref.html"/> +<meta name="assert" content="mathbackground on a mstyle has a visual effect."> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mstyle mathbackground="red"> + <mtext>□■□■□■□</mtext> + </mstyle> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-003-notref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-003-notref.html new file mode 100644 index 0000000000..b6adaa8d4e --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-003-notref.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathbackground on mtext (reference)</title> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mtext mathbackground="green">□■□■□■□</mtext> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-003.html b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-003.html new file mode 100644 index 0000000000..8cb11889db --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-003.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathbackground on mtext</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="mismatch" href="mathbackground-003-notref.html"/> +<meta name="assert" content="mathbackground on a mtext has a visual effect."> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mtext mathbackground="red">□■□■□■□</mtext> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-004-notref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-004-notref.html new file mode 100644 index 0000000000..75465a6c38 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-004-notref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathbackground on semantics (reference)</title> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <semantics mathbackground="red"> + <mtext>□■□■□■□</mtext> + </semantics> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-004.html b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-004.html new file mode 100644 index 0000000000..be174cdbde --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathbackground-004.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathbackground on semantics</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="mismatch" href="mathbackground-004-notref.html"/> +<meta name="assert" content="mathbackground on a semantics has a visual effect."> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <semantics mathbackground="green"> + <mtext>□■□■□■□</mtext> + </semantics> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-001-notref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-001-notref.html new file mode 100644 index 0000000000..9bc1ba5436 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-001-notref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathcolor on mrow (reference)</title> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mrow mathcolor="green"> + <mtext>□■□■□■□</mtext> + </mrow> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-001.html b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-001.html new file mode 100644 index 0000000000..2c463cac87 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-001.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathcolor on mrow</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://w3c.github.io/mathml-core/#horizontally-group-sub-expressions-mrow"> +<link rel="mismatch" href="mathcolor-001-notref.html"/> +<meta name="assert" content="mathcolor on a mrow has a visual effect."> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mrow mathcolor="red"> + <mtext>□■□■□■□</mtext> + </mrow> +</math> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-002-notref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-002-notref.html new file mode 100644 index 0000000000..5f9fd2bb9b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-002-notref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathcolor on mstyle (reference)</title> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mstyle mathcolor="green"> + <mtext>□■□■□■□</mtext> + </mstyle> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-002.html b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-002.html new file mode 100644 index 0000000000..147d41b46d --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-002.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathcolor on mstyle</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://w3c.github.io/mathml-core/#style-change-mstyle"> +<link rel="mismatch" href="mathcolor-002-notref.html"/> +<meta name="assert" content="mathcolor on a mstyle has a visual effect."> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mstyle mathcolor="red"> + <mtext>□■□■□■□</mtext> + </mstyle> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-003-notref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-003-notref.html new file mode 100644 index 0000000000..11e018ebc1 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-003-notref.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathcolor on mtext (reference)</title> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mtext mathcolor="green">□■□■□■□</mtext> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-003.html b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-003.html new file mode 100644 index 0000000000..5565b0d837 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-003.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathcolor on mtext</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="mismatch" href="mathcolor-003-notref.html"/> +<meta name="assert" content="mathcolor on a mtext has a visual effect."> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mtext mathcolor="red">□■□■□■□</mtext> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-004-notref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-004-notref.html new file mode 100644 index 0000000000..67a45249e5 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-004-notref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathcolor on semantics (reference)</title> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <semantics mathcolor="red"> + <mtext>□■□■□■□</mtext> + </semantics> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-004.html b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-004.html new file mode 100644 index 0000000000..3ea37fecdb --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-004.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>mathcolor on semantics</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="mismatch" href="mathcolor-004-notref.html"/> +<meta name="assert" content="mathcolor on a semantics has a visual effect."> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <semantics mathcolor="green"> + <mtext>□■□■□■□</mtext> + </semantics> +</math> + diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-mathbackground-css-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-mathbackground-css-ref.html new file mode 100644 index 0000000000..682fa64233 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-mathbackground-css-ref.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS color (reference)</title> +<link rel="stylesheet" href="/fonts/ahem.css"> +<style> + math { + font-family: Ahem; + font-size: 20px; + } +</style> +</style> +</head> +<body> + <p>Test passes if you see a green rectangle:</p> + <p> + <math mathbackground="#0f0" mathcolor="#0f0"> + <mtext>X X</mtext> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-mathbackground-css.html b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-mathbackground-css.html new file mode 100644 index 0000000000..2f53215346 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathcolor-mathbackground-css.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS color</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#types-for-mathml-attribute-values"> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="match" href="mathcolor-mathbackground-css-ref.html"/> +<link rel="stylesheet" href="/fonts/ahem.css"> +<meta name="assert" content="Verify that the mathcolor and mathbackground attributes use the CSS definition of colors."> +<style> + math { + font-family: Ahem; + font-size: 20px; + } +</style> +</style> +</head> +<body> + <p>Test passes if you see a green rectangle:</p> + <p style="color: red"> + <math mathbackground="rgb(0,255,0)" mathcolor="rgb(0,255,0)"> + <mtext>X X</mtext> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-css-keywords-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-css-keywords-ref.html new file mode 100644 index 0000000000..ebb12a6c6c --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-css-keywords-ref.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>mathsize and css keywords</title> + </head> + <body> + <p>Test passes if you see 14 "A" of equal size:</p> + <math> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + </math> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-css-keywords.html b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-css-keywords.html new file mode 100644 index 0000000000..2daed4cdea --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-css-keywords.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>mathsize and css keywords</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> + <link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> + <meta name="assert" content="Verify that CSS font-size keywords are invalid for the mathsize attribute."> + <link rel="match" href="mathsize-attribute-css-keywords-ref.html"> + <script src="/mathml/support/feature-detection.js"></script> + </head> + <body> + <p>Test passes if you see 14 "A" of equal size:</p> + <math> + <mtext>A</mtext> + <mtext mathsize="xx-small">A</mtext> + <mtext mathsize="x-small">A</mtext> + <mtext mathsize="small">A</mtext> + <mtext mathsize="medium">A</mtext> + <mtext mathsize="large">A</mtext> + <mtext mathsize="x-large">A</mtext> + <mtext mathsize="xx-large">A</mtext> + <mtext mathsize="larger">A</mtext> + <mtext mathsize="smaller">A</mtext> + <mtext mathsize="xx-ſmall">A</mtext> + <mtext mathsize="x-ſmall">A</mtext> + <mtext mathsize="ſmall">A</mtext> + <mtext mathsize="ſmaller">A</mtext> + </math> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mathsize");</script> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-legacy-values-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-legacy-values-ref.html new file mode 100644 index 0000000000..687efa49be --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-legacy-values-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>Legacy mathsize values</title> + </head> + <body> + <p>Test passes if you see four "A" of equal size:</p> + <math> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + <mtext>A</mtext> + </math> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-legacy-values.html b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-legacy-values.html new file mode 100644 index 0000000000..aebf09f9b8 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-legacy-values.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>Legacy mathsize values</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> + <link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> + <meta name="assert" content="Verify that legacy values for mathsize have no effect."> + <link rel="match" href="mathsize-attribute-legacy-values-ref.html"> + <script src="/mathml/support/feature-detection.js"></script> + </head> + <body> + <p>Test passes if you see four "A" of equal size:</p> + <math> + <mtext>A</mtext> + <mtext mathsize="small">A</mtext> + <mtext mathsize="medium">A</mtext> + <mtext mathsize="big">A</mtext> + </math> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mathsize");</script> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-ref.html new file mode 100644 index 0000000000..7a0450e51e --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>Verify mathsize attribute</title> + </head> + <body> + + <!-- The style attribute should have the same effect as the mathsize + attribute. --> + <div> + <math> + <mi style="font-size: 200%;">x</mi> + <mi style="font-size: 3em;">x</mi> + </math> + </div> + + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute.html b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute.html new file mode 100644 index 0000000000..66bcb6dd25 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathsize-attribute.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>Verify mathsize attribute</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> + <link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> + <meta name="assert" content="Verify mathsize attribute values."> + <link rel="match" href="mathsize-attribute-ref.html"> + </head> + <body> + + <!-- This verifies the effect of the mathsize attribute. --> + <div> + <math> + <mi mathsize="200%">x</mi> + <mi mathsize="3em">x</mi> + </math> + </div> + + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-auto-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-auto-ref.html new file mode 100644 index 0000000000..f8eaf7a775 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-auto-ref.html @@ -0,0 +1,139 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant auto (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-italic.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mi>𝜕</mi></math>=<span>1D715</span></span> + <span><math class="testfont"><mi>𝛻</mi></math>=<span>1D6FB</span></span> + <span><math class="testfont"><mi>𝚥</mi></math>=<span>1D6A5</span></span> + <span><math class="testfont"><mi>𝐴</mi></math>=<span>1D434</span></span> + <span><math class="testfont"><mi>𝐵</mi></math>=<span>1D435</span></span> + <span><math class="testfont"><mi>𝐶</mi></math>=<span>1D436</span></span> + <span><math class="testfont"><mi>𝐷</mi></math>=<span>1D437</span></span> + <span><math class="testfont"><mi>𝐸</mi></math>=<span>1D438</span></span> + <span><math class="testfont"><mi>𝐹</mi></math>=<span>1D439</span></span> + <span><math class="testfont"><mi>𝐺</mi></math>=<span>1D43A</span></span><br/> + <span><math class="testfont"><mi>𝐻</mi></math>=<span>1D43B</span></span> + <span><math class="testfont"><mi>𝐼</mi></math>=<span>1D43C</span></span> + <span><math class="testfont"><mi>𝐽</mi></math>=<span>1D43D</span></span> + <span><math class="testfont"><mi>𝐾</mi></math>=<span>1D43E</span></span> + <span><math class="testfont"><mi>𝐿</mi></math>=<span>1D43F</span></span> + <span><math class="testfont"><mi>𝑀</mi></math>=<span>1D440</span></span> + <span><math class="testfont"><mi>𝑁</mi></math>=<span>1D441</span></span> + <span><math class="testfont"><mi>𝑂</mi></math>=<span>1D442</span></span> + <span><math class="testfont"><mi>𝑃</mi></math>=<span>1D443</span></span> + <span><math class="testfont"><mi>𝑄</mi></math>=<span>1D444</span></span><br/> + <span><math class="testfont"><mi>𝑅</mi></math>=<span>1D445</span></span> + <span><math class="testfont"><mi>𝑆</mi></math>=<span>1D446</span></span> + <span><math class="testfont"><mi>𝑇</mi></math>=<span>1D447</span></span> + <span><math class="testfont"><mi>𝑈</mi></math>=<span>1D448</span></span> + <span><math class="testfont"><mi>𝑉</mi></math>=<span>1D449</span></span> + <span><math class="testfont"><mi>𝑊</mi></math>=<span>1D44A</span></span> + <span><math class="testfont"><mi>𝑋</mi></math>=<span>1D44B</span></span> + <span><math class="testfont"><mi>𝑌</mi></math>=<span>1D44C</span></span> + <span><math class="testfont"><mi>𝑍</mi></math>=<span>1D44D</span></span> + <span><math class="testfont"><mi>𝑎</mi></math>=<span>1D44E</span></span><br/> + <span><math class="testfont"><mi>𝑏</mi></math>=<span>1D44F</span></span> + <span><math class="testfont"><mi>𝑐</mi></math>=<span>1D450</span></span> + <span><math class="testfont"><mi>𝑑</mi></math>=<span>1D451</span></span> + <span><math class="testfont"><mi>𝑒</mi></math>=<span>1D452</span></span> + <span><math class="testfont"><mi>𝑓</mi></math>=<span>1D453</span></span> + <span><math class="testfont"><mi>𝑔</mi></math>=<span>1D454</span></span> + <span><math class="testfont"><mi>ℎ</mi></math>=<span>0210E</span></span> + <span><math class="testfont"><mi>𝑖</mi></math>=<span>1D456</span></span> + <span><math class="testfont"><mi>𝑗</mi></math>=<span>1D457</span></span> + <span><math class="testfont"><mi>𝑘</mi></math>=<span>1D458</span></span><br/> + <span><math class="testfont"><mi>𝑙</mi></math>=<span>1D459</span></span> + <span><math class="testfont"><mi>𝑚</mi></math>=<span>1D45A</span></span> + <span><math class="testfont"><mi>𝑛</mi></math>=<span>1D45B</span></span> + <span><math class="testfont"><mi>𝑜</mi></math>=<span>1D45C</span></span> + <span><math class="testfont"><mi>𝑝</mi></math>=<span>1D45D</span></span> + <span><math class="testfont"><mi>𝑞</mi></math>=<span>1D45E</span></span> + <span><math class="testfont"><mi>𝑟</mi></math>=<span>1D45F</span></span> + <span><math class="testfont"><mi>𝑠</mi></math>=<span>1D460</span></span> + <span><math class="testfont"><mi>𝑡</mi></math>=<span>1D461</span></span> + <span><math class="testfont"><mi>𝑢</mi></math>=<span>1D462</span></span><br/> + <span><math class="testfont"><mi>𝑣</mi></math>=<span>1D463</span></span> + <span><math class="testfont"><mi>𝑤</mi></math>=<span>1D464</span></span> + <span><math class="testfont"><mi>𝑥</mi></math>=<span>1D465</span></span> + <span><math class="testfont"><mi>𝑦</mi></math>=<span>1D466</span></span> + <span><math class="testfont"><mi>𝑧</mi></math>=<span>1D467</span></span> + <span><math class="testfont"><mi>𝚤</mi></math>=<span>1D6A4</span></span> + <span><math class="testfont"><mi>𝛢</mi></math>=<span>1D6E2</span></span> + <span><math class="testfont"><mi>𝛣</mi></math>=<span>1D6E3</span></span> + <span><math class="testfont"><mi>𝛤</mi></math>=<span>1D6E4</span></span> + <span><math class="testfont"><mi>𝛥</mi></math>=<span>1D6E5</span></span><br/> + <span><math class="testfont"><mi>𝛦</mi></math>=<span>1D6E6</span></span> + <span><math class="testfont"><mi>𝛧</mi></math>=<span>1D6E7</span></span> + <span><math class="testfont"><mi>𝛨</mi></math>=<span>1D6E8</span></span> + <span><math class="testfont"><mi>𝛩</mi></math>=<span>1D6E9</span></span> + <span><math class="testfont"><mi>𝛪</mi></math>=<span>1D6EA</span></span> + <span><math class="testfont"><mi>𝛫</mi></math>=<span>1D6EB</span></span> + <span><math class="testfont"><mi>𝛬</mi></math>=<span>1D6EC</span></span> + <span><math class="testfont"><mi>𝛭</mi></math>=<span>1D6ED</span></span> + <span><math class="testfont"><mi>𝛮</mi></math>=<span>1D6EE</span></span> + <span><math class="testfont"><mi>𝛯</mi></math>=<span>1D6EF</span></span><br/> + <span><math class="testfont"><mi>𝛰</mi></math>=<span>1D6F0</span></span> + <span><math class="testfont"><mi>𝛱</mi></math>=<span>1D6F1</span></span> + <span><math class="testfont"><mi>𝛲</mi></math>=<span>1D6F2</span></span> + <span><math class="testfont"><mi>𝛴</mi></math>=<span>1D6F4</span></span> + <span><math class="testfont"><mi>𝛵</mi></math>=<span>1D6F5</span></span> + <span><math class="testfont"><mi>𝛶</mi></math>=<span>1D6F6</span></span> + <span><math class="testfont"><mi>𝛷</mi></math>=<span>1D6F7</span></span> + <span><math class="testfont"><mi>𝛸</mi></math>=<span>1D6F8</span></span> + <span><math class="testfont"><mi>𝛹</mi></math>=<span>1D6F9</span></span> + <span><math class="testfont"><mi>𝛺</mi></math>=<span>1D6FA</span></span><br/> + <span><math class="testfont"><mi>𝛼</mi></math>=<span>1D6FC</span></span> + <span><math class="testfont"><mi>𝛽</mi></math>=<span>1D6FD</span></span> + <span><math class="testfont"><mi>𝛾</mi></math>=<span>1D6FE</span></span> + <span><math class="testfont"><mi>𝛿</mi></math>=<span>1D6FF</span></span> + <span><math class="testfont"><mi>𝜀</mi></math>=<span>1D700</span></span> + <span><math class="testfont"><mi>𝜁</mi></math>=<span>1D701</span></span> + <span><math class="testfont"><mi>𝜂</mi></math>=<span>1D702</span></span> + <span><math class="testfont"><mi>𝜃</mi></math>=<span>1D703</span></span> + <span><math class="testfont"><mi>𝜄</mi></math>=<span>1D704</span></span> + <span><math class="testfont"><mi>𝜅</mi></math>=<span>1D705</span></span><br/> + <span><math class="testfont"><mi>𝜆</mi></math>=<span>1D706</span></span> + <span><math class="testfont"><mi>𝜇</mi></math>=<span>1D707</span></span> + <span><math class="testfont"><mi>𝜈</mi></math>=<span>1D708</span></span> + <span><math class="testfont"><mi>𝜉</mi></math>=<span>1D709</span></span> + <span><math class="testfont"><mi>𝜊</mi></math>=<span>1D70A</span></span> + <span><math class="testfont"><mi>𝜋</mi></math>=<span>1D70B</span></span> + <span><math class="testfont"><mi>𝜌</mi></math>=<span>1D70C</span></span> + <span><math class="testfont"><mi>𝜍</mi></math>=<span>1D70D</span></span> + <span><math class="testfont"><mi>𝜎</mi></math>=<span>1D70E</span></span> + <span><math class="testfont"><mi>𝜏</mi></math>=<span>1D70F</span></span><br/> + <span><math class="testfont"><mi>𝜐</mi></math>=<span>1D710</span></span> + <span><math class="testfont"><mi>𝜑</mi></math>=<span>1D711</span></span> + <span><math class="testfont"><mi>𝜒</mi></math>=<span>1D712</span></span> + <span><math class="testfont"><mi>𝜓</mi></math>=<span>1D713</span></span> + <span><math class="testfont"><mi>𝜔</mi></math>=<span>1D714</span></span> + <span><math class="testfont"><mi>𝜗</mi></math>=<span>1D717</span></span> + <span><math class="testfont"><mi>𝜙</mi></math>=<span>1D719</span></span> + <span><math class="testfont"><mi>𝜛</mi></math>=<span>1D71B</span></span> + <span><math class="testfont"><mi>𝜘</mi></math>=<span>1D718</span></span> + <span><math class="testfont"><mi>𝜚</mi></math>=<span>1D71A</span></span><br/> + <span><math class="testfont"><mi>𝛳</mi></math>=<span>1D6F3</span></span> + <span><math class="testfont"><mi>𝜖</mi></math>=<span>1D716</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-auto.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-auto.html new file mode 100644 index 0000000000..98f99ad6ed --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-auto.html @@ -0,0 +1,145 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant auto</title> +<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="mathvariant-auto-ref.html"/> +<meta name="assert" content="Verify that a single-char <mi> is equivalent to an <mi> with the transformed italic unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-italic.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mi>∂</mi></math>=<span>1D715</span></span> + <span><math class="testfont"><mi>∇</mi></math>=<span>1D6FB</span></span> + <span><math class="testfont"><mi>ȷ</mi></math>=<span>1D6A5</span></span> + <span><math class="testfont"><mi>A</mi></math>=<span>1D434</span></span> + <span><math class="testfont"><mi>B</mi></math>=<span>1D435</span></span> + <span><math class="testfont"><mi>C</mi></math>=<span>1D436</span></span> + <span><math class="testfont"><mi>D</mi></math>=<span>1D437</span></span> + <span><math class="testfont"><mi>E</mi></math>=<span>1D438</span></span> + <span><math class="testfont"><mi>F</mi></math>=<span>1D439</span></span> + <span><math class="testfont"><mi>G</mi></math>=<span>1D43A</span></span><br/> + <span><math class="testfont"><mi>H</mi></math>=<span>1D43B</span></span> + <span><math class="testfont"><mi>I</mi></math>=<span>1D43C</span></span> + <span><math class="testfont"><mi>J</mi></math>=<span>1D43D</span></span> + <span><math class="testfont"><mi>K</mi></math>=<span>1D43E</span></span> + <span><math class="testfont"><mi>L</mi></math>=<span>1D43F</span></span> + <span><math class="testfont"><mi>M</mi></math>=<span>1D440</span></span> + <span><math class="testfont"><mi>N</mi></math>=<span>1D441</span></span> + <span><math class="testfont"><mi>O</mi></math>=<span>1D442</span></span> + <span><math class="testfont"><mi>P</mi></math>=<span>1D443</span></span> + <span><math class="testfont"><mi>Q</mi></math>=<span>1D444</span></span><br/> + <span><math class="testfont"><mi>R</mi></math>=<span>1D445</span></span> + <span><math class="testfont"><mi>S</mi></math>=<span>1D446</span></span> + <span><math class="testfont"><mi>T</mi></math>=<span>1D447</span></span> + <span><math class="testfont"><mi>U</mi></math>=<span>1D448</span></span> + <span><math class="testfont"><mi>V</mi></math>=<span>1D449</span></span> + <span><math class="testfont"><mi>W</mi></math>=<span>1D44A</span></span> + <span><math class="testfont"><mi>X</mi></math>=<span>1D44B</span></span> + <span><math class="testfont"><mi>Y</mi></math>=<span>1D44C</span></span> + <span><math class="testfont"><mi>Z</mi></math>=<span>1D44D</span></span> + <span><math class="testfont"><mi>a</mi></math>=<span>1D44E</span></span><br/> + <span><math class="testfont"><mi>b</mi></math>=<span>1D44F</span></span> + <span><math class="testfont"><mi>c</mi></math>=<span>1D450</span></span> + <span><math class="testfont"><mi>d</mi></math>=<span>1D451</span></span> + <span><math class="testfont"><mi>e</mi></math>=<span>1D452</span></span> + <span><math class="testfont"><mi>f</mi></math>=<span>1D453</span></span> + <span><math class="testfont"><mi>g</mi></math>=<span>1D454</span></span> + <span><math class="testfont"><mi>h</mi></math>=<span>0210E</span></span> + <span><math class="testfont"><mi>i</mi></math>=<span>1D456</span></span> + <span><math class="testfont"><mi>j</mi></math>=<span>1D457</span></span> + <span><math class="testfont"><mi>k</mi></math>=<span>1D458</span></span><br/> + <span><math class="testfont"><mi>l</mi></math>=<span>1D459</span></span> + <span><math class="testfont"><mi>m</mi></math>=<span>1D45A</span></span> + <span><math class="testfont"><mi>n</mi></math>=<span>1D45B</span></span> + <span><math class="testfont"><mi>o</mi></math>=<span>1D45C</span></span> + <span><math class="testfont"><mi>p</mi></math>=<span>1D45D</span></span> + <span><math class="testfont"><mi>q</mi></math>=<span>1D45E</span></span> + <span><math class="testfont"><mi>r</mi></math>=<span>1D45F</span></span> + <span><math class="testfont"><mi>s</mi></math>=<span>1D460</span></span> + <span><math class="testfont"><mi>t</mi></math>=<span>1D461</span></span> + <span><math class="testfont"><mi>u</mi></math>=<span>1D462</span></span><br/> + <span><math class="testfont"><mi>v</mi></math>=<span>1D463</span></span> + <span><math class="testfont"><mi>w</mi></math>=<span>1D464</span></span> + <span><math class="testfont"><mi>x</mi></math>=<span>1D465</span></span> + <span><math class="testfont"><mi>y</mi></math>=<span>1D466</span></span> + <span><math class="testfont"><mi>z</mi></math>=<span>1D467</span></span> + <span><math class="testfont"><mi>ı</mi></math>=<span>1D6A4</span></span> + <span><math class="testfont"><mi>Α</mi></math>=<span>1D6E2</span></span> + <span><math class="testfont"><mi>Β</mi></math>=<span>1D6E3</span></span> + <span><math class="testfont"><mi>Γ</mi></math>=<span>1D6E4</span></span> + <span><math class="testfont"><mi>Δ</mi></math>=<span>1D6E5</span></span><br/> + <span><math class="testfont"><mi>Ε</mi></math>=<span>1D6E6</span></span> + <span><math class="testfont"><mi>Ζ</mi></math>=<span>1D6E7</span></span> + <span><math class="testfont"><mi>Η</mi></math>=<span>1D6E8</span></span> + <span><math class="testfont"><mi>Θ</mi></math>=<span>1D6E9</span></span> + <span><math class="testfont"><mi>Ι</mi></math>=<span>1D6EA</span></span> + <span><math class="testfont"><mi>Κ</mi></math>=<span>1D6EB</span></span> + <span><math class="testfont"><mi>Λ</mi></math>=<span>1D6EC</span></span> + <span><math class="testfont"><mi>Μ</mi></math>=<span>1D6ED</span></span> + <span><math class="testfont"><mi>Ν</mi></math>=<span>1D6EE</span></span> + <span><math class="testfont"><mi>Ξ</mi></math>=<span>1D6EF</span></span><br/> + <span><math class="testfont"><mi>Ο</mi></math>=<span>1D6F0</span></span> + <span><math class="testfont"><mi>Π</mi></math>=<span>1D6F1</span></span> + <span><math class="testfont"><mi>Ρ</mi></math>=<span>1D6F2</span></span> + <span><math class="testfont"><mi>Σ</mi></math>=<span>1D6F4</span></span> + <span><math class="testfont"><mi>Τ</mi></math>=<span>1D6F5</span></span> + <span><math class="testfont"><mi>Υ</mi></math>=<span>1D6F6</span></span> + <span><math class="testfont"><mi>Φ</mi></math>=<span>1D6F7</span></span> + <span><math class="testfont"><mi>Χ</mi></math>=<span>1D6F8</span></span> + <span><math class="testfont"><mi>Ψ</mi></math>=<span>1D6F9</span></span> + <span><math class="testfont"><mi>Ω</mi></math>=<span>1D6FA</span></span><br/> + <span><math class="testfont"><mi>α</mi></math>=<span>1D6FC</span></span> + <span><math class="testfont"><mi>β</mi></math>=<span>1D6FD</span></span> + <span><math class="testfont"><mi>γ</mi></math>=<span>1D6FE</span></span> + <span><math class="testfont"><mi>δ</mi></math>=<span>1D6FF</span></span> + <span><math class="testfont"><mi>ε</mi></math>=<span>1D700</span></span> + <span><math class="testfont"><mi>ζ</mi></math>=<span>1D701</span></span> + <span><math class="testfont"><mi>η</mi></math>=<span>1D702</span></span> + <span><math class="testfont"><mi>θ</mi></math>=<span>1D703</span></span> + <span><math class="testfont"><mi>ι</mi></math>=<span>1D704</span></span> + <span><math class="testfont"><mi>κ</mi></math>=<span>1D705</span></span><br/> + <span><math class="testfont"><mi>λ</mi></math>=<span>1D706</span></span> + <span><math class="testfont"><mi>μ</mi></math>=<span>1D707</span></span> + <span><math class="testfont"><mi>ν</mi></math>=<span>1D708</span></span> + <span><math class="testfont"><mi>ξ</mi></math>=<span>1D709</span></span> + <span><math class="testfont"><mi>ο</mi></math>=<span>1D70A</span></span> + <span><math class="testfont"><mi>π</mi></math>=<span>1D70B</span></span> + <span><math class="testfont"><mi>ρ</mi></math>=<span>1D70C</span></span> + <span><math class="testfont"><mi>ς</mi></math>=<span>1D70D</span></span> + <span><math class="testfont"><mi>σ</mi></math>=<span>1D70E</span></span> + <span><math class="testfont"><mi>τ</mi></math>=<span>1D70F</span></span><br/> + <span><math class="testfont"><mi>υ</mi></math>=<span>1D710</span></span> + <span><math class="testfont"><mi>φ</mi></math>=<span>1D711</span></span> + <span><math class="testfont"><mi>χ</mi></math>=<span>1D712</span></span> + <span><math class="testfont"><mi>ψ</mi></math>=<span>1D713</span></span> + <span><math class="testfont"><mi>ω</mi></math>=<span>1D714</span></span> + <span><math class="testfont"><mi>ϑ</mi></math>=<span>1D717</span></span> + <span><math class="testfont"><mi>ϕ</mi></math>=<span>1D719</span></span> + <span><math class="testfont"><mi>ϖ</mi></math>=<span>1D71B</span></span> + <span><math class="testfont"><mi>ϰ</mi></math>=<span>1D718</span></span> + <span><math class="testfont"><mi>ϱ</mi></math>=<span>1D71A</span></span><br/> + <span><math class="testfont"><mi>ϴ</mi></math>=<span>1D6F3</span></span> + <span><math class="testfont"><mi>ϵ</mi></math>=<span>1D716</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-basic-transforms-with-default-font-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-basic-transforms-with-default-font-ref.html new file mode 100644 index 0000000000..6ebfd75c2f --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-basic-transforms-with-default-font-ref.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>Basic mathvariant transforms with the default font (reference)</title> + </head> + <body> + <p>Test passes if you see three lines of text rendered with corresponding + italic, bold, bold-italic characters from the + Mathematical Alphanumeric Symbols block:</p> + <p><math><mtext>𝐼𝑡𝑎𝑙𝑖𝑐</mtext></math></p> + <p><math><mtext>𝐁𝐨𝐥𝐝</mtext></math></p> + <p><math><mtext>𝑩𝒐𝒍𝒅𝑰𝒕𝒂𝒍𝒊𝒄</mtext></math></p> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-basic-transforms-with-default-font.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-basic-transforms-with-default-font.html new file mode 100644 index 0000000000..24c868c495 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-basic-transforms-with-default-font.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>Basic mathvariant transforms with the default font</title> + <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://bugzilla.mozilla.org/show_bug.cgi?id=1789083"> + <link rel="match" href="mathvariant-basic-transforms-with-default-font-ref.html"/> + <meta name="assert" content="Verify that the default font provides Mathematical Alphanumeric Symbols to perform basic mathvariant transforms (italic, bold, bold-italic), without requiring some kind of style fallback."> + </head> + <body> + <p>Test passes if you see three lines of text rendered with corresponding + italic, bold, bold-italic characters from the + Mathematical Alphanumeric Symbols block:</p> + <p><math><mtext mathvariant="italic">Italic</mtext></math></p> + <p><math><mtext mathvariant="bold">Bold</mtext></math></p> + <p><math><mtext mathvariant="bold-italic">BoldItalic</mtext></math></p> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-fraktur-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-fraktur-ref.html new file mode 100644 index 0000000000..44588948e7 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-fraktur-ref.html @@ -0,0 +1,79 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant bold-fraktur (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-bold-fraktur.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝕬</mtext></math>=<span>1D56C</span></span> + <span><math class="testfont"><mtext>𝕭</mtext></math>=<span>1D56D</span></span> + <span><math class="testfont"><mtext>𝕮</mtext></math>=<span>1D56E</span></span> + <span><math class="testfont"><mtext>𝕯</mtext></math>=<span>1D56F</span></span> + <span><math class="testfont"><mtext>𝕰</mtext></math>=<span>1D570</span></span> + <span><math class="testfont"><mtext>𝕱</mtext></math>=<span>1D571</span></span> + <span><math class="testfont"><mtext>𝕲</mtext></math>=<span>1D572</span></span> + <span><math class="testfont"><mtext>𝕳</mtext></math>=<span>1D573</span></span> + <span><math class="testfont"><mtext>𝕴</mtext></math>=<span>1D574</span></span> + <span><math class="testfont"><mtext>𝕵</mtext></math>=<span>1D575</span></span><br/> + <span><math class="testfont"><mtext>𝕶</mtext></math>=<span>1D576</span></span> + <span><math class="testfont"><mtext>𝕷</mtext></math>=<span>1D577</span></span> + <span><math class="testfont"><mtext>𝕸</mtext></math>=<span>1D578</span></span> + <span><math class="testfont"><mtext>𝕹</mtext></math>=<span>1D579</span></span> + <span><math class="testfont"><mtext>𝕺</mtext></math>=<span>1D57A</span></span> + <span><math class="testfont"><mtext>𝕻</mtext></math>=<span>1D57B</span></span> + <span><math class="testfont"><mtext>𝕼</mtext></math>=<span>1D57C</span></span> + <span><math class="testfont"><mtext>𝕽</mtext></math>=<span>1D57D</span></span> + <span><math class="testfont"><mtext>𝕾</mtext></math>=<span>1D57E</span></span> + <span><math class="testfont"><mtext>𝕿</mtext></math>=<span>1D57F</span></span><br/> + <span><math class="testfont"><mtext>𝖀</mtext></math>=<span>1D580</span></span> + <span><math class="testfont"><mtext>𝖁</mtext></math>=<span>1D581</span></span> + <span><math class="testfont"><mtext>𝖂</mtext></math>=<span>1D582</span></span> + <span><math class="testfont"><mtext>𝖃</mtext></math>=<span>1D583</span></span> + <span><math class="testfont"><mtext>𝖄</mtext></math>=<span>1D584</span></span> + <span><math class="testfont"><mtext>𝖅</mtext></math>=<span>1D585</span></span> + <span><math class="testfont"><mtext>𝖆</mtext></math>=<span>1D586</span></span> + <span><math class="testfont"><mtext>𝖇</mtext></math>=<span>1D587</span></span> + <span><math class="testfont"><mtext>𝖈</mtext></math>=<span>1D588</span></span> + <span><math class="testfont"><mtext>𝖉</mtext></math>=<span>1D589</span></span><br/> + <span><math class="testfont"><mtext>𝖊</mtext></math>=<span>1D58A</span></span> + <span><math class="testfont"><mtext>𝖋</mtext></math>=<span>1D58B</span></span> + <span><math class="testfont"><mtext>𝖌</mtext></math>=<span>1D58C</span></span> + <span><math class="testfont"><mtext>𝖍</mtext></math>=<span>1D58D</span></span> + <span><math class="testfont"><mtext>𝖎</mtext></math>=<span>1D58E</span></span> + <span><math class="testfont"><mtext>𝖏</mtext></math>=<span>1D58F</span></span> + <span><math class="testfont"><mtext>𝖐</mtext></math>=<span>1D590</span></span> + <span><math class="testfont"><mtext>𝖑</mtext></math>=<span>1D591</span></span> + <span><math class="testfont"><mtext>𝖒</mtext></math>=<span>1D592</span></span> + <span><math class="testfont"><mtext>𝖓</mtext></math>=<span>1D593</span></span><br/> + <span><math class="testfont"><mtext>𝖔</mtext></math>=<span>1D594</span></span> + <span><math class="testfont"><mtext>𝖕</mtext></math>=<span>1D595</span></span> + <span><math class="testfont"><mtext>𝖖</mtext></math>=<span>1D596</span></span> + <span><math class="testfont"><mtext>𝖗</mtext></math>=<span>1D597</span></span> + <span><math class="testfont"><mtext>𝖘</mtext></math>=<span>1D598</span></span> + <span><math class="testfont"><mtext>𝖙</mtext></math>=<span>1D599</span></span> + <span><math class="testfont"><mtext>𝖚</mtext></math>=<span>1D59A</span></span> + <span><math class="testfont"><mtext>𝖛</mtext></math>=<span>1D59B</span></span> + <span><math class="testfont"><mtext>𝖜</mtext></math>=<span>1D59C</span></span> + <span><math class="testfont"><mtext>𝖝</mtext></math>=<span>1D59D</span></span><br/> + <span><math class="testfont"><mtext>𝖞</mtext></math>=<span>1D59E</span></span> + <span><math class="testfont"><mtext>𝖟</mtext></math>=<span>1D59F</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-fraktur.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-fraktur.html new file mode 100644 index 0000000000..32d037603b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-fraktur.html @@ -0,0 +1,85 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant bold-fraktur</title> +<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/#bold-fraktur-mappings"> +<link rel="match" href="mathvariant-bold-fraktur-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a bold-fraktur mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-bold-fraktur.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">A</mtext></math>=<span>1D56C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">B</mtext></math>=<span>1D56D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">C</mtext></math>=<span>1D56E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">D</mtext></math>=<span>1D56F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">E</mtext></math>=<span>1D570</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">F</mtext></math>=<span>1D571</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">G</mtext></math>=<span>1D572</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">H</mtext></math>=<span>1D573</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">I</mtext></math>=<span>1D574</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">J</mtext></math>=<span>1D575</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">K</mtext></math>=<span>1D576</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">L</mtext></math>=<span>1D577</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">M</mtext></math>=<span>1D578</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">N</mtext></math>=<span>1D579</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">O</mtext></math>=<span>1D57A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">P</mtext></math>=<span>1D57B</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">Q</mtext></math>=<span>1D57C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">R</mtext></math>=<span>1D57D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">S</mtext></math>=<span>1D57E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">T</mtext></math>=<span>1D57F</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">U</mtext></math>=<span>1D580</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">V</mtext></math>=<span>1D581</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">W</mtext></math>=<span>1D582</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">X</mtext></math>=<span>1D583</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">Y</mtext></math>=<span>1D584</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">Z</mtext></math>=<span>1D585</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">a</mtext></math>=<span>1D586</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">b</mtext></math>=<span>1D587</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">c</mtext></math>=<span>1D588</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">d</mtext></math>=<span>1D589</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">e</mtext></math>=<span>1D58A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">f</mtext></math>=<span>1D58B</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">g</mtext></math>=<span>1D58C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">h</mtext></math>=<span>1D58D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">i</mtext></math>=<span>1D58E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">j</mtext></math>=<span>1D58F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">k</mtext></math>=<span>1D590</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">l</mtext></math>=<span>1D591</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">m</mtext></math>=<span>1D592</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">n</mtext></math>=<span>1D593</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">o</mtext></math>=<span>1D594</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">p</mtext></math>=<span>1D595</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">q</mtext></math>=<span>1D596</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">r</mtext></math>=<span>1D597</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">s</mtext></math>=<span>1D598</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">t</mtext></math>=<span>1D599</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">u</mtext></math>=<span>1D59A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">v</mtext></math>=<span>1D59B</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">w</mtext></math>=<span>1D59C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">x</mtext></math>=<span>1D59D</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">y</mtext></math>=<span>1D59E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-fraktur">z</mtext></math>=<span>1D59F</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-italic-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-italic-ref.html new file mode 100644 index 0000000000..c5eaa22e19 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-italic-ref.html @@ -0,0 +1,137 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant bold-italic (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-bold-italic.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝝏</mtext></math>=<span>1D74F</span></span> + <span><math class="testfont"><mtext>𝜵</mtext></math>=<span>1D735</span></span> + <span><math class="testfont"><mtext>𝑨</mtext></math>=<span>1D468</span></span> + <span><math class="testfont"><mtext>𝑩</mtext></math>=<span>1D469</span></span> + <span><math class="testfont"><mtext>𝑪</mtext></math>=<span>1D46A</span></span> + <span><math class="testfont"><mtext>𝑫</mtext></math>=<span>1D46B</span></span> + <span><math class="testfont"><mtext>𝑬</mtext></math>=<span>1D46C</span></span> + <span><math class="testfont"><mtext>𝑭</mtext></math>=<span>1D46D</span></span> + <span><math class="testfont"><mtext>𝑮</mtext></math>=<span>1D46E</span></span> + <span><math class="testfont"><mtext>𝑯</mtext></math>=<span>1D46F</span></span><br/> + <span><math class="testfont"><mtext>𝑰</mtext></math>=<span>1D470</span></span> + <span><math class="testfont"><mtext>𝑱</mtext></math>=<span>1D471</span></span> + <span><math class="testfont"><mtext>𝑲</mtext></math>=<span>1D472</span></span> + <span><math class="testfont"><mtext>𝑳</mtext></math>=<span>1D473</span></span> + <span><math class="testfont"><mtext>𝑴</mtext></math>=<span>1D474</span></span> + <span><math class="testfont"><mtext>𝑵</mtext></math>=<span>1D475</span></span> + <span><math class="testfont"><mtext>𝑶</mtext></math>=<span>1D476</span></span> + <span><math class="testfont"><mtext>𝑷</mtext></math>=<span>1D477</span></span> + <span><math class="testfont"><mtext>𝑸</mtext></math>=<span>1D478</span></span> + <span><math class="testfont"><mtext>𝑹</mtext></math>=<span>1D479</span></span><br/> + <span><math class="testfont"><mtext>𝑺</mtext></math>=<span>1D47A</span></span> + <span><math class="testfont"><mtext>𝑻</mtext></math>=<span>1D47B</span></span> + <span><math class="testfont"><mtext>𝑼</mtext></math>=<span>1D47C</span></span> + <span><math class="testfont"><mtext>𝑽</mtext></math>=<span>1D47D</span></span> + <span><math class="testfont"><mtext>𝑾</mtext></math>=<span>1D47E</span></span> + <span><math class="testfont"><mtext>𝑿</mtext></math>=<span>1D47F</span></span> + <span><math class="testfont"><mtext>𝒀</mtext></math>=<span>1D480</span></span> + <span><math class="testfont"><mtext>𝒁</mtext></math>=<span>1D481</span></span> + <span><math class="testfont"><mtext>𝒂</mtext></math>=<span>1D482</span></span> + <span><math class="testfont"><mtext>𝒃</mtext></math>=<span>1D483</span></span><br/> + <span><math class="testfont"><mtext>𝒄</mtext></math>=<span>1D484</span></span> + <span><math class="testfont"><mtext>𝒅</mtext></math>=<span>1D485</span></span> + <span><math class="testfont"><mtext>𝒆</mtext></math>=<span>1D486</span></span> + <span><math class="testfont"><mtext>𝒇</mtext></math>=<span>1D487</span></span> + <span><math class="testfont"><mtext>𝒈</mtext></math>=<span>1D488</span></span> + <span><math class="testfont"><mtext>𝒉</mtext></math>=<span>1D489</span></span> + <span><math class="testfont"><mtext>𝒊</mtext></math>=<span>1D48A</span></span> + <span><math class="testfont"><mtext>𝒋</mtext></math>=<span>1D48B</span></span> + <span><math class="testfont"><mtext>𝒌</mtext></math>=<span>1D48C</span></span> + <span><math class="testfont"><mtext>𝒍</mtext></math>=<span>1D48D</span></span><br/> + <span><math class="testfont"><mtext>𝒎</mtext></math>=<span>1D48E</span></span> + <span><math class="testfont"><mtext>𝒏</mtext></math>=<span>1D48F</span></span> + <span><math class="testfont"><mtext>𝒐</mtext></math>=<span>1D490</span></span> + <span><math class="testfont"><mtext>𝒑</mtext></math>=<span>1D491</span></span> + <span><math class="testfont"><mtext>𝒒</mtext></math>=<span>1D492</span></span> + <span><math class="testfont"><mtext>𝒓</mtext></math>=<span>1D493</span></span> + <span><math class="testfont"><mtext>𝒔</mtext></math>=<span>1D494</span></span> + <span><math class="testfont"><mtext>𝒕</mtext></math>=<span>1D495</span></span> + <span><math class="testfont"><mtext>𝒖</mtext></math>=<span>1D496</span></span> + <span><math class="testfont"><mtext>𝒗</mtext></math>=<span>1D497</span></span><br/> + <span><math class="testfont"><mtext>𝒘</mtext></math>=<span>1D498</span></span> + <span><math class="testfont"><mtext>𝒙</mtext></math>=<span>1D499</span></span> + <span><math class="testfont"><mtext>𝒚</mtext></math>=<span>1D49A</span></span> + <span><math class="testfont"><mtext>𝒛</mtext></math>=<span>1D49B</span></span> + <span><math class="testfont"><mtext>𝜜</mtext></math>=<span>1D71C</span></span> + <span><math class="testfont"><mtext>𝜝</mtext></math>=<span>1D71D</span></span> + <span><math class="testfont"><mtext>𝜞</mtext></math>=<span>1D71E</span></span> + <span><math class="testfont"><mtext>𝜟</mtext></math>=<span>1D71F</span></span> + <span><math class="testfont"><mtext>𝜠</mtext></math>=<span>1D720</span></span> + <span><math class="testfont"><mtext>𝜡</mtext></math>=<span>1D721</span></span><br/> + <span><math class="testfont"><mtext>𝜢</mtext></math>=<span>1D722</span></span> + <span><math class="testfont"><mtext>𝜣</mtext></math>=<span>1D723</span></span> + <span><math class="testfont"><mtext>𝜤</mtext></math>=<span>1D724</span></span> + <span><math class="testfont"><mtext>𝜥</mtext></math>=<span>1D725</span></span> + <span><math class="testfont"><mtext>𝜦</mtext></math>=<span>1D726</span></span> + <span><math class="testfont"><mtext>𝜧</mtext></math>=<span>1D727</span></span> + <span><math class="testfont"><mtext>𝜨</mtext></math>=<span>1D728</span></span> + <span><math class="testfont"><mtext>𝜩</mtext></math>=<span>1D729</span></span> + <span><math class="testfont"><mtext>𝜪</mtext></math>=<span>1D72A</span></span> + <span><math class="testfont"><mtext>𝜫</mtext></math>=<span>1D72B</span></span><br/> + <span><math class="testfont"><mtext>𝜬</mtext></math>=<span>1D72C</span></span> + <span><math class="testfont"><mtext>𝜮</mtext></math>=<span>1D72E</span></span> + <span><math class="testfont"><mtext>𝜯</mtext></math>=<span>1D72F</span></span> + <span><math class="testfont"><mtext>𝜰</mtext></math>=<span>1D730</span></span> + <span><math class="testfont"><mtext>𝜱</mtext></math>=<span>1D731</span></span> + <span><math class="testfont"><mtext>𝜲</mtext></math>=<span>1D732</span></span> + <span><math class="testfont"><mtext>𝜳</mtext></math>=<span>1D733</span></span> + <span><math class="testfont"><mtext>𝜴</mtext></math>=<span>1D734</span></span> + <span><math class="testfont"><mtext>𝜶</mtext></math>=<span>1D736</span></span> + <span><math class="testfont"><mtext>𝜷</mtext></math>=<span>1D737</span></span><br/> + <span><math class="testfont"><mtext>𝜸</mtext></math>=<span>1D738</span></span> + <span><math class="testfont"><mtext>𝜹</mtext></math>=<span>1D739</span></span> + <span><math class="testfont"><mtext>𝜺</mtext></math>=<span>1D73A</span></span> + <span><math class="testfont"><mtext>𝜻</mtext></math>=<span>1D73B</span></span> + <span><math class="testfont"><mtext>𝜼</mtext></math>=<span>1D73C</span></span> + <span><math class="testfont"><mtext>𝜽</mtext></math>=<span>1D73D</span></span> + <span><math class="testfont"><mtext>𝜾</mtext></math>=<span>1D73E</span></span> + <span><math class="testfont"><mtext>𝜿</mtext></math>=<span>1D73F</span></span> + <span><math class="testfont"><mtext>𝝀</mtext></math>=<span>1D740</span></span> + <span><math class="testfont"><mtext>𝝁</mtext></math>=<span>1D741</span></span><br/> + <span><math class="testfont"><mtext>𝝂</mtext></math>=<span>1D742</span></span> + <span><math class="testfont"><mtext>𝝃</mtext></math>=<span>1D743</span></span> + <span><math class="testfont"><mtext>𝝄</mtext></math>=<span>1D744</span></span> + <span><math class="testfont"><mtext>𝝅</mtext></math>=<span>1D745</span></span> + <span><math class="testfont"><mtext>𝝆</mtext></math>=<span>1D746</span></span> + <span><math class="testfont"><mtext>𝝇</mtext></math>=<span>1D747</span></span> + <span><math class="testfont"><mtext>𝝈</mtext></math>=<span>1D748</span></span> + <span><math class="testfont"><mtext>𝝉</mtext></math>=<span>1D749</span></span> + <span><math class="testfont"><mtext>𝝊</mtext></math>=<span>1D74A</span></span> + <span><math class="testfont"><mtext>𝝋</mtext></math>=<span>1D74B</span></span><br/> + <span><math class="testfont"><mtext>𝝌</mtext></math>=<span>1D74C</span></span> + <span><math class="testfont"><mtext>𝝍</mtext></math>=<span>1D74D</span></span> + <span><math class="testfont"><mtext>𝝎</mtext></math>=<span>1D74E</span></span> + <span><math class="testfont"><mtext>𝝑</mtext></math>=<span>1D751</span></span> + <span><math class="testfont"><mtext>𝝓</mtext></math>=<span>1D753</span></span> + <span><math class="testfont"><mtext>𝝕</mtext></math>=<span>1D755</span></span> + <span><math class="testfont"><mtext>𝝒</mtext></math>=<span>1D752</span></span> + <span><math class="testfont"><mtext>𝝔</mtext></math>=<span>1D754</span></span> + <span><math class="testfont"><mtext>𝜭</mtext></math>=<span>1D72D</span></span> + <span><math class="testfont"><mtext>𝝐</mtext></math>=<span>1D750</span></span><br/> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-italic.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-italic.html new file mode 100644 index 0000000000..1b8ab88595 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-italic.html @@ -0,0 +1,143 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant bold-italic</title> +<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/#bold-italic-mappings"> +<link rel="match" href="mathvariant-bold-italic-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a bold-italic mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-bold-italic.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="bold-italic">∂</mtext></math>=<span>1D74F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">∇</mtext></math>=<span>1D735</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">A</mtext></math>=<span>1D468</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">B</mtext></math>=<span>1D469</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">C</mtext></math>=<span>1D46A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">D</mtext></math>=<span>1D46B</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">E</mtext></math>=<span>1D46C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">F</mtext></math>=<span>1D46D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">G</mtext></math>=<span>1D46E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">H</mtext></math>=<span>1D46F</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-italic">I</mtext></math>=<span>1D470</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">J</mtext></math>=<span>1D471</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">K</mtext></math>=<span>1D472</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">L</mtext></math>=<span>1D473</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">M</mtext></math>=<span>1D474</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">N</mtext></math>=<span>1D475</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">O</mtext></math>=<span>1D476</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">P</mtext></math>=<span>1D477</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Q</mtext></math>=<span>1D478</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">R</mtext></math>=<span>1D479</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-italic">S</mtext></math>=<span>1D47A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">T</mtext></math>=<span>1D47B</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">U</mtext></math>=<span>1D47C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">V</mtext></math>=<span>1D47D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">W</mtext></math>=<span>1D47E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">X</mtext></math>=<span>1D47F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Y</mtext></math>=<span>1D480</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Z</mtext></math>=<span>1D481</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">a</mtext></math>=<span>1D482</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">b</mtext></math>=<span>1D483</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-italic">c</mtext></math>=<span>1D484</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">d</mtext></math>=<span>1D485</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">e</mtext></math>=<span>1D486</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">f</mtext></math>=<span>1D487</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">g</mtext></math>=<span>1D488</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">h</mtext></math>=<span>1D489</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">i</mtext></math>=<span>1D48A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">j</mtext></math>=<span>1D48B</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">k</mtext></math>=<span>1D48C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">l</mtext></math>=<span>1D48D</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-italic">m</mtext></math>=<span>1D48E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">n</mtext></math>=<span>1D48F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">o</mtext></math>=<span>1D490</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">p</mtext></math>=<span>1D491</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">q</mtext></math>=<span>1D492</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">r</mtext></math>=<span>1D493</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">s</mtext></math>=<span>1D494</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">t</mtext></math>=<span>1D495</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">u</mtext></math>=<span>1D496</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">v</mtext></math>=<span>1D497</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-italic">w</mtext></math>=<span>1D498</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">x</mtext></math>=<span>1D499</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">y</mtext></math>=<span>1D49A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">z</mtext></math>=<span>1D49B</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Α</mtext></math>=<span>1D71C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Β</mtext></math>=<span>1D71D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Γ</mtext></math>=<span>1D71E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Δ</mtext></math>=<span>1D71F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Ε</mtext></math>=<span>1D720</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Ζ</mtext></math>=<span>1D721</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-italic">Η</mtext></math>=<span>1D722</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Θ</mtext></math>=<span>1D723</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Ι</mtext></math>=<span>1D724</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Κ</mtext></math>=<span>1D725</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Λ</mtext></math>=<span>1D726</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Μ</mtext></math>=<span>1D727</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Ν</mtext></math>=<span>1D728</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Ξ</mtext></math>=<span>1D729</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Ο</mtext></math>=<span>1D72A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Π</mtext></math>=<span>1D72B</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-italic">Ρ</mtext></math>=<span>1D72C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Σ</mtext></math>=<span>1D72E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Τ</mtext></math>=<span>1D72F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Υ</mtext></math>=<span>1D730</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Φ</mtext></math>=<span>1D731</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Χ</mtext></math>=<span>1D732</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Ψ</mtext></math>=<span>1D733</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">Ω</mtext></math>=<span>1D734</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">α</mtext></math>=<span>1D736</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">β</mtext></math>=<span>1D737</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-italic">γ</mtext></math>=<span>1D738</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">δ</mtext></math>=<span>1D739</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ε</mtext></math>=<span>1D73A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ζ</mtext></math>=<span>1D73B</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">η</mtext></math>=<span>1D73C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">θ</mtext></math>=<span>1D73D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ι</mtext></math>=<span>1D73E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">κ</mtext></math>=<span>1D73F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">λ</mtext></math>=<span>1D740</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">μ</mtext></math>=<span>1D741</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-italic">ν</mtext></math>=<span>1D742</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ξ</mtext></math>=<span>1D743</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ο</mtext></math>=<span>1D744</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">π</mtext></math>=<span>1D745</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ρ</mtext></math>=<span>1D746</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ς</mtext></math>=<span>1D747</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">σ</mtext></math>=<span>1D748</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">τ</mtext></math>=<span>1D749</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">υ</mtext></math>=<span>1D74A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">φ</mtext></math>=<span>1D74B</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-italic">χ</mtext></math>=<span>1D74C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ψ</mtext></math>=<span>1D74D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ω</mtext></math>=<span>1D74E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ϑ</mtext></math>=<span>1D751</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ϕ</mtext></math>=<span>1D753</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ϖ</mtext></math>=<span>1D755</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ϰ</mtext></math>=<span>1D752</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ϱ</mtext></math>=<span>1D754</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ϴ</mtext></math>=<span>1D72D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-italic">ϵ</mtext></math>=<span>1D750</span></span><br/> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-ref.html new file mode 100644 index 0000000000..3a727872d6 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-ref.html @@ -0,0 +1,149 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant bold (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-bold.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝛛</mtext></math>=<span>1D6DB</span></span> + <span><math class="testfont"><mtext>𝛁</mtext></math>=<span>1D6C1</span></span> + <span><math class="testfont"><mtext>𝟎</mtext></math>=<span>1D7CE</span></span> + <span><math class="testfont"><mtext>𝟏</mtext></math>=<span>1D7CF</span></span> + <span><math class="testfont"><mtext>𝟐</mtext></math>=<span>1D7D0</span></span> + <span><math class="testfont"><mtext>𝟑</mtext></math>=<span>1D7D1</span></span> + <span><math class="testfont"><mtext>𝟒</mtext></math>=<span>1D7D2</span></span> + <span><math class="testfont"><mtext>𝟓</mtext></math>=<span>1D7D3</span></span> + <span><math class="testfont"><mtext>𝟔</mtext></math>=<span>1D7D4</span></span> + <span><math class="testfont"><mtext>𝟕</mtext></math>=<span>1D7D5</span></span><br/> + <span><math class="testfont"><mtext>𝟖</mtext></math>=<span>1D7D6</span></span> + <span><math class="testfont"><mtext>𝟗</mtext></math>=<span>1D7D7</span></span> + <span><math class="testfont"><mtext>𝐀</mtext></math>=<span>1D400</span></span> + <span><math class="testfont"><mtext>𝐁</mtext></math>=<span>1D401</span></span> + <span><math class="testfont"><mtext>𝐂</mtext></math>=<span>1D402</span></span> + <span><math class="testfont"><mtext>𝐃</mtext></math>=<span>1D403</span></span> + <span><math class="testfont"><mtext>𝐄</mtext></math>=<span>1D404</span></span> + <span><math class="testfont"><mtext>𝐅</mtext></math>=<span>1D405</span></span> + <span><math class="testfont"><mtext>𝐆</mtext></math>=<span>1D406</span></span> + <span><math class="testfont"><mtext>𝐇</mtext></math>=<span>1D407</span></span><br/> + <span><math class="testfont"><mtext>𝐈</mtext></math>=<span>1D408</span></span> + <span><math class="testfont"><mtext>𝐉</mtext></math>=<span>1D409</span></span> + <span><math class="testfont"><mtext>𝐊</mtext></math>=<span>1D40A</span></span> + <span><math class="testfont"><mtext>𝐋</mtext></math>=<span>1D40B</span></span> + <span><math class="testfont"><mtext>𝐌</mtext></math>=<span>1D40C</span></span> + <span><math class="testfont"><mtext>𝐍</mtext></math>=<span>1D40D</span></span> + <span><math class="testfont"><mtext>𝐎</mtext></math>=<span>1D40E</span></span> + <span><math class="testfont"><mtext>𝐏</mtext></math>=<span>1D40F</span></span> + <span><math class="testfont"><mtext>𝐐</mtext></math>=<span>1D410</span></span> + <span><math class="testfont"><mtext>𝐑</mtext></math>=<span>1D411</span></span><br/> + <span><math class="testfont"><mtext>𝐒</mtext></math>=<span>1D412</span></span> + <span><math class="testfont"><mtext>𝐓</mtext></math>=<span>1D413</span></span> + <span><math class="testfont"><mtext>𝐔</mtext></math>=<span>1D414</span></span> + <span><math class="testfont"><mtext>𝐕</mtext></math>=<span>1D415</span></span> + <span><math class="testfont"><mtext>𝐖</mtext></math>=<span>1D416</span></span> + <span><math class="testfont"><mtext>𝐗</mtext></math>=<span>1D417</span></span> + <span><math class="testfont"><mtext>𝐘</mtext></math>=<span>1D418</span></span> + <span><math class="testfont"><mtext>𝐙</mtext></math>=<span>1D419</span></span> + <span><math class="testfont"><mtext>𝐚</mtext></math>=<span>1D41A</span></span> + <span><math class="testfont"><mtext>𝐛</mtext></math>=<span>1D41B</span></span><br/> + <span><math class="testfont"><mtext>𝐜</mtext></math>=<span>1D41C</span></span> + <span><math class="testfont"><mtext>𝐝</mtext></math>=<span>1D41D</span></span> + <span><math class="testfont"><mtext>𝐞</mtext></math>=<span>1D41E</span></span> + <span><math class="testfont"><mtext>𝐟</mtext></math>=<span>1D41F</span></span> + <span><math class="testfont"><mtext>𝐠</mtext></math>=<span>1D420</span></span> + <span><math class="testfont"><mtext>𝐡</mtext></math>=<span>1D421</span></span> + <span><math class="testfont"><mtext>𝐢</mtext></math>=<span>1D422</span></span> + <span><math class="testfont"><mtext>𝐣</mtext></math>=<span>1D423</span></span> + <span><math class="testfont"><mtext>𝐤</mtext></math>=<span>1D424</span></span> + <span><math class="testfont"><mtext>𝐥</mtext></math>=<span>1D425</span></span><br/> + <span><math class="testfont"><mtext>𝐦</mtext></math>=<span>1D426</span></span> + <span><math class="testfont"><mtext>𝐧</mtext></math>=<span>1D427</span></span> + <span><math class="testfont"><mtext>𝐨</mtext></math>=<span>1D428</span></span> + <span><math class="testfont"><mtext>𝐩</mtext></math>=<span>1D429</span></span> + <span><math class="testfont"><mtext>𝐪</mtext></math>=<span>1D42A</span></span> + <span><math class="testfont"><mtext>𝐫</mtext></math>=<span>1D42B</span></span> + <span><math class="testfont"><mtext>𝐬</mtext></math>=<span>1D42C</span></span> + <span><math class="testfont"><mtext>𝐭</mtext></math>=<span>1D42D</span></span> + <span><math class="testfont"><mtext>𝐮</mtext></math>=<span>1D42E</span></span> + <span><math class="testfont"><mtext>𝐯</mtext></math>=<span>1D42F</span></span><br/> + <span><math class="testfont"><mtext>𝐰</mtext></math>=<span>1D430</span></span> + <span><math class="testfont"><mtext>𝐱</mtext></math>=<span>1D431</span></span> + <span><math class="testfont"><mtext>𝐲</mtext></math>=<span>1D432</span></span> + <span><math class="testfont"><mtext>𝐳</mtext></math>=<span>1D433</span></span> + <span><math class="testfont"><mtext>𝚨</mtext></math>=<span>1D6A8</span></span> + <span><math class="testfont"><mtext>𝚩</mtext></math>=<span>1D6A9</span></span> + <span><math class="testfont"><mtext>𝚪</mtext></math>=<span>1D6AA</span></span> + <span><math class="testfont"><mtext>𝚫</mtext></math>=<span>1D6AB</span></span> + <span><math class="testfont"><mtext>𝚬</mtext></math>=<span>1D6AC</span></span> + <span><math class="testfont"><mtext>𝚭</mtext></math>=<span>1D6AD</span></span><br/> + <span><math class="testfont"><mtext>𝚮</mtext></math>=<span>1D6AE</span></span> + <span><math class="testfont"><mtext>𝚯</mtext></math>=<span>1D6AF</span></span> + <span><math class="testfont"><mtext>𝚰</mtext></math>=<span>1D6B0</span></span> + <span><math class="testfont"><mtext>𝚱</mtext></math>=<span>1D6B1</span></span> + <span><math class="testfont"><mtext>𝚲</mtext></math>=<span>1D6B2</span></span> + <span><math class="testfont"><mtext>𝚳</mtext></math>=<span>1D6B3</span></span> + <span><math class="testfont"><mtext>𝚴</mtext></math>=<span>1D6B4</span></span> + <span><math class="testfont"><mtext>𝚵</mtext></math>=<span>1D6B5</span></span> + <span><math class="testfont"><mtext>𝚶</mtext></math>=<span>1D6B6</span></span> + <span><math class="testfont"><mtext>𝚷</mtext></math>=<span>1D6B7</span></span><br/> + <span><math class="testfont"><mtext>𝚸</mtext></math>=<span>1D6B8</span></span> + <span><math class="testfont"><mtext>𝚺</mtext></math>=<span>1D6BA</span></span> + <span><math class="testfont"><mtext>𝚻</mtext></math>=<span>1D6BB</span></span> + <span><math class="testfont"><mtext>𝚼</mtext></math>=<span>1D6BC</span></span> + <span><math class="testfont"><mtext>𝚽</mtext></math>=<span>1D6BD</span></span> + <span><math class="testfont"><mtext>𝚾</mtext></math>=<span>1D6BE</span></span> + <span><math class="testfont"><mtext>𝚿</mtext></math>=<span>1D6BF</span></span> + <span><math class="testfont"><mtext>𝛀</mtext></math>=<span>1D6C0</span></span> + <span><math class="testfont"><mtext>𝛂</mtext></math>=<span>1D6C2</span></span> + <span><math class="testfont"><mtext>𝛃</mtext></math>=<span>1D6C3</span></span><br/> + <span><math class="testfont"><mtext>𝛄</mtext></math>=<span>1D6C4</span></span> + <span><math class="testfont"><mtext>𝛅</mtext></math>=<span>1D6C5</span></span> + <span><math class="testfont"><mtext>𝛆</mtext></math>=<span>1D6C6</span></span> + <span><math class="testfont"><mtext>𝛇</mtext></math>=<span>1D6C7</span></span> + <span><math class="testfont"><mtext>𝛈</mtext></math>=<span>1D6C8</span></span> + <span><math class="testfont"><mtext>𝛉</mtext></math>=<span>1D6C9</span></span> + <span><math class="testfont"><mtext>𝛊</mtext></math>=<span>1D6CA</span></span> + <span><math class="testfont"><mtext>𝛋</mtext></math>=<span>1D6CB</span></span> + <span><math class="testfont"><mtext>𝛌</mtext></math>=<span>1D6CC</span></span> + <span><math class="testfont"><mtext>𝛍</mtext></math>=<span>1D6CD</span></span><br/> + <span><math class="testfont"><mtext>𝛎</mtext></math>=<span>1D6CE</span></span> + <span><math class="testfont"><mtext>𝛏</mtext></math>=<span>1D6CF</span></span> + <span><math class="testfont"><mtext>𝛐</mtext></math>=<span>1D6D0</span></span> + <span><math class="testfont"><mtext>𝛑</mtext></math>=<span>1D6D1</span></span> + <span><math class="testfont"><mtext>𝛒</mtext></math>=<span>1D6D2</span></span> + <span><math class="testfont"><mtext>𝛓</mtext></math>=<span>1D6D3</span></span> + <span><math class="testfont"><mtext>𝛔</mtext></math>=<span>1D6D4</span></span> + <span><math class="testfont"><mtext>𝛕</mtext></math>=<span>1D6D5</span></span> + <span><math class="testfont"><mtext>𝛖</mtext></math>=<span>1D6D6</span></span> + <span><math class="testfont"><mtext>𝛗</mtext></math>=<span>1D6D7</span></span><br/> + <span><math class="testfont"><mtext>𝛘</mtext></math>=<span>1D6D8</span></span> + <span><math class="testfont"><mtext>𝛙</mtext></math>=<span>1D6D9</span></span> + <span><math class="testfont"><mtext>𝛚</mtext></math>=<span>1D6DA</span></span> + <span><math class="testfont"><mtext>𝛝</mtext></math>=<span>1D6DD</span></span> + <span><math class="testfont"><mtext>𝛟</mtext></math>=<span>1D6DF</span></span> + <span><math class="testfont"><mtext>𝛡</mtext></math>=<span>1D6E1</span></span> + <span><math class="testfont"><mtext>𝟊</mtext></math>=<span>1D7CA</span></span> + <span><math class="testfont"><mtext>𝟋</mtext></math>=<span>1D7CB</span></span> + <span><math class="testfont"><mtext>𝛞</mtext></math>=<span>1D6DE</span></span> + <span><math class="testfont"><mtext>𝛠</mtext></math>=<span>1D6E0</span></span><br/> + <span><math class="testfont"><mtext>𝚹</mtext></math>=<span>1D6B9</span></span> + <span><math class="testfont"><mtext>𝛜</mtext></math>=<span>1D6DC</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-sans-serif-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-sans-serif-ref.html new file mode 100644 index 0000000000..ec292b8e91 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-sans-serif-ref.html @@ -0,0 +1,147 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant bold-sans-serif (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-bold-sans-serif.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝞉</mtext></math>=<span>1D789</span></span> + <span><math class="testfont"><mtext>𝝯</mtext></math>=<span>1D76F</span></span> + <span><math class="testfont"><mtext>𝟬</mtext></math>=<span>1D7EC</span></span> + <span><math class="testfont"><mtext>𝟭</mtext></math>=<span>1D7ED</span></span> + <span><math class="testfont"><mtext>𝟮</mtext></math>=<span>1D7EE</span></span> + <span><math class="testfont"><mtext>𝟯</mtext></math>=<span>1D7EF</span></span> + <span><math class="testfont"><mtext>𝟰</mtext></math>=<span>1D7F0</span></span> + <span><math class="testfont"><mtext>𝟱</mtext></math>=<span>1D7F1</span></span> + <span><math class="testfont"><mtext>𝟲</mtext></math>=<span>1D7F2</span></span> + <span><math class="testfont"><mtext>𝟳</mtext></math>=<span>1D7F3</span></span><br/> + <span><math class="testfont"><mtext>𝟴</mtext></math>=<span>1D7F4</span></span> + <span><math class="testfont"><mtext>𝟵</mtext></math>=<span>1D7F5</span></span> + <span><math class="testfont"><mtext>𝗔</mtext></math>=<span>1D5D4</span></span> + <span><math class="testfont"><mtext>𝗕</mtext></math>=<span>1D5D5</span></span> + <span><math class="testfont"><mtext>𝗖</mtext></math>=<span>1D5D6</span></span> + <span><math class="testfont"><mtext>𝗗</mtext></math>=<span>1D5D7</span></span> + <span><math class="testfont"><mtext>𝗘</mtext></math>=<span>1D5D8</span></span> + <span><math class="testfont"><mtext>𝗙</mtext></math>=<span>1D5D9</span></span> + <span><math class="testfont"><mtext>𝗚</mtext></math>=<span>1D5DA</span></span> + <span><math class="testfont"><mtext>𝗛</mtext></math>=<span>1D5DB</span></span><br/> + <span><math class="testfont"><mtext>𝗜</mtext></math>=<span>1D5DC</span></span> + <span><math class="testfont"><mtext>𝗝</mtext></math>=<span>1D5DD</span></span> + <span><math class="testfont"><mtext>𝗞</mtext></math>=<span>1D5DE</span></span> + <span><math class="testfont"><mtext>𝗟</mtext></math>=<span>1D5DF</span></span> + <span><math class="testfont"><mtext>𝗠</mtext></math>=<span>1D5E0</span></span> + <span><math class="testfont"><mtext>𝗡</mtext></math>=<span>1D5E1</span></span> + <span><math class="testfont"><mtext>𝗢</mtext></math>=<span>1D5E2</span></span> + <span><math class="testfont"><mtext>𝗣</mtext></math>=<span>1D5E3</span></span> + <span><math class="testfont"><mtext>𝗤</mtext></math>=<span>1D5E4</span></span> + <span><math class="testfont"><mtext>𝗥</mtext></math>=<span>1D5E5</span></span><br/> + <span><math class="testfont"><mtext>𝗦</mtext></math>=<span>1D5E6</span></span> + <span><math class="testfont"><mtext>𝗧</mtext></math>=<span>1D5E7</span></span> + <span><math class="testfont"><mtext>𝗨</mtext></math>=<span>1D5E8</span></span> + <span><math class="testfont"><mtext>𝗩</mtext></math>=<span>1D5E9</span></span> + <span><math class="testfont"><mtext>𝗪</mtext></math>=<span>1D5EA</span></span> + <span><math class="testfont"><mtext>𝗫</mtext></math>=<span>1D5EB</span></span> + <span><math class="testfont"><mtext>𝗬</mtext></math>=<span>1D5EC</span></span> + <span><math class="testfont"><mtext>𝗭</mtext></math>=<span>1D5ED</span></span> + <span><math class="testfont"><mtext>𝗮</mtext></math>=<span>1D5EE</span></span> + <span><math class="testfont"><mtext>𝗯</mtext></math>=<span>1D5EF</span></span><br/> + <span><math class="testfont"><mtext>𝗰</mtext></math>=<span>1D5F0</span></span> + <span><math class="testfont"><mtext>𝗱</mtext></math>=<span>1D5F1</span></span> + <span><math class="testfont"><mtext>𝗲</mtext></math>=<span>1D5F2</span></span> + <span><math class="testfont"><mtext>𝗳</mtext></math>=<span>1D5F3</span></span> + <span><math class="testfont"><mtext>𝗴</mtext></math>=<span>1D5F4</span></span> + <span><math class="testfont"><mtext>𝗵</mtext></math>=<span>1D5F5</span></span> + <span><math class="testfont"><mtext>𝗶</mtext></math>=<span>1D5F6</span></span> + <span><math class="testfont"><mtext>𝗷</mtext></math>=<span>1D5F7</span></span> + <span><math class="testfont"><mtext>𝗸</mtext></math>=<span>1D5F8</span></span> + <span><math class="testfont"><mtext>𝗹</mtext></math>=<span>1D5F9</span></span><br/> + <span><math class="testfont"><mtext>𝗺</mtext></math>=<span>1D5FA</span></span> + <span><math class="testfont"><mtext>𝗻</mtext></math>=<span>1D5FB</span></span> + <span><math class="testfont"><mtext>𝗼</mtext></math>=<span>1D5FC</span></span> + <span><math class="testfont"><mtext>𝗽</mtext></math>=<span>1D5FD</span></span> + <span><math class="testfont"><mtext>𝗾</mtext></math>=<span>1D5FE</span></span> + <span><math class="testfont"><mtext>𝗿</mtext></math>=<span>1D5FF</span></span> + <span><math class="testfont"><mtext>𝘀</mtext></math>=<span>1D600</span></span> + <span><math class="testfont"><mtext>𝘁</mtext></math>=<span>1D601</span></span> + <span><math class="testfont"><mtext>𝘂</mtext></math>=<span>1D602</span></span> + <span><math class="testfont"><mtext>𝘃</mtext></math>=<span>1D603</span></span><br/> + <span><math class="testfont"><mtext>𝘄</mtext></math>=<span>1D604</span></span> + <span><math class="testfont"><mtext>𝘅</mtext></math>=<span>1D605</span></span> + <span><math class="testfont"><mtext>𝘆</mtext></math>=<span>1D606</span></span> + <span><math class="testfont"><mtext>𝘇</mtext></math>=<span>1D607</span></span> + <span><math class="testfont"><mtext>𝝖</mtext></math>=<span>1D756</span></span> + <span><math class="testfont"><mtext>𝝗</mtext></math>=<span>1D757</span></span> + <span><math class="testfont"><mtext>𝝘</mtext></math>=<span>1D758</span></span> + <span><math class="testfont"><mtext>𝝙</mtext></math>=<span>1D759</span></span> + <span><math class="testfont"><mtext>𝝚</mtext></math>=<span>1D75A</span></span> + <span><math class="testfont"><mtext>𝝛</mtext></math>=<span>1D75B</span></span><br/> + <span><math class="testfont"><mtext>𝝜</mtext></math>=<span>1D75C</span></span> + <span><math class="testfont"><mtext>𝝝</mtext></math>=<span>1D75D</span></span> + <span><math class="testfont"><mtext>𝝞</mtext></math>=<span>1D75E</span></span> + <span><math class="testfont"><mtext>𝝟</mtext></math>=<span>1D75F</span></span> + <span><math class="testfont"><mtext>𝝠</mtext></math>=<span>1D760</span></span> + <span><math class="testfont"><mtext>𝝡</mtext></math>=<span>1D761</span></span> + <span><math class="testfont"><mtext>𝝢</mtext></math>=<span>1D762</span></span> + <span><math class="testfont"><mtext>𝝣</mtext></math>=<span>1D763</span></span> + <span><math class="testfont"><mtext>𝝤</mtext></math>=<span>1D764</span></span> + <span><math class="testfont"><mtext>𝝥</mtext></math>=<span>1D765</span></span><br/> + <span><math class="testfont"><mtext>𝝦</mtext></math>=<span>1D766</span></span> + <span><math class="testfont"><mtext>𝝨</mtext></math>=<span>1D768</span></span> + <span><math class="testfont"><mtext>𝝩</mtext></math>=<span>1D769</span></span> + <span><math class="testfont"><mtext>𝝪</mtext></math>=<span>1D76A</span></span> + <span><math class="testfont"><mtext>𝝫</mtext></math>=<span>1D76B</span></span> + <span><math class="testfont"><mtext>𝝬</mtext></math>=<span>1D76C</span></span> + <span><math class="testfont"><mtext>𝝭</mtext></math>=<span>1D76D</span></span> + <span><math class="testfont"><mtext>𝝮</mtext></math>=<span>1D76E</span></span> + <span><math class="testfont"><mtext>𝝰</mtext></math>=<span>1D770</span></span> + <span><math class="testfont"><mtext>𝝱</mtext></math>=<span>1D771</span></span><br/> + <span><math class="testfont"><mtext>𝝲</mtext></math>=<span>1D772</span></span> + <span><math class="testfont"><mtext>𝝳</mtext></math>=<span>1D773</span></span> + <span><math class="testfont"><mtext>𝝴</mtext></math>=<span>1D774</span></span> + <span><math class="testfont"><mtext>𝝵</mtext></math>=<span>1D775</span></span> + <span><math class="testfont"><mtext>𝝶</mtext></math>=<span>1D776</span></span> + <span><math class="testfont"><mtext>𝝷</mtext></math>=<span>1D777</span></span> + <span><math class="testfont"><mtext>𝝸</mtext></math>=<span>1D778</span></span> + <span><math class="testfont"><mtext>𝝹</mtext></math>=<span>1D779</span></span> + <span><math class="testfont"><mtext>𝝺</mtext></math>=<span>1D77A</span></span> + <span><math class="testfont"><mtext>𝝻</mtext></math>=<span>1D77B</span></span><br/> + <span><math class="testfont"><mtext>𝝼</mtext></math>=<span>1D77C</span></span> + <span><math class="testfont"><mtext>𝝽</mtext></math>=<span>1D77D</span></span> + <span><math class="testfont"><mtext>𝝾</mtext></math>=<span>1D77E</span></span> + <span><math class="testfont"><mtext>𝝿</mtext></math>=<span>1D77F</span></span> + <span><math class="testfont"><mtext>𝞀</mtext></math>=<span>1D780</span></span> + <span><math class="testfont"><mtext>𝞁</mtext></math>=<span>1D781</span></span> + <span><math class="testfont"><mtext>𝞂</mtext></math>=<span>1D782</span></span> + <span><math class="testfont"><mtext>𝞃</mtext></math>=<span>1D783</span></span> + <span><math class="testfont"><mtext>𝞄</mtext></math>=<span>1D784</span></span> + <span><math class="testfont"><mtext>𝞅</mtext></math>=<span>1D785</span></span><br/> + <span><math class="testfont"><mtext>𝞆</mtext></math>=<span>1D786</span></span> + <span><math class="testfont"><mtext>𝞇</mtext></math>=<span>1D787</span></span> + <span><math class="testfont"><mtext>𝞈</mtext></math>=<span>1D788</span></span> + <span><math class="testfont"><mtext>𝞋</mtext></math>=<span>1D78B</span></span> + <span><math class="testfont"><mtext>𝞍</mtext></math>=<span>1D78D</span></span> + <span><math class="testfont"><mtext>𝞏</mtext></math>=<span>1D78F</span></span> + <span><math class="testfont"><mtext>𝞌</mtext></math>=<span>1D78C</span></span> + <span><math class="testfont"><mtext>𝞎</mtext></math>=<span>1D78E</span></span> + <span><math class="testfont"><mtext>𝝧</mtext></math>=<span>1D767</span></span> + <span><math class="testfont"><mtext>𝞊</mtext></math>=<span>1D78A</span></span><br/> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-sans-serif.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-sans-serif.html new file mode 100644 index 0000000000..cd7fdfaef8 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-sans-serif.html @@ -0,0 +1,153 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant bold-sans-serif</title> +<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/#bold-sans-serif-mappings"> +<link rel="match" href="mathvariant-bold-sans-serif-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a bold-sans-serif mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-bold-sans-serif.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">∂</mtext></math>=<span>1D789</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">∇</mtext></math>=<span>1D76F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">0</mtext></math>=<span>1D7EC</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">1</mtext></math>=<span>1D7ED</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">2</mtext></math>=<span>1D7EE</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">3</mtext></math>=<span>1D7EF</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">4</mtext></math>=<span>1D7F0</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">5</mtext></math>=<span>1D7F1</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">6</mtext></math>=<span>1D7F2</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">7</mtext></math>=<span>1D7F3</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">8</mtext></math>=<span>1D7F4</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">9</mtext></math>=<span>1D7F5</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">A</mtext></math>=<span>1D5D4</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">B</mtext></math>=<span>1D5D5</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">C</mtext></math>=<span>1D5D6</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">D</mtext></math>=<span>1D5D7</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">E</mtext></math>=<span>1D5D8</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">F</mtext></math>=<span>1D5D9</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">G</mtext></math>=<span>1D5DA</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">H</mtext></math>=<span>1D5DB</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">I</mtext></math>=<span>1D5DC</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">J</mtext></math>=<span>1D5DD</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">K</mtext></math>=<span>1D5DE</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">L</mtext></math>=<span>1D5DF</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">M</mtext></math>=<span>1D5E0</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">N</mtext></math>=<span>1D5E1</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">O</mtext></math>=<span>1D5E2</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">P</mtext></math>=<span>1D5E3</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Q</mtext></math>=<span>1D5E4</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">R</mtext></math>=<span>1D5E5</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">S</mtext></math>=<span>1D5E6</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">T</mtext></math>=<span>1D5E7</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">U</mtext></math>=<span>1D5E8</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">V</mtext></math>=<span>1D5E9</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">W</mtext></math>=<span>1D5EA</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">X</mtext></math>=<span>1D5EB</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Y</mtext></math>=<span>1D5EC</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Z</mtext></math>=<span>1D5ED</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">a</mtext></math>=<span>1D5EE</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">b</mtext></math>=<span>1D5EF</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">c</mtext></math>=<span>1D5F0</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">d</mtext></math>=<span>1D5F1</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">e</mtext></math>=<span>1D5F2</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">f</mtext></math>=<span>1D5F3</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">g</mtext></math>=<span>1D5F4</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">h</mtext></math>=<span>1D5F5</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">i</mtext></math>=<span>1D5F6</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">j</mtext></math>=<span>1D5F7</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">k</mtext></math>=<span>1D5F8</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">l</mtext></math>=<span>1D5F9</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">m</mtext></math>=<span>1D5FA</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">n</mtext></math>=<span>1D5FB</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">o</mtext></math>=<span>1D5FC</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">p</mtext></math>=<span>1D5FD</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">q</mtext></math>=<span>1D5FE</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">r</mtext></math>=<span>1D5FF</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">s</mtext></math>=<span>1D600</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">t</mtext></math>=<span>1D601</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">u</mtext></math>=<span>1D602</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">v</mtext></math>=<span>1D603</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">w</mtext></math>=<span>1D604</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">x</mtext></math>=<span>1D605</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">y</mtext></math>=<span>1D606</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">z</mtext></math>=<span>1D607</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Α</mtext></math>=<span>1D756</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Β</mtext></math>=<span>1D757</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Γ</mtext></math>=<span>1D758</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Δ</mtext></math>=<span>1D759</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Ε</mtext></math>=<span>1D75A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Ζ</mtext></math>=<span>1D75B</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Η</mtext></math>=<span>1D75C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Θ</mtext></math>=<span>1D75D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Ι</mtext></math>=<span>1D75E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Κ</mtext></math>=<span>1D75F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Λ</mtext></math>=<span>1D760</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Μ</mtext></math>=<span>1D761</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Ν</mtext></math>=<span>1D762</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Ξ</mtext></math>=<span>1D763</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Ο</mtext></math>=<span>1D764</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Π</mtext></math>=<span>1D765</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Ρ</mtext></math>=<span>1D766</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Σ</mtext></math>=<span>1D768</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Τ</mtext></math>=<span>1D769</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Υ</mtext></math>=<span>1D76A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Φ</mtext></math>=<span>1D76B</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Χ</mtext></math>=<span>1D76C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Ψ</mtext></math>=<span>1D76D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">Ω</mtext></math>=<span>1D76E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">α</mtext></math>=<span>1D770</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">β</mtext></math>=<span>1D771</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">γ</mtext></math>=<span>1D772</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">δ</mtext></math>=<span>1D773</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ε</mtext></math>=<span>1D774</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ζ</mtext></math>=<span>1D775</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">η</mtext></math>=<span>1D776</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">θ</mtext></math>=<span>1D777</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ι</mtext></math>=<span>1D778</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">κ</mtext></math>=<span>1D779</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">λ</mtext></math>=<span>1D77A</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">μ</mtext></math>=<span>1D77B</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ν</mtext></math>=<span>1D77C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ξ</mtext></math>=<span>1D77D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ο</mtext></math>=<span>1D77E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">π</mtext></math>=<span>1D77F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ρ</mtext></math>=<span>1D780</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ς</mtext></math>=<span>1D781</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">σ</mtext></math>=<span>1D782</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">τ</mtext></math>=<span>1D783</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">υ</mtext></math>=<span>1D784</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">φ</mtext></math>=<span>1D785</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">χ</mtext></math>=<span>1D786</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ψ</mtext></math>=<span>1D787</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ω</mtext></math>=<span>1D788</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ϑ</mtext></math>=<span>1D78B</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ϕ</mtext></math>=<span>1D78D</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ϖ</mtext></math>=<span>1D78F</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ϰ</mtext></math>=<span>1D78C</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ϱ</mtext></math>=<span>1D78E</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ϴ</mtext></math>=<span>1D767</span></span> + <span><math class="testfont"><mtext mathvariant="bold-sans-serif">ϵ</mtext></math>=<span>1D78A</span></span><br/> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-script-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-script-ref.html new file mode 100644 index 0000000000..ef11f7fb8f --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-script-ref.html @@ -0,0 +1,79 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant bold-script (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-bold-script.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝓐</mtext></math>=<span>1D4D0</span></span> + <span><math class="testfont"><mtext>𝓑</mtext></math>=<span>1D4D1</span></span> + <span><math class="testfont"><mtext>𝓒</mtext></math>=<span>1D4D2</span></span> + <span><math class="testfont"><mtext>𝓓</mtext></math>=<span>1D4D3</span></span> + <span><math class="testfont"><mtext>𝓔</mtext></math>=<span>1D4D4</span></span> + <span><math class="testfont"><mtext>𝓕</mtext></math>=<span>1D4D5</span></span> + <span><math class="testfont"><mtext>𝓖</mtext></math>=<span>1D4D6</span></span> + <span><math class="testfont"><mtext>𝓗</mtext></math>=<span>1D4D7</span></span> + <span><math class="testfont"><mtext>𝓘</mtext></math>=<span>1D4D8</span></span> + <span><math class="testfont"><mtext>𝓙</mtext></math>=<span>1D4D9</span></span><br/> + <span><math class="testfont"><mtext>𝓚</mtext></math>=<span>1D4DA</span></span> + <span><math class="testfont"><mtext>𝓛</mtext></math>=<span>1D4DB</span></span> + <span><math class="testfont"><mtext>𝓜</mtext></math>=<span>1D4DC</span></span> + <span><math class="testfont"><mtext>𝓝</mtext></math>=<span>1D4DD</span></span> + <span><math class="testfont"><mtext>𝓞</mtext></math>=<span>1D4DE</span></span> + <span><math class="testfont"><mtext>𝓟</mtext></math>=<span>1D4DF</span></span> + <span><math class="testfont"><mtext>𝓠</mtext></math>=<span>1D4E0</span></span> + <span><math class="testfont"><mtext>𝓡</mtext></math>=<span>1D4E1</span></span> + <span><math class="testfont"><mtext>𝓢</mtext></math>=<span>1D4E2</span></span> + <span><math class="testfont"><mtext>𝓣</mtext></math>=<span>1D4E3</span></span><br/> + <span><math class="testfont"><mtext>𝓤</mtext></math>=<span>1D4E4</span></span> + <span><math class="testfont"><mtext>𝓥</mtext></math>=<span>1D4E5</span></span> + <span><math class="testfont"><mtext>𝓦</mtext></math>=<span>1D4E6</span></span> + <span><math class="testfont"><mtext>𝓧</mtext></math>=<span>1D4E7</span></span> + <span><math class="testfont"><mtext>𝓨</mtext></math>=<span>1D4E8</span></span> + <span><math class="testfont"><mtext>𝓩</mtext></math>=<span>1D4E9</span></span> + <span><math class="testfont"><mtext>𝓪</mtext></math>=<span>1D4EA</span></span> + <span><math class="testfont"><mtext>𝓫</mtext></math>=<span>1D4EB</span></span> + <span><math class="testfont"><mtext>𝓬</mtext></math>=<span>1D4EC</span></span> + <span><math class="testfont"><mtext>𝓭</mtext></math>=<span>1D4ED</span></span><br/> + <span><math class="testfont"><mtext>𝓮</mtext></math>=<span>1D4EE</span></span> + <span><math class="testfont"><mtext>𝓯</mtext></math>=<span>1D4EF</span></span> + <span><math class="testfont"><mtext>𝓰</mtext></math>=<span>1D4F0</span></span> + <span><math class="testfont"><mtext>𝓱</mtext></math>=<span>1D4F1</span></span> + <span><math class="testfont"><mtext>𝓲</mtext></math>=<span>1D4F2</span></span> + <span><math class="testfont"><mtext>𝓳</mtext></math>=<span>1D4F3</span></span> + <span><math class="testfont"><mtext>𝓴</mtext></math>=<span>1D4F4</span></span> + <span><math class="testfont"><mtext>𝓵</mtext></math>=<span>1D4F5</span></span> + <span><math class="testfont"><mtext>𝓶</mtext></math>=<span>1D4F6</span></span> + <span><math class="testfont"><mtext>𝓷</mtext></math>=<span>1D4F7</span></span><br/> + <span><math class="testfont"><mtext>𝓸</mtext></math>=<span>1D4F8</span></span> + <span><math class="testfont"><mtext>𝓹</mtext></math>=<span>1D4F9</span></span> + <span><math class="testfont"><mtext>𝓺</mtext></math>=<span>1D4FA</span></span> + <span><math class="testfont"><mtext>𝓻</mtext></math>=<span>1D4FB</span></span> + <span><math class="testfont"><mtext>𝓼</mtext></math>=<span>1D4FC</span></span> + <span><math class="testfont"><mtext>𝓽</mtext></math>=<span>1D4FD</span></span> + <span><math class="testfont"><mtext>𝓾</mtext></math>=<span>1D4FE</span></span> + <span><math class="testfont"><mtext>𝓿</mtext></math>=<span>1D4FF</span></span> + <span><math class="testfont"><mtext>𝔀</mtext></math>=<span>1D500</span></span> + <span><math class="testfont"><mtext>𝔁</mtext></math>=<span>1D501</span></span><br/> + <span><math class="testfont"><mtext>𝔂</mtext></math>=<span>1D502</span></span> + <span><math class="testfont"><mtext>𝔃</mtext></math>=<span>1D503</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-script.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-script.html new file mode 100644 index 0000000000..0e775949f9 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold-script.html @@ -0,0 +1,85 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant bold-script</title> +<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/#bold-script-mappings"> +<link rel="match" href="mathvariant-bold-script-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a bold-script mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-bold-script.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="bold-script">A</mtext></math>=<span>1D4D0</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">B</mtext></math>=<span>1D4D1</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">C</mtext></math>=<span>1D4D2</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">D</mtext></math>=<span>1D4D3</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">E</mtext></math>=<span>1D4D4</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">F</mtext></math>=<span>1D4D5</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">G</mtext></math>=<span>1D4D6</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">H</mtext></math>=<span>1D4D7</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">I</mtext></math>=<span>1D4D8</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">J</mtext></math>=<span>1D4D9</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-script">K</mtext></math>=<span>1D4DA</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">L</mtext></math>=<span>1D4DB</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">M</mtext></math>=<span>1D4DC</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">N</mtext></math>=<span>1D4DD</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">O</mtext></math>=<span>1D4DE</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">P</mtext></math>=<span>1D4DF</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">Q</mtext></math>=<span>1D4E0</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">R</mtext></math>=<span>1D4E1</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">S</mtext></math>=<span>1D4E2</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">T</mtext></math>=<span>1D4E3</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-script">U</mtext></math>=<span>1D4E4</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">V</mtext></math>=<span>1D4E5</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">W</mtext></math>=<span>1D4E6</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">X</mtext></math>=<span>1D4E7</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">Y</mtext></math>=<span>1D4E8</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">Z</mtext></math>=<span>1D4E9</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">a</mtext></math>=<span>1D4EA</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">b</mtext></math>=<span>1D4EB</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">c</mtext></math>=<span>1D4EC</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">d</mtext></math>=<span>1D4ED</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-script">e</mtext></math>=<span>1D4EE</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">f</mtext></math>=<span>1D4EF</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">g</mtext></math>=<span>1D4F0</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">h</mtext></math>=<span>1D4F1</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">i</mtext></math>=<span>1D4F2</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">j</mtext></math>=<span>1D4F3</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">k</mtext></math>=<span>1D4F4</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">l</mtext></math>=<span>1D4F5</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">m</mtext></math>=<span>1D4F6</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">n</mtext></math>=<span>1D4F7</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-script">o</mtext></math>=<span>1D4F8</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">p</mtext></math>=<span>1D4F9</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">q</mtext></math>=<span>1D4FA</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">r</mtext></math>=<span>1D4FB</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">s</mtext></math>=<span>1D4FC</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">t</mtext></math>=<span>1D4FD</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">u</mtext></math>=<span>1D4FE</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">v</mtext></math>=<span>1D4FF</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">w</mtext></math>=<span>1D500</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">x</mtext></math>=<span>1D501</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold-script">y</mtext></math>=<span>1D502</span></span> + <span><math class="testfont"><mtext mathvariant="bold-script">z</mtext></math>=<span>1D503</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold.html new file mode 100644 index 0000000000..513eac7f87 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-bold.html @@ -0,0 +1,155 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant bold</title> +<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/#bold-mappings"> +<link rel="match" href="mathvariant-bold-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a bold mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-bold.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="bold">∂</mtext></math>=<span>1D6DB</span></span> + <span><math class="testfont"><mtext mathvariant="bold">∇</mtext></math>=<span>1D6C1</span></span> + <span><math class="testfont"><mtext mathvariant="bold">0</mtext></math>=<span>1D7CE</span></span> + <span><math class="testfont"><mtext mathvariant="bold">1</mtext></math>=<span>1D7CF</span></span> + <span><math class="testfont"><mtext mathvariant="bold">2</mtext></math>=<span>1D7D0</span></span> + <span><math class="testfont"><mtext mathvariant="bold">3</mtext></math>=<span>1D7D1</span></span> + <span><math class="testfont"><mtext mathvariant="bold">4</mtext></math>=<span>1D7D2</span></span> + <span><math class="testfont"><mtext mathvariant="bold">5</mtext></math>=<span>1D7D3</span></span> + <span><math class="testfont"><mtext mathvariant="bold">6</mtext></math>=<span>1D7D4</span></span> + <span><math class="testfont"><mtext mathvariant="bold">7</mtext></math>=<span>1D7D5</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">8</mtext></math>=<span>1D7D6</span></span> + <span><math class="testfont"><mtext mathvariant="bold">9</mtext></math>=<span>1D7D7</span></span> + <span><math class="testfont"><mtext mathvariant="bold">A</mtext></math>=<span>1D400</span></span> + <span><math class="testfont"><mtext mathvariant="bold">B</mtext></math>=<span>1D401</span></span> + <span><math class="testfont"><mtext mathvariant="bold">C</mtext></math>=<span>1D402</span></span> + <span><math class="testfont"><mtext mathvariant="bold">D</mtext></math>=<span>1D403</span></span> + <span><math class="testfont"><mtext mathvariant="bold">E</mtext></math>=<span>1D404</span></span> + <span><math class="testfont"><mtext mathvariant="bold">F</mtext></math>=<span>1D405</span></span> + <span><math class="testfont"><mtext mathvariant="bold">G</mtext></math>=<span>1D406</span></span> + <span><math class="testfont"><mtext mathvariant="bold">H</mtext></math>=<span>1D407</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">I</mtext></math>=<span>1D408</span></span> + <span><math class="testfont"><mtext mathvariant="bold">J</mtext></math>=<span>1D409</span></span> + <span><math class="testfont"><mtext mathvariant="bold">K</mtext></math>=<span>1D40A</span></span> + <span><math class="testfont"><mtext mathvariant="bold">L</mtext></math>=<span>1D40B</span></span> + <span><math class="testfont"><mtext mathvariant="bold">M</mtext></math>=<span>1D40C</span></span> + <span><math class="testfont"><mtext mathvariant="bold">N</mtext></math>=<span>1D40D</span></span> + <span><math class="testfont"><mtext mathvariant="bold">O</mtext></math>=<span>1D40E</span></span> + <span><math class="testfont"><mtext mathvariant="bold">P</mtext></math>=<span>1D40F</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Q</mtext></math>=<span>1D410</span></span> + <span><math class="testfont"><mtext mathvariant="bold">R</mtext></math>=<span>1D411</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">S</mtext></math>=<span>1D412</span></span> + <span><math class="testfont"><mtext mathvariant="bold">T</mtext></math>=<span>1D413</span></span> + <span><math class="testfont"><mtext mathvariant="bold">U</mtext></math>=<span>1D414</span></span> + <span><math class="testfont"><mtext mathvariant="bold">V</mtext></math>=<span>1D415</span></span> + <span><math class="testfont"><mtext mathvariant="bold">W</mtext></math>=<span>1D416</span></span> + <span><math class="testfont"><mtext mathvariant="bold">X</mtext></math>=<span>1D417</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Y</mtext></math>=<span>1D418</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Z</mtext></math>=<span>1D419</span></span> + <span><math class="testfont"><mtext mathvariant="bold">a</mtext></math>=<span>1D41A</span></span> + <span><math class="testfont"><mtext mathvariant="bold">b</mtext></math>=<span>1D41B</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">c</mtext></math>=<span>1D41C</span></span> + <span><math class="testfont"><mtext mathvariant="bold">d</mtext></math>=<span>1D41D</span></span> + <span><math class="testfont"><mtext mathvariant="bold">e</mtext></math>=<span>1D41E</span></span> + <span><math class="testfont"><mtext mathvariant="bold">f</mtext></math>=<span>1D41F</span></span> + <span><math class="testfont"><mtext mathvariant="bold">g</mtext></math>=<span>1D420</span></span> + <span><math class="testfont"><mtext mathvariant="bold">h</mtext></math>=<span>1D421</span></span> + <span><math class="testfont"><mtext mathvariant="bold">i</mtext></math>=<span>1D422</span></span> + <span><math class="testfont"><mtext mathvariant="bold">j</mtext></math>=<span>1D423</span></span> + <span><math class="testfont"><mtext mathvariant="bold">k</mtext></math>=<span>1D424</span></span> + <span><math class="testfont"><mtext mathvariant="bold">l</mtext></math>=<span>1D425</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">m</mtext></math>=<span>1D426</span></span> + <span><math class="testfont"><mtext mathvariant="bold">n</mtext></math>=<span>1D427</span></span> + <span><math class="testfont"><mtext mathvariant="bold">o</mtext></math>=<span>1D428</span></span> + <span><math class="testfont"><mtext mathvariant="bold">p</mtext></math>=<span>1D429</span></span> + <span><math class="testfont"><mtext mathvariant="bold">q</mtext></math>=<span>1D42A</span></span> + <span><math class="testfont"><mtext mathvariant="bold">r</mtext></math>=<span>1D42B</span></span> + <span><math class="testfont"><mtext mathvariant="bold">s</mtext></math>=<span>1D42C</span></span> + <span><math class="testfont"><mtext mathvariant="bold">t</mtext></math>=<span>1D42D</span></span> + <span><math class="testfont"><mtext mathvariant="bold">u</mtext></math>=<span>1D42E</span></span> + <span><math class="testfont"><mtext mathvariant="bold">v</mtext></math>=<span>1D42F</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">w</mtext></math>=<span>1D430</span></span> + <span><math class="testfont"><mtext mathvariant="bold">x</mtext></math>=<span>1D431</span></span> + <span><math class="testfont"><mtext mathvariant="bold">y</mtext></math>=<span>1D432</span></span> + <span><math class="testfont"><mtext mathvariant="bold">z</mtext></math>=<span>1D433</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Α</mtext></math>=<span>1D6A8</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Β</mtext></math>=<span>1D6A9</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Γ</mtext></math>=<span>1D6AA</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Δ</mtext></math>=<span>1D6AB</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Ε</mtext></math>=<span>1D6AC</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Ζ</mtext></math>=<span>1D6AD</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">Η</mtext></math>=<span>1D6AE</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Θ</mtext></math>=<span>1D6AF</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Ι</mtext></math>=<span>1D6B0</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Κ</mtext></math>=<span>1D6B1</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Λ</mtext></math>=<span>1D6B2</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Μ</mtext></math>=<span>1D6B3</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Ν</mtext></math>=<span>1D6B4</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Ξ</mtext></math>=<span>1D6B5</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Ο</mtext></math>=<span>1D6B6</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Π</mtext></math>=<span>1D6B7</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">Ρ</mtext></math>=<span>1D6B8</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Σ</mtext></math>=<span>1D6BA</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Τ</mtext></math>=<span>1D6BB</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Υ</mtext></math>=<span>1D6BC</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Φ</mtext></math>=<span>1D6BD</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Χ</mtext></math>=<span>1D6BE</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Ψ</mtext></math>=<span>1D6BF</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Ω</mtext></math>=<span>1D6C0</span></span> + <span><math class="testfont"><mtext mathvariant="bold">α</mtext></math>=<span>1D6C2</span></span> + <span><math class="testfont"><mtext mathvariant="bold">β</mtext></math>=<span>1D6C3</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">γ</mtext></math>=<span>1D6C4</span></span> + <span><math class="testfont"><mtext mathvariant="bold">δ</mtext></math>=<span>1D6C5</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ε</mtext></math>=<span>1D6C6</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ζ</mtext></math>=<span>1D6C7</span></span> + <span><math class="testfont"><mtext mathvariant="bold">η</mtext></math>=<span>1D6C8</span></span> + <span><math class="testfont"><mtext mathvariant="bold">θ</mtext></math>=<span>1D6C9</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ι</mtext></math>=<span>1D6CA</span></span> + <span><math class="testfont"><mtext mathvariant="bold">κ</mtext></math>=<span>1D6CB</span></span> + <span><math class="testfont"><mtext mathvariant="bold">λ</mtext></math>=<span>1D6CC</span></span> + <span><math class="testfont"><mtext mathvariant="bold">μ</mtext></math>=<span>1D6CD</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">ν</mtext></math>=<span>1D6CE</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ξ</mtext></math>=<span>1D6CF</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ο</mtext></math>=<span>1D6D0</span></span> + <span><math class="testfont"><mtext mathvariant="bold">π</mtext></math>=<span>1D6D1</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ρ</mtext></math>=<span>1D6D2</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ς</mtext></math>=<span>1D6D3</span></span> + <span><math class="testfont"><mtext mathvariant="bold">σ</mtext></math>=<span>1D6D4</span></span> + <span><math class="testfont"><mtext mathvariant="bold">τ</mtext></math>=<span>1D6D5</span></span> + <span><math class="testfont"><mtext mathvariant="bold">υ</mtext></math>=<span>1D6D6</span></span> + <span><math class="testfont"><mtext mathvariant="bold">φ</mtext></math>=<span>1D6D7</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">χ</mtext></math>=<span>1D6D8</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ψ</mtext></math>=<span>1D6D9</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ω</mtext></math>=<span>1D6DA</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ϑ</mtext></math>=<span>1D6DD</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ϕ</mtext></math>=<span>1D6DF</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ϖ</mtext></math>=<span>1D6E1</span></span> + <span><math class="testfont"><mtext mathvariant="bold">Ϝ</mtext></math>=<span>1D7CA</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ϝ</mtext></math>=<span>1D7CB</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ϰ</mtext></math>=<span>1D6DE</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ϱ</mtext></math>=<span>1D6E0</span></span><br/> + <span><math class="testfont"><mtext mathvariant="bold">ϴ</mtext></math>=<span>1D6B9</span></span> + <span><math class="testfont"><mtext mathvariant="bold">ϵ</mtext></math>=<span>1D6DC</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-case-sensitivity-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-case-sensitivity-ref.html new file mode 100644 index 0000000000..28d9acc1f4 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-case-sensitivity-ref.html @@ -0,0 +1,163 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant case sensitivity</title> +<style> + @font-face { + font-family: mathvariant-bold-fraktur; + src: url("/fonts/math/mathvariant-bold-fraktur.woff"); + } + @font-face { + font-family: mathvariant-bold; + src: url("/fonts/math/mathvariant-bold.woff"); + } + @font-face { + font-family: mathvariant-bold-italic; + src: url("/fonts/math/mathvariant-bold-italic.woff"); + } + @font-face { + font-family: mathvariant-bold-sans-serif; + src: url("/fonts/math/mathvariant-bold-sans-serif.woff"); + } + @font-face { + font-family: mathvariant-bold-script; + src: url("/fonts/math/mathvariant-bold-script.woff"); + } + @font-face { + font-family: mathvariant-double-struck; + src: url("/fonts/math/mathvariant-double-struck.woff"); + } + @font-face { + font-family: mathvariant-fraktur; + src: url("/fonts/math/mathvariant-fraktur.woff"); + } + @font-face { + font-family: mathvariant-initial; + src: url("/fonts/math/mathvariant-initial.woff"); + } + @font-face { + font-family: mathvariant-italic; + src: url("/fonts/math/mathvariant-italic.woff"); + } + @font-face { + font-family: mathvariant-looped; + src: url("/fonts/math/mathvariant-looped.woff"); + } + @font-face { + font-family: mathvariant-monospace; + src: url("/fonts/math/mathvariant-monospace.woff"); + } + @font-face { + font-family: mathvariant-sans-serif-bold-italic; + src: url("/fonts/math/mathvariant-sans-serif-bold-italic.woff"); + } + @font-face { + font-family: mathvariant-sans-serif; + src: url("/fonts/math/mathvariant-sans-serif.woff"); + } + @font-face { + font-family: mathvariant-sans-serif-italic; + src: url("/fonts/math/mathvariant-sans-serif-italic.woff"); + } + @font-face { + font-family: mathvariant-script; + src: url("/fonts/math/mathvariant-script.woff"); + } + @font-face { + font-family: mathvariant-stretched; + src: url("/fonts/math/mathvariant-stretched.woff"); + } + @font-face { + font-family: mathvariant-tailed; + src: url("/fonts/math/mathvariant-tailed.woff"); + } +</style> +<body> + <p> + <math style="font-family: mathvariant-bold-fraktur"> + <mtext>𝕬</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-bold"> + <mtext>𝐀</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-bold-italic"> + <mtext>𝑨</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-bold-sans-serif"> + <mtext>𝗔</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-bold-script"> + <mtext>𝓐</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-double-struck"> + <mtext>𝔸</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-fraktur"> + <mtext>𝔄</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-initial"> + <mtext>𞸰</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-italic"> + <mtext>𝐴</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-looped"> + <mtext>𞺐</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-monospace"> + <mtext>𝙰</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-sans-serif-bold-italic"> + <mtext>𝘼</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-sans-serif"> + <mtext>𝖠</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-sans-serif-italic"> + <mtext>𝘈</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-script"> + <mtext>𝒜</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-stretched"> + <mtext>𞹰</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-tailed"> + <mtext>𞹒</mtext> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-case-sensitivity.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-case-sensitivity.html new file mode 100644 index 0000000000..21c8300a7a --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-case-sensitivity.html @@ -0,0 +1,168 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant case sensitivity</title> +<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="match" href="mathvariant-case-sensitivity-ref.html"/> +<meta name="assert" content="Verify that mathvariant value is case insensitive"> +<style> + @font-face { + font-family: mathvariant-bold-fraktur; + src: url("/fonts/math/mathvariant-bold-fraktur.woff"); + } + @font-face { + font-family: mathvariant-bold; + src: url("/fonts/math/mathvariant-bold.woff"); + } + @font-face { + font-family: mathvariant-bold-italic; + src: url("/fonts/math/mathvariant-bold-italic.woff"); + } + @font-face { + font-family: mathvariant-bold-sans-serif; + src: url("/fonts/math/mathvariant-bold-sans-serif.woff"); + } + @font-face { + font-family: mathvariant-bold-script; + src: url("/fonts/math/mathvariant-bold-script.woff"); + } + @font-face { + font-family: mathvariant-double-struck; + src: url("/fonts/math/mathvariant-double-struck.woff"); + } + @font-face { + font-family: mathvariant-fraktur; + src: url("/fonts/math/mathvariant-fraktur.woff"); + } + @font-face { + font-family: mathvariant-initial; + src: url("/fonts/math/mathvariant-initial.woff"); + } + @font-face { + font-family: mathvariant-italic; + src: url("/fonts/math/mathvariant-italic.woff"); + } + @font-face { + font-family: mathvariant-looped; + src: url("/fonts/math/mathvariant-looped.woff"); + } + @font-face { + font-family: mathvariant-monospace; + src: url("/fonts/math/mathvariant-monospace.woff"); + } + @font-face { + font-family: mathvariant-sans-serif-bold-italic; + src: url("/fonts/math/mathvariant-sans-serif-bold-italic.woff"); + } + @font-face { + font-family: mathvariant-sans-serif; + src: url("/fonts/math/mathvariant-sans-serif.woff"); + } + @font-face { + font-family: mathvariant-sans-serif-italic; + src: url("/fonts/math/mathvariant-sans-serif-italic.woff"); + } + @font-face { + font-family: mathvariant-script; + src: url("/fonts/math/mathvariant-script.woff"); + } + @font-face { + font-family: mathvariant-stretched; + src: url("/fonts/math/mathvariant-stretched.woff"); + } + @font-face { + font-family: mathvariant-tailed; + src: url("/fonts/math/mathvariant-tailed.woff"); + } +</style> +<body> + <p> + <math style="font-family: mathvariant-bold-fraktur"> + <mtext mathvariant="BoLd-fRaKtUr">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-bold"> + <mtext mathvariant="BoLd">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-bold-italic"> + <mtext mathvariant="BoLd-iTaLiC">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-bold-sans-serif"> + <mtext mathvariant="BoLd-sAnS-SeRiF">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-bold-script"> + <mtext mathvariant="BoLd-sCrIpT">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-double-struck"> + <mtext mathvariant="DoUbLe-sTrUcK">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-fraktur"> + <mtext mathvariant="FrAkTuR">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-initial"> + <mtext mathvariant="InItIaL">ف</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-italic"> + <mtext mathvariant="ItAlIc">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-looped"> + <mtext mathvariant="LoOpEd">ف</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-monospace"> + <mtext mathvariant="MoNoSpAcE">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-sans-serif-bold-italic"> + <mtext mathvariant="SaNs-sErIf-bOlD-ItAlIc">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-sans-serif"> + <mtext mathvariant="SaNs-sErIf">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-sans-serif-italic"> + <mtext mathvariant="SaNs-sErIf-iTaLiC">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-script"> + <mtext mathvariant="ScRiPt">A</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-stretched"> + <mtext mathvariant="StReTcHeD">ف</mtext> + </math> + </p> + <p> + <math style="font-family: mathvariant-tailed"> + <mtext mathvariant="TaIlEd">ق</mtext> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck-font-style-font-weight-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck-font-style-font-weight-ref.html new file mode 100644 index 0000000000..817723a62d --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck-font-style-font-weight-ref.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>mathvariant="double-struck" and font-style/font-weight (reference)</title> + <style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-double-struck.woff"); + } + .testfont { + font-family: TestFont; + font-size: 32px; + } + .italic { font-style: italic; } + .bold { font-weight: bold; } + </style> + </head> + <body> + <p>Test passes if you see three lines with text <span class="testfont">𞺡</span> respectively rendered with italic, bold and bold-italic style:</p> + <p><math class="testfont"><mtext class="italic">𞺡</mtext></math></p> + <p><math class="testfont"><mtext class="bold">𞺡</mtext></math></p> + <p><math class="testfont"><mtext class="bold italic">𞺡</mtext></math></p> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck-font-style-font-weight.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck-font-style-font-weight.html new file mode 100644 index 0000000000..2e283e1d70 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck-font-style-font-weight.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>mathvariant="double-struck" and font-style/font-weight</title> + <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://bugzilla.mozilla.org/show_bug.cgi?id=1789081"> + <link rel="match" href="mathvariant-double-struck-font-style-font-weight-ref.html"/> + <meta name="assert" content="Verify that mathvariant='double-struck' don't reset the font-style/font-weight properties."> + <style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-double-struck.woff"); + } + .testfont { + font-family: TestFont; + font-size: 32px; + } + .italic { font-style: italic; } + .bold { font-weight: bold; } + </style> + </head> + <body> + <p>Test passes if you see three lines with text <span class="testfont">𞺡</span> respectively rendered with italic, bold and bold-italic style:</p> + <p><math class="testfont"><mtext mathvariant="double-struck" class="italic">ب</mtext></math></p> + <p><math class="testfont"><mtext mathvariant="double-struck" class="bold">ب</mtext></math></p> + <p><math class="testfont"><mtext mathvariant="double-struck" class="bold italic">ب</mtext></math></p> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck-ref.html new file mode 100644 index 0000000000..686aa492e0 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck-ref.html @@ -0,0 +1,114 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant double-struck (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-double-struck.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𞺡</mtext></math>=<span>1EEA1</span></span> + <span><math class="testfont"><mtext>𞺵</mtext></math>=<span>1EEB5</span></span> + <span><math class="testfont"><mtext>𞺶</mtext></math>=<span>1EEB6</span></span> + <span><math class="testfont"><mtext>𞺢</mtext></math>=<span>1EEA2</span></span> + <span><math class="testfont"><mtext>𞺧</mtext></math>=<span>1EEA7</span></span> + <span><math class="testfont"><mtext>𞺷</mtext></math>=<span>1EEB7</span></span> + <span><math class="testfont"><mtext>𞺣</mtext></math>=<span>1EEA3</span></span> + <span><math class="testfont"><mtext>𞺸</mtext></math>=<span>1EEB8</span></span> + <span><math class="testfont"><mtext>𞺳</mtext></math>=<span>1EEB3</span></span> + <span><math class="testfont"><mtext>𞺦</mtext></math>=<span>1EEA6</span></span><br/> + <span><math class="testfont"><mtext>𝟛</mtext></math>=<span>1D7DB</span></span> + <span><math class="testfont"><mtext>𝟜</mtext></math>=<span>1D7DC</span></span> + <span><math class="testfont"><mtext>𝟝</mtext></math>=<span>1D7DD</span></span> + <span><math class="testfont"><mtext>𞺹</mtext></math>=<span>1EEB9</span></span> + <span><math class="testfont"><mtext>𞺨</mtext></math>=<span>1EEA8</span></span> + <span><math class="testfont"><mtext>𞺺</mtext></math>=<span>1EEBA</span></span> + <span><math class="testfont"><mtext>𝟡</mtext></math>=<span>1D7E1</span></span> + <span><math class="testfont"><mtext>𞺻</mtext></math>=<span>1EEBB</span></span> + <span><math class="testfont"><mtext>𞺰</mtext></math>=<span>1EEB0</span></span> + <span><math class="testfont"><mtext>𞺲</mtext></math>=<span>1EEB2</span></span><br/> + <span><math class="testfont"><mtext>ℂ</mtext></math>=<span>02102</span></span> + <span><math class="testfont"><mtext>𞺫</mtext></math>=<span>1EEAB</span></span> + <span><math class="testfont"><mtext>𞺬</mtext></math>=<span>1EEAC</span></span> + <span><math class="testfont"><mtext>𞺭</mtext></math>=<span>1EEAD</span></span> + <span><math class="testfont"><mtext>𝔾</mtext></math>=<span>1D53E</span></span> + <span><math class="testfont"><mtext>𞺥</mtext></math>=<span>1EEA5</span></span> + <span><math class="testfont"><mtext>𝕀</mtext></math>=<span>1D540</span></span> + <span><math class="testfont"><mtext>𞺩</mtext></math>=<span>1EEA9</span></span> + <span><math class="testfont"><mtext>𝕂</mtext></math>=<span>1D542</span></span> + <span><math class="testfont"><mtext>𝕃</mtext></math>=<span>1D543</span></span><br/> + <span><math class="testfont"><mtext>𝕄</mtext></math>=<span>1D544</span></span> + <span><math class="testfont"><mtext>ℕ</mtext></math>=<span>02115</span></span> + <span><math class="testfont"><mtext>𝕆</mtext></math>=<span>1D546</span></span> + <span><math class="testfont"><mtext>ℙ</mtext></math>=<span>02119</span></span> + <span><math class="testfont"><mtext>ℚ</mtext></math>=<span>0211A</span></span> + <span><math class="testfont"><mtext>ℝ</mtext></math>=<span>0211D</span></span> + <span><math class="testfont"><mtext>𝕊</mtext></math>=<span>1D54A</span></span> + <span><math class="testfont"><mtext>𝕋</mtext></math>=<span>1D54B</span></span> + <span><math class="testfont"><mtext>𝕌</mtext></math>=<span>1D54C</span></span> + <span><math class="testfont"><mtext>𝕍</mtext></math>=<span>1D54D</span></span><br/> + <span><math class="testfont"><mtext>𝕎</mtext></math>=<span>1D54E</span></span> + <span><math class="testfont"><mtext>𝕏</mtext></math>=<span>1D54F</span></span> + <span><math class="testfont"><mtext>𝕐</mtext></math>=<span>1D550</span></span> + <span><math class="testfont"><mtext>ℤ</mtext></math>=<span>02124</span></span> + <span><math class="testfont"><mtext>𝕒</mtext></math>=<span>1D552</span></span> + <span><math class="testfont"><mtext>𝕓</mtext></math>=<span>1D553</span></span> + <span><math class="testfont"><mtext>𝕔</mtext></math>=<span>1D554</span></span> + <span><math class="testfont"><mtext>𝕕</mtext></math>=<span>1D555</span></span> + <span><math class="testfont"><mtext>𝕖</mtext></math>=<span>1D556</span></span> + <span><math class="testfont"><mtext>𝕗</mtext></math>=<span>1D557</span></span><br/> + <span><math class="testfont"><mtext>𝕘</mtext></math>=<span>1D558</span></span> + <span><math class="testfont"><mtext>𝕙</mtext></math>=<span>1D559</span></span> + <span><math class="testfont"><mtext>𝕚</mtext></math>=<span>1D55A</span></span> + <span><math class="testfont"><mtext>𝕛</mtext></math>=<span>1D55B</span></span> + <span><math class="testfont"><mtext>𝕜</mtext></math>=<span>1D55C</span></span> + <span><math class="testfont"><mtext>𝕝</mtext></math>=<span>1D55D</span></span> + <span><math class="testfont"><mtext>𝕞</mtext></math>=<span>1D55E</span></span> + <span><math class="testfont"><mtext>𝕟</mtext></math>=<span>1D55F</span></span> + <span><math class="testfont"><mtext>𝕠</mtext></math>=<span>1D560</span></span> + <span><math class="testfont"><mtext>𝕡</mtext></math>=<span>1D561</span></span><br/> + <span><math class="testfont"><mtext>𝕢</mtext></math>=<span>1D562</span></span> + <span><math class="testfont"><mtext>𝕣</mtext></math>=<span>1D563</span></span> + <span><math class="testfont"><mtext>𝕤</mtext></math>=<span>1D564</span></span> + <span><math class="testfont"><mtext>𝕥</mtext></math>=<span>1D565</span></span> + <span><math class="testfont"><mtext>𝕦</mtext></math>=<span>1D566</span></span> + <span><math class="testfont"><mtext>𝕧</mtext></math>=<span>1D567</span></span> + <span><math class="testfont"><mtext>𝕨</mtext></math>=<span>1D568</span></span> + <span><math class="testfont"><mtext>𝕩</mtext></math>=<span>1D569</span></span> + <span><math class="testfont"><mtext>𝕪</mtext></math>=<span>1D56A</span></span> + <span><math class="testfont"><mtext>𝕫</mtext></math>=<span>1D56B</span></span><br/> + <span><math class="testfont"><mtext>𝟘</mtext></math>=<span>1D7D8</span></span> + <span><math class="testfont"><mtext>𝟙</mtext></math>=<span>1D7D9</span></span> + <span><math class="testfont"><mtext>𝟚</mtext></math>=<span>1D7DA</span></span> + <span><math class="testfont"><mtext>𞺮</mtext></math>=<span>1EEAE</span></span> + <span><math class="testfont"><mtext>𞺴</mtext></math>=<span>1EEB4</span></span> + <span><math class="testfont"><mtext>𞺱</mtext></math>=<span>1EEB1</span></span> + <span><math class="testfont"><mtext>𝟞</mtext></math>=<span>1D7DE</span></span> + <span><math class="testfont"><mtext>𝟟</mtext></math>=<span>1D7DF</span></span> + <span><math class="testfont"><mtext>𝟠</mtext></math>=<span>1D7E0</span></span> + <span><math class="testfont"><mtext>𞺯</mtext></math>=<span>1EEAF</span></span><br/> + <span><math class="testfont"><mtext>𝔸</mtext></math>=<span>1D538</span></span> + <span><math class="testfont"><mtext>𝔹</mtext></math>=<span>1D539</span></span> + <span><math class="testfont"><mtext>𝔻</mtext></math>=<span>1D53B</span></span> + <span><math class="testfont"><mtext>𝔼</mtext></math>=<span>1D53C</span></span> + <span><math class="testfont"><mtext>𝔽</mtext></math>=<span>1D53D</span></span> + <span><math class="testfont"><mtext>ℍ</mtext></math>=<span>0210D</span></span> + <span><math class="testfont"><mtext>𝕁</mtext></math>=<span>1D541</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck.html new file mode 100644 index 0000000000..8592c2136a --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-double-struck.html @@ -0,0 +1,120 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant double-struck</title> +<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/#double-struck-mappings"> +<link rel="match" href="mathvariant-double-struck-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a double-struck mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-double-struck.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="double-struck">ب</mtext></math>=<span>1EEA1</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ت</mtext></math>=<span>1EEB5</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ث</mtext></math>=<span>1EEB6</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ج</mtext></math>=<span>1EEA2</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ح</mtext></math>=<span>1EEA7</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">خ</mtext></math>=<span>1EEB7</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">د</mtext></math>=<span>1EEA3</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ذ</mtext></math>=<span>1EEB8</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ر</mtext></math>=<span>1EEB3</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ز</mtext></math>=<span>1EEA6</span></span><br/> + <span><math class="testfont"><mtext mathvariant="double-struck">3</mtext></math>=<span>1D7DB</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">4</mtext></math>=<span>1D7DC</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">5</mtext></math>=<span>1D7DD</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ض</mtext></math>=<span>1EEB9</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ط</mtext></math>=<span>1EEA8</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ظ</mtext></math>=<span>1EEBA</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">9</mtext></math>=<span>1D7E1</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">غ</mtext></math>=<span>1EEBB</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ف</mtext></math>=<span>1EEB0</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ق</mtext></math>=<span>1EEB2</span></span><br/> + <span><math class="testfont"><mtext mathvariant="double-struck">C</mtext></math>=<span>02102</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ل</mtext></math>=<span>1EEAB</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">م</mtext></math>=<span>1EEAC</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ن</mtext></math>=<span>1EEAD</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">G</mtext></math>=<span>1D53E</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">و</mtext></math>=<span>1EEA5</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">I</mtext></math>=<span>1D540</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ي</mtext></math>=<span>1EEA9</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">K</mtext></math>=<span>1D542</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">L</mtext></math>=<span>1D543</span></span><br/> + <span><math class="testfont"><mtext mathvariant="double-struck">M</mtext></math>=<span>1D544</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">N</mtext></math>=<span>02115</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">O</mtext></math>=<span>1D546</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">P</mtext></math>=<span>02119</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">Q</mtext></math>=<span>0211A</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">R</mtext></math>=<span>0211D</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">S</mtext></math>=<span>1D54A</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">T</mtext></math>=<span>1D54B</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">U</mtext></math>=<span>1D54C</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">V</mtext></math>=<span>1D54D</span></span><br/> + <span><math class="testfont"><mtext mathvariant="double-struck">W</mtext></math>=<span>1D54E</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">X</mtext></math>=<span>1D54F</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">Y</mtext></math>=<span>1D550</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">Z</mtext></math>=<span>02124</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">a</mtext></math>=<span>1D552</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">b</mtext></math>=<span>1D553</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">c</mtext></math>=<span>1D554</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">d</mtext></math>=<span>1D555</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">e</mtext></math>=<span>1D556</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">f</mtext></math>=<span>1D557</span></span><br/> + <span><math class="testfont"><mtext mathvariant="double-struck">g</mtext></math>=<span>1D558</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">h</mtext></math>=<span>1D559</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">i</mtext></math>=<span>1D55A</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">j</mtext></math>=<span>1D55B</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">k</mtext></math>=<span>1D55C</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">l</mtext></math>=<span>1D55D</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">m</mtext></math>=<span>1D55E</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">n</mtext></math>=<span>1D55F</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">o</mtext></math>=<span>1D560</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">p</mtext></math>=<span>1D561</span></span><br/> + <span><math class="testfont"><mtext mathvariant="double-struck">q</mtext></math>=<span>1D562</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">r</mtext></math>=<span>1D563</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">s</mtext></math>=<span>1D564</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">t</mtext></math>=<span>1D565</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">u</mtext></math>=<span>1D566</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">v</mtext></math>=<span>1D567</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">w</mtext></math>=<span>1D568</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">x</mtext></math>=<span>1D569</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">y</mtext></math>=<span>1D56A</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">z</mtext></math>=<span>1D56B</span></span><br/> + <span><math class="testfont"><mtext mathvariant="double-struck">0</mtext></math>=<span>1D7D8</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">1</mtext></math>=<span>1D7D9</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">2</mtext></math>=<span>1D7DA</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">س</mtext></math>=<span>1EEAE</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ش</mtext></math>=<span>1EEB4</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ص</mtext></math>=<span>1EEB1</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">6</mtext></math>=<span>1D7DE</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">7</mtext></math>=<span>1D7DF</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">8</mtext></math>=<span>1D7E0</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">ع</mtext></math>=<span>1EEAF</span></span><br/> + <span><math class="testfont"><mtext mathvariant="double-struck">A</mtext></math>=<span>1D538</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">B</mtext></math>=<span>1D539</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">D</mtext></math>=<span>1D53B</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">E</mtext></math>=<span>1D53C</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">F</mtext></math>=<span>1D53D</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">H</mtext></math>=<span>0210D</span></span> + <span><math class="testfont"><mtext mathvariant="double-struck">J</mtext></math>=<span>1D541</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-font-style-font-weight-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-font-style-font-weight-ref.html new file mode 100644 index 0000000000..c3e586f4dd --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-font-style-font-weight-ref.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>mathvariant attribute and font-style/font-weight (reference)</title> + <style> + .italic { font-style: italic; } + .bold { font-weight: bold; } + </style> + </head> + <body> + <p>This test passes if you see six lines of text (italic, italic, bold, bold, bold italic and bold italic) with the corresponding style applied:</p> + <p> + <math> + <mtext class="italic">italic</mtext> + </math> + </p> + <p> + <math> + <mtext class="italic">italic</mtext> + </math> + </p> + <p> + <math> + <mtext class="bold">bold</mtext> + </math> + </p> + <p> + <math> + <mtext class="bold">bold</mtext> + </math> + </p> + <p> + <math> + <mtext class="bold italic">bold italic</mtext> + </math> + </p> + <p> + <math> + <mtext class="bold italic">bold italic</mtext> + </math> + </p> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-font-style-font-weight.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-font-style-font-weight.html new file mode 100644 index 0000000000..793c687b09 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-font-style-font-weight.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>mathvariant attribute and font-style/font-weight</title> + <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://bugzilla.mozilla.org/show_bug.cgi?id=1788645"> + <link rel="match" href="mathvariant-font-style-font-weight-ref.html"/> + <meta name="assert" content="Verify that a mathvariant attribute does not cancel the effect of font-style/font-weight."> + <style> + .italic { font-style: italic; } + .bold { font-weight: bold; } + </style> + </head> + <body> + <p>This test passes if you see six lines of text (italic, italic, bold, bold, bold italic and bold italic) with the corresponding style applied:</p> + <p> + <math mathvariant="normal"> + <mtext class="italic">italic</mtext> + </math> + </p> + <p> + <math> + <mtext mathvariant="normal" class="italic">italic</mtext> + </math> + </p> + <p> + <math mathvariant="normal"> + <mtext class="bold">bold</mtext> + </math> + </p> + <p> + <math> + <mtext mathvariant="normal" class="bold">bold</mtext> + </math> + </p> + <p> + <math mathvariant="normal"> + <mtext class="bold italic">bold italic</mtext> + </math> + </p> + <p> + <math> + <mtext mathvariant="normal" class="bold italic">bold italic</mtext> + </math> + </p> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-fraktur-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-fraktur-ref.html new file mode 100644 index 0000000000..3d1dd50a7d --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-fraktur-ref.html @@ -0,0 +1,79 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant fraktur (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-fraktur.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝔄</mtext></math>=<span>1D504</span></span> + <span><math class="testfont"><mtext>𝔅</mtext></math>=<span>1D505</span></span> + <span><math class="testfont"><mtext>ℭ</mtext></math>=<span>0212D</span></span> + <span><math class="testfont"><mtext>𝔇</mtext></math>=<span>1D507</span></span> + <span><math class="testfont"><mtext>𝔈</mtext></math>=<span>1D508</span></span> + <span><math class="testfont"><mtext>𝔉</mtext></math>=<span>1D509</span></span> + <span><math class="testfont"><mtext>𝔊</mtext></math>=<span>1D50A</span></span> + <span><math class="testfont"><mtext>ℌ</mtext></math>=<span>0210C</span></span> + <span><math class="testfont"><mtext>ℑ</mtext></math>=<span>02111</span></span> + <span><math class="testfont"><mtext>𝔍</mtext></math>=<span>1D50D</span></span><br/> + <span><math class="testfont"><mtext>𝔎</mtext></math>=<span>1D50E</span></span> + <span><math class="testfont"><mtext>𝔏</mtext></math>=<span>1D50F</span></span> + <span><math class="testfont"><mtext>𝔐</mtext></math>=<span>1D510</span></span> + <span><math class="testfont"><mtext>𝔑</mtext></math>=<span>1D511</span></span> + <span><math class="testfont"><mtext>𝔒</mtext></math>=<span>1D512</span></span> + <span><math class="testfont"><mtext>𝔓</mtext></math>=<span>1D513</span></span> + <span><math class="testfont"><mtext>𝔔</mtext></math>=<span>1D514</span></span> + <span><math class="testfont"><mtext>ℜ</mtext></math>=<span>0211C</span></span> + <span><math class="testfont"><mtext>𝔖</mtext></math>=<span>1D516</span></span> + <span><math class="testfont"><mtext>𝔗</mtext></math>=<span>1D517</span></span><br/> + <span><math class="testfont"><mtext>𝔘</mtext></math>=<span>1D518</span></span> + <span><math class="testfont"><mtext>𝔙</mtext></math>=<span>1D519</span></span> + <span><math class="testfont"><mtext>𝔚</mtext></math>=<span>1D51A</span></span> + <span><math class="testfont"><mtext>𝔛</mtext></math>=<span>1D51B</span></span> + <span><math class="testfont"><mtext>𝔜</mtext></math>=<span>1D51C</span></span> + <span><math class="testfont"><mtext>ℨ</mtext></math>=<span>02128</span></span> + <span><math class="testfont"><mtext>𝔞</mtext></math>=<span>1D51E</span></span> + <span><math class="testfont"><mtext>𝔟</mtext></math>=<span>1D51F</span></span> + <span><math class="testfont"><mtext>𝔠</mtext></math>=<span>1D520</span></span> + <span><math class="testfont"><mtext>𝔡</mtext></math>=<span>1D521</span></span><br/> + <span><math class="testfont"><mtext>𝔢</mtext></math>=<span>1D522</span></span> + <span><math class="testfont"><mtext>𝔣</mtext></math>=<span>1D523</span></span> + <span><math class="testfont"><mtext>𝔤</mtext></math>=<span>1D524</span></span> + <span><math class="testfont"><mtext>𝔥</mtext></math>=<span>1D525</span></span> + <span><math class="testfont"><mtext>𝔦</mtext></math>=<span>1D526</span></span> + <span><math class="testfont"><mtext>𝔧</mtext></math>=<span>1D527</span></span> + <span><math class="testfont"><mtext>𝔨</mtext></math>=<span>1D528</span></span> + <span><math class="testfont"><mtext>𝔩</mtext></math>=<span>1D529</span></span> + <span><math class="testfont"><mtext>𝔪</mtext></math>=<span>1D52A</span></span> + <span><math class="testfont"><mtext>𝔫</mtext></math>=<span>1D52B</span></span><br/> + <span><math class="testfont"><mtext>𝔬</mtext></math>=<span>1D52C</span></span> + <span><math class="testfont"><mtext>𝔭</mtext></math>=<span>1D52D</span></span> + <span><math class="testfont"><mtext>𝔮</mtext></math>=<span>1D52E</span></span> + <span><math class="testfont"><mtext>𝔯</mtext></math>=<span>1D52F</span></span> + <span><math class="testfont"><mtext>𝔰</mtext></math>=<span>1D530</span></span> + <span><math class="testfont"><mtext>𝔱</mtext></math>=<span>1D531</span></span> + <span><math class="testfont"><mtext>𝔲</mtext></math>=<span>1D532</span></span> + <span><math class="testfont"><mtext>𝔳</mtext></math>=<span>1D533</span></span> + <span><math class="testfont"><mtext>𝔴</mtext></math>=<span>1D534</span></span> + <span><math class="testfont"><mtext>𝔵</mtext></math>=<span>1D535</span></span><br/> + <span><math class="testfont"><mtext>𝔶</mtext></math>=<span>1D536</span></span> + <span><math class="testfont"><mtext>𝔷</mtext></math>=<span>1D537</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-fraktur.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-fraktur.html new file mode 100644 index 0000000000..9c95cd06e7 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-fraktur.html @@ -0,0 +1,85 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant fraktur</title> +<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/#fraktur-mappings"> +<link rel="match" href="mathvariant-fraktur-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a fraktur mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-fraktur.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="fraktur">A</mtext></math>=<span>1D504</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">B</mtext></math>=<span>1D505</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">C</mtext></math>=<span>0212D</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">D</mtext></math>=<span>1D507</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">E</mtext></math>=<span>1D508</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">F</mtext></math>=<span>1D509</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">G</mtext></math>=<span>1D50A</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">H</mtext></math>=<span>0210C</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">I</mtext></math>=<span>02111</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">J</mtext></math>=<span>1D50D</span></span><br/> + <span><math class="testfont"><mtext mathvariant="fraktur">K</mtext></math>=<span>1D50E</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">L</mtext></math>=<span>1D50F</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">M</mtext></math>=<span>1D510</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">N</mtext></math>=<span>1D511</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">O</mtext></math>=<span>1D512</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">P</mtext></math>=<span>1D513</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">Q</mtext></math>=<span>1D514</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">R</mtext></math>=<span>0211C</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">S</mtext></math>=<span>1D516</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">T</mtext></math>=<span>1D517</span></span><br/> + <span><math class="testfont"><mtext mathvariant="fraktur">U</mtext></math>=<span>1D518</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">V</mtext></math>=<span>1D519</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">W</mtext></math>=<span>1D51A</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">X</mtext></math>=<span>1D51B</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">Y</mtext></math>=<span>1D51C</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">Z</mtext></math>=<span>02128</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">a</mtext></math>=<span>1D51E</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">b</mtext></math>=<span>1D51F</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">c</mtext></math>=<span>1D520</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">d</mtext></math>=<span>1D521</span></span><br/> + <span><math class="testfont"><mtext mathvariant="fraktur">e</mtext></math>=<span>1D522</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">f</mtext></math>=<span>1D523</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">g</mtext></math>=<span>1D524</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">h</mtext></math>=<span>1D525</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">i</mtext></math>=<span>1D526</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">j</mtext></math>=<span>1D527</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">k</mtext></math>=<span>1D528</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">l</mtext></math>=<span>1D529</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">m</mtext></math>=<span>1D52A</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">n</mtext></math>=<span>1D52B</span></span><br/> + <span><math class="testfont"><mtext mathvariant="fraktur">o</mtext></math>=<span>1D52C</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">p</mtext></math>=<span>1D52D</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">q</mtext></math>=<span>1D52E</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">r</mtext></math>=<span>1D52F</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">s</mtext></math>=<span>1D530</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">t</mtext></math>=<span>1D531</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">u</mtext></math>=<span>1D532</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">v</mtext></math>=<span>1D533</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">w</mtext></math>=<span>1D534</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">x</mtext></math>=<span>1D535</span></span><br/> + <span><math class="testfont"><mtext mathvariant="fraktur">y</mtext></math>=<span>1D536</span></span> + <span><math class="testfont"><mtext mathvariant="fraktur">z</mtext></math>=<span>1D537</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-initial-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-initial-ref.html new file mode 100644 index 0000000000..597277aaec --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-initial-ref.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant initial (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-initial.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𞸰</mtext></math>=<span>1EE30</span></span> + <span><math class="testfont"><mtext>𞸲</mtext></math>=<span>1EE32</span></span> + <span><math class="testfont"><mtext>𞸪</mtext></math>=<span>1EE2A</span></span> + <span><math class="testfont"><mtext>𞸫</mtext></math>=<span>1EE2B</span></span> + <span><math class="testfont"><mtext>𞸬</mtext></math>=<span>1EE2C</span></span> + <span><math class="testfont"><mtext>𞸭</mtext></math>=<span>1EE2D</span></span> + <span><math class="testfont"><mtext>𞸤</mtext></math>=<span>1EE24</span></span> + <span><math class="testfont"><mtext>𞸡</mtext></math>=<span>1EE21</span></span> + <span><math class="testfont"><mtext>𞸩</mtext></math>=<span>1EE29</span></span> + <span><math class="testfont"><mtext>𞸶</mtext></math>=<span>1EE36</span></span><br/> + <span><math class="testfont"><mtext>𞸢</mtext></math>=<span>1EE22</span></span> + <span><math class="testfont"><mtext>𞸧</mtext></math>=<span>1EE27</span></span> + <span><math class="testfont"><mtext>𞸷</mtext></math>=<span>1EE37</span></span> + <span><math class="testfont"><mtext>𞸮</mtext></math>=<span>1EE2E</span></span> + <span><math class="testfont"><mtext>𞸴</mtext></math>=<span>1EE34</span></span> + <span><math class="testfont"><mtext>𞸱</mtext></math>=<span>1EE31</span></span> + <span><math class="testfont"><mtext>𞸹</mtext></math>=<span>1EE39</span></span> + <span><math class="testfont"><mtext>𞸯</mtext></math>=<span>1EE2F</span></span> + <span><math class="testfont"><mtext>𞸻</mtext></math>=<span>1EE3B</span></span> + <span><math class="testfont"><mtext>𞸵</mtext></math>=<span>1EE35</span></span><br/> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-initial.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-initial.html new file mode 100644 index 0000000000..5f54a5cf88 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-initial.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant initial</title> +<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/#initial-mappings"> +<link rel="match" href="mathvariant-initial-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a initial mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-initial.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="initial">ف</mtext></math>=<span>1EE30</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ق</mtext></math>=<span>1EE32</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ك</mtext></math>=<span>1EE2A</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ل</mtext></math>=<span>1EE2B</span></span> + <span><math class="testfont"><mtext mathvariant="initial">م</mtext></math>=<span>1EE2C</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ن</mtext></math>=<span>1EE2D</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ه</mtext></math>=<span>1EE24</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ب</mtext></math>=<span>1EE21</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ي</mtext></math>=<span>1EE29</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ث</mtext></math>=<span>1EE36</span></span><br/> + <span><math class="testfont"><mtext mathvariant="initial">ج</mtext></math>=<span>1EE22</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ح</mtext></math>=<span>1EE27</span></span> + <span><math class="testfont"><mtext mathvariant="initial">خ</mtext></math>=<span>1EE37</span></span> + <span><math class="testfont"><mtext mathvariant="initial">س</mtext></math>=<span>1EE2E</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ش</mtext></math>=<span>1EE34</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ص</mtext></math>=<span>1EE31</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ض</mtext></math>=<span>1EE39</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ع</mtext></math>=<span>1EE2F</span></span> + <span><math class="testfont"><mtext mathvariant="initial">غ</mtext></math>=<span>1EE3B</span></span> + <span><math class="testfont"><mtext mathvariant="initial">ت</mtext></math>=<span>1EE35</span></span><br/> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-italic-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-italic-ref.html new file mode 100644 index 0000000000..f503794efb --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-italic-ref.html @@ -0,0 +1,139 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant italic (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-italic.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝜕</mtext></math>=<span>1D715</span></span> + <span><math class="testfont"><mtext>𝛻</mtext></math>=<span>1D6FB</span></span> + <span><math class="testfont"><mtext>𝚥</mtext></math>=<span>1D6A5</span></span> + <span><math class="testfont"><mtext>𝐴</mtext></math>=<span>1D434</span></span> + <span><math class="testfont"><mtext>𝐵</mtext></math>=<span>1D435</span></span> + <span><math class="testfont"><mtext>𝐶</mtext></math>=<span>1D436</span></span> + <span><math class="testfont"><mtext>𝐷</mtext></math>=<span>1D437</span></span> + <span><math class="testfont"><mtext>𝐸</mtext></math>=<span>1D438</span></span> + <span><math class="testfont"><mtext>𝐹</mtext></math>=<span>1D439</span></span> + <span><math class="testfont"><mtext>𝐺</mtext></math>=<span>1D43A</span></span><br/> + <span><math class="testfont"><mtext>𝐻</mtext></math>=<span>1D43B</span></span> + <span><math class="testfont"><mtext>𝐼</mtext></math>=<span>1D43C</span></span> + <span><math class="testfont"><mtext>𝐽</mtext></math>=<span>1D43D</span></span> + <span><math class="testfont"><mtext>𝐾</mtext></math>=<span>1D43E</span></span> + <span><math class="testfont"><mtext>𝐿</mtext></math>=<span>1D43F</span></span> + <span><math class="testfont"><mtext>𝑀</mtext></math>=<span>1D440</span></span> + <span><math class="testfont"><mtext>𝑁</mtext></math>=<span>1D441</span></span> + <span><math class="testfont"><mtext>𝑂</mtext></math>=<span>1D442</span></span> + <span><math class="testfont"><mtext>𝑃</mtext></math>=<span>1D443</span></span> + <span><math class="testfont"><mtext>𝑄</mtext></math>=<span>1D444</span></span><br/> + <span><math class="testfont"><mtext>𝑅</mtext></math>=<span>1D445</span></span> + <span><math class="testfont"><mtext>𝑆</mtext></math>=<span>1D446</span></span> + <span><math class="testfont"><mtext>𝑇</mtext></math>=<span>1D447</span></span> + <span><math class="testfont"><mtext>𝑈</mtext></math>=<span>1D448</span></span> + <span><math class="testfont"><mtext>𝑉</mtext></math>=<span>1D449</span></span> + <span><math class="testfont"><mtext>𝑊</mtext></math>=<span>1D44A</span></span> + <span><math class="testfont"><mtext>𝑋</mtext></math>=<span>1D44B</span></span> + <span><math class="testfont"><mtext>𝑌</mtext></math>=<span>1D44C</span></span> + <span><math class="testfont"><mtext>𝑍</mtext></math>=<span>1D44D</span></span> + <span><math class="testfont"><mtext>𝑎</mtext></math>=<span>1D44E</span></span><br/> + <span><math class="testfont"><mtext>𝑏</mtext></math>=<span>1D44F</span></span> + <span><math class="testfont"><mtext>𝑐</mtext></math>=<span>1D450</span></span> + <span><math class="testfont"><mtext>𝑑</mtext></math>=<span>1D451</span></span> + <span><math class="testfont"><mtext>𝑒</mtext></math>=<span>1D452</span></span> + <span><math class="testfont"><mtext>𝑓</mtext></math>=<span>1D453</span></span> + <span><math class="testfont"><mtext>𝑔</mtext></math>=<span>1D454</span></span> + <span><math class="testfont"><mtext>ℎ</mtext></math>=<span>0210E</span></span> + <span><math class="testfont"><mtext>𝑖</mtext></math>=<span>1D456</span></span> + <span><math class="testfont"><mtext>𝑗</mtext></math>=<span>1D457</span></span> + <span><math class="testfont"><mtext>𝑘</mtext></math>=<span>1D458</span></span><br/> + <span><math class="testfont"><mtext>𝑙</mtext></math>=<span>1D459</span></span> + <span><math class="testfont"><mtext>𝑚</mtext></math>=<span>1D45A</span></span> + <span><math class="testfont"><mtext>𝑛</mtext></math>=<span>1D45B</span></span> + <span><math class="testfont"><mtext>𝑜</mtext></math>=<span>1D45C</span></span> + <span><math class="testfont"><mtext>𝑝</mtext></math>=<span>1D45D</span></span> + <span><math class="testfont"><mtext>𝑞</mtext></math>=<span>1D45E</span></span> + <span><math class="testfont"><mtext>𝑟</mtext></math>=<span>1D45F</span></span> + <span><math class="testfont"><mtext>𝑠</mtext></math>=<span>1D460</span></span> + <span><math class="testfont"><mtext>𝑡</mtext></math>=<span>1D461</span></span> + <span><math class="testfont"><mtext>𝑢</mtext></math>=<span>1D462</span></span><br/> + <span><math class="testfont"><mtext>𝑣</mtext></math>=<span>1D463</span></span> + <span><math class="testfont"><mtext>𝑤</mtext></math>=<span>1D464</span></span> + <span><math class="testfont"><mtext>𝑥</mtext></math>=<span>1D465</span></span> + <span><math class="testfont"><mtext>𝑦</mtext></math>=<span>1D466</span></span> + <span><math class="testfont"><mtext>𝑧</mtext></math>=<span>1D467</span></span> + <span><math class="testfont"><mtext>𝚤</mtext></math>=<span>1D6A4</span></span> + <span><math class="testfont"><mtext>𝛢</mtext></math>=<span>1D6E2</span></span> + <span><math class="testfont"><mtext>𝛣</mtext></math>=<span>1D6E3</span></span> + <span><math class="testfont"><mtext>𝛤</mtext></math>=<span>1D6E4</span></span> + <span><math class="testfont"><mtext>𝛥</mtext></math>=<span>1D6E5</span></span><br/> + <span><math class="testfont"><mtext>𝛦</mtext></math>=<span>1D6E6</span></span> + <span><math class="testfont"><mtext>𝛧</mtext></math>=<span>1D6E7</span></span> + <span><math class="testfont"><mtext>𝛨</mtext></math>=<span>1D6E8</span></span> + <span><math class="testfont"><mtext>𝛩</mtext></math>=<span>1D6E9</span></span> + <span><math class="testfont"><mtext>𝛪</mtext></math>=<span>1D6EA</span></span> + <span><math class="testfont"><mtext>𝛫</mtext></math>=<span>1D6EB</span></span> + <span><math class="testfont"><mtext>𝛬</mtext></math>=<span>1D6EC</span></span> + <span><math class="testfont"><mtext>𝛭</mtext></math>=<span>1D6ED</span></span> + <span><math class="testfont"><mtext>𝛮</mtext></math>=<span>1D6EE</span></span> + <span><math class="testfont"><mtext>𝛯</mtext></math>=<span>1D6EF</span></span><br/> + <span><math class="testfont"><mtext>𝛰</mtext></math>=<span>1D6F0</span></span> + <span><math class="testfont"><mtext>𝛱</mtext></math>=<span>1D6F1</span></span> + <span><math class="testfont"><mtext>𝛲</mtext></math>=<span>1D6F2</span></span> + <span><math class="testfont"><mtext>𝛴</mtext></math>=<span>1D6F4</span></span> + <span><math class="testfont"><mtext>𝛵</mtext></math>=<span>1D6F5</span></span> + <span><math class="testfont"><mtext>𝛶</mtext></math>=<span>1D6F6</span></span> + <span><math class="testfont"><mtext>𝛷</mtext></math>=<span>1D6F7</span></span> + <span><math class="testfont"><mtext>𝛸</mtext></math>=<span>1D6F8</span></span> + <span><math class="testfont"><mtext>𝛹</mtext></math>=<span>1D6F9</span></span> + <span><math class="testfont"><mtext>𝛺</mtext></math>=<span>1D6FA</span></span><br/> + <span><math class="testfont"><mtext>𝛼</mtext></math>=<span>1D6FC</span></span> + <span><math class="testfont"><mtext>𝛽</mtext></math>=<span>1D6FD</span></span> + <span><math class="testfont"><mtext>𝛾</mtext></math>=<span>1D6FE</span></span> + <span><math class="testfont"><mtext>𝛿</mtext></math>=<span>1D6FF</span></span> + <span><math class="testfont"><mtext>𝜀</mtext></math>=<span>1D700</span></span> + <span><math class="testfont"><mtext>𝜁</mtext></math>=<span>1D701</span></span> + <span><math class="testfont"><mtext>𝜂</mtext></math>=<span>1D702</span></span> + <span><math class="testfont"><mtext>𝜃</mtext></math>=<span>1D703</span></span> + <span><math class="testfont"><mtext>𝜄</mtext></math>=<span>1D704</span></span> + <span><math class="testfont"><mtext>𝜅</mtext></math>=<span>1D705</span></span><br/> + <span><math class="testfont"><mtext>𝜆</mtext></math>=<span>1D706</span></span> + <span><math class="testfont"><mtext>𝜇</mtext></math>=<span>1D707</span></span> + <span><math class="testfont"><mtext>𝜈</mtext></math>=<span>1D708</span></span> + <span><math class="testfont"><mtext>𝜉</mtext></math>=<span>1D709</span></span> + <span><math class="testfont"><mtext>𝜊</mtext></math>=<span>1D70A</span></span> + <span><math class="testfont"><mtext>𝜋</mtext></math>=<span>1D70B</span></span> + <span><math class="testfont"><mtext>𝜌</mtext></math>=<span>1D70C</span></span> + <span><math class="testfont"><mtext>𝜍</mtext></math>=<span>1D70D</span></span> + <span><math class="testfont"><mtext>𝜎</mtext></math>=<span>1D70E</span></span> + <span><math class="testfont"><mtext>𝜏</mtext></math>=<span>1D70F</span></span><br/> + <span><math class="testfont"><mtext>𝜐</mtext></math>=<span>1D710</span></span> + <span><math class="testfont"><mtext>𝜑</mtext></math>=<span>1D711</span></span> + <span><math class="testfont"><mtext>𝜒</mtext></math>=<span>1D712</span></span> + <span><math class="testfont"><mtext>𝜓</mtext></math>=<span>1D713</span></span> + <span><math class="testfont"><mtext>𝜔</mtext></math>=<span>1D714</span></span> + <span><math class="testfont"><mtext>𝜗</mtext></math>=<span>1D717</span></span> + <span><math class="testfont"><mtext>𝜙</mtext></math>=<span>1D719</span></span> + <span><math class="testfont"><mtext>𝜛</mtext></math>=<span>1D71B</span></span> + <span><math class="testfont"><mtext>𝜘</mtext></math>=<span>1D718</span></span> + <span><math class="testfont"><mtext>𝜚</mtext></math>=<span>1D71A</span></span><br/> + <span><math class="testfont"><mtext>𝛳</mtext></math>=<span>1D6F3</span></span> + <span><math class="testfont"><mtext>𝜖</mtext></math>=<span>1D716</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-italic.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-italic.html new file mode 100644 index 0000000000..f22f23f82b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-italic.html @@ -0,0 +1,145 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant italic</title> +<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="mathvariant-italic-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a italic mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-italic.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="italic">∂</mtext></math>=<span>1D715</span></span> + <span><math class="testfont"><mtext mathvariant="italic">∇</mtext></math>=<span>1D6FB</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ȷ</mtext></math>=<span>1D6A5</span></span> + <span><math class="testfont"><mtext mathvariant="italic">A</mtext></math>=<span>1D434</span></span> + <span><math class="testfont"><mtext mathvariant="italic">B</mtext></math>=<span>1D435</span></span> + <span><math class="testfont"><mtext mathvariant="italic">C</mtext></math>=<span>1D436</span></span> + <span><math class="testfont"><mtext mathvariant="italic">D</mtext></math>=<span>1D437</span></span> + <span><math class="testfont"><mtext mathvariant="italic">E</mtext></math>=<span>1D438</span></span> + <span><math class="testfont"><mtext mathvariant="italic">F</mtext></math>=<span>1D439</span></span> + <span><math class="testfont"><mtext mathvariant="italic">G</mtext></math>=<span>1D43A</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">H</mtext></math>=<span>1D43B</span></span> + <span><math class="testfont"><mtext mathvariant="italic">I</mtext></math>=<span>1D43C</span></span> + <span><math class="testfont"><mtext mathvariant="italic">J</mtext></math>=<span>1D43D</span></span> + <span><math class="testfont"><mtext mathvariant="italic">K</mtext></math>=<span>1D43E</span></span> + <span><math class="testfont"><mtext mathvariant="italic">L</mtext></math>=<span>1D43F</span></span> + <span><math class="testfont"><mtext mathvariant="italic">M</mtext></math>=<span>1D440</span></span> + <span><math class="testfont"><mtext mathvariant="italic">N</mtext></math>=<span>1D441</span></span> + <span><math class="testfont"><mtext mathvariant="italic">O</mtext></math>=<span>1D442</span></span> + <span><math class="testfont"><mtext mathvariant="italic">P</mtext></math>=<span>1D443</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Q</mtext></math>=<span>1D444</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">R</mtext></math>=<span>1D445</span></span> + <span><math class="testfont"><mtext mathvariant="italic">S</mtext></math>=<span>1D446</span></span> + <span><math class="testfont"><mtext mathvariant="italic">T</mtext></math>=<span>1D447</span></span> + <span><math class="testfont"><mtext mathvariant="italic">U</mtext></math>=<span>1D448</span></span> + <span><math class="testfont"><mtext mathvariant="italic">V</mtext></math>=<span>1D449</span></span> + <span><math class="testfont"><mtext mathvariant="italic">W</mtext></math>=<span>1D44A</span></span> + <span><math class="testfont"><mtext mathvariant="italic">X</mtext></math>=<span>1D44B</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Y</mtext></math>=<span>1D44C</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Z</mtext></math>=<span>1D44D</span></span> + <span><math class="testfont"><mtext mathvariant="italic">a</mtext></math>=<span>1D44E</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">b</mtext></math>=<span>1D44F</span></span> + <span><math class="testfont"><mtext mathvariant="italic">c</mtext></math>=<span>1D450</span></span> + <span><math class="testfont"><mtext mathvariant="italic">d</mtext></math>=<span>1D451</span></span> + <span><math class="testfont"><mtext mathvariant="italic">e</mtext></math>=<span>1D452</span></span> + <span><math class="testfont"><mtext mathvariant="italic">f</mtext></math>=<span>1D453</span></span> + <span><math class="testfont"><mtext mathvariant="italic">g</mtext></math>=<span>1D454</span></span> + <span><math class="testfont"><mtext mathvariant="italic">h</mtext></math>=<span>0210E</span></span> + <span><math class="testfont"><mtext mathvariant="italic">i</mtext></math>=<span>1D456</span></span> + <span><math class="testfont"><mtext mathvariant="italic">j</mtext></math>=<span>1D457</span></span> + <span><math class="testfont"><mtext mathvariant="italic">k</mtext></math>=<span>1D458</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">l</mtext></math>=<span>1D459</span></span> + <span><math class="testfont"><mtext mathvariant="italic">m</mtext></math>=<span>1D45A</span></span> + <span><math class="testfont"><mtext mathvariant="italic">n</mtext></math>=<span>1D45B</span></span> + <span><math class="testfont"><mtext mathvariant="italic">o</mtext></math>=<span>1D45C</span></span> + <span><math class="testfont"><mtext mathvariant="italic">p</mtext></math>=<span>1D45D</span></span> + <span><math class="testfont"><mtext mathvariant="italic">q</mtext></math>=<span>1D45E</span></span> + <span><math class="testfont"><mtext mathvariant="italic">r</mtext></math>=<span>1D45F</span></span> + <span><math class="testfont"><mtext mathvariant="italic">s</mtext></math>=<span>1D460</span></span> + <span><math class="testfont"><mtext mathvariant="italic">t</mtext></math>=<span>1D461</span></span> + <span><math class="testfont"><mtext mathvariant="italic">u</mtext></math>=<span>1D462</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">v</mtext></math>=<span>1D463</span></span> + <span><math class="testfont"><mtext mathvariant="italic">w</mtext></math>=<span>1D464</span></span> + <span><math class="testfont"><mtext mathvariant="italic">x</mtext></math>=<span>1D465</span></span> + <span><math class="testfont"><mtext mathvariant="italic">y</mtext></math>=<span>1D466</span></span> + <span><math class="testfont"><mtext mathvariant="italic">z</mtext></math>=<span>1D467</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ı</mtext></math>=<span>1D6A4</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Α</mtext></math>=<span>1D6E2</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Β</mtext></math>=<span>1D6E3</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Γ</mtext></math>=<span>1D6E4</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Δ</mtext></math>=<span>1D6E5</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">Ε</mtext></math>=<span>1D6E6</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Ζ</mtext></math>=<span>1D6E7</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Η</mtext></math>=<span>1D6E8</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Θ</mtext></math>=<span>1D6E9</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Ι</mtext></math>=<span>1D6EA</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Κ</mtext></math>=<span>1D6EB</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Λ</mtext></math>=<span>1D6EC</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Μ</mtext></math>=<span>1D6ED</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Ν</mtext></math>=<span>1D6EE</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Ξ</mtext></math>=<span>1D6EF</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">Ο</mtext></math>=<span>1D6F0</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Π</mtext></math>=<span>1D6F1</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Ρ</mtext></math>=<span>1D6F2</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Σ</mtext></math>=<span>1D6F4</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Τ</mtext></math>=<span>1D6F5</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Υ</mtext></math>=<span>1D6F6</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Φ</mtext></math>=<span>1D6F7</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Χ</mtext></math>=<span>1D6F8</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Ψ</mtext></math>=<span>1D6F9</span></span> + <span><math class="testfont"><mtext mathvariant="italic">Ω</mtext></math>=<span>1D6FA</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">α</mtext></math>=<span>1D6FC</span></span> + <span><math class="testfont"><mtext mathvariant="italic">β</mtext></math>=<span>1D6FD</span></span> + <span><math class="testfont"><mtext mathvariant="italic">γ</mtext></math>=<span>1D6FE</span></span> + <span><math class="testfont"><mtext mathvariant="italic">δ</mtext></math>=<span>1D6FF</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ε</mtext></math>=<span>1D700</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ζ</mtext></math>=<span>1D701</span></span> + <span><math class="testfont"><mtext mathvariant="italic">η</mtext></math>=<span>1D702</span></span> + <span><math class="testfont"><mtext mathvariant="italic">θ</mtext></math>=<span>1D703</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ι</mtext></math>=<span>1D704</span></span> + <span><math class="testfont"><mtext mathvariant="italic">κ</mtext></math>=<span>1D705</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">λ</mtext></math>=<span>1D706</span></span> + <span><math class="testfont"><mtext mathvariant="italic">μ</mtext></math>=<span>1D707</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ν</mtext></math>=<span>1D708</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ξ</mtext></math>=<span>1D709</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ο</mtext></math>=<span>1D70A</span></span> + <span><math class="testfont"><mtext mathvariant="italic">π</mtext></math>=<span>1D70B</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ρ</mtext></math>=<span>1D70C</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ς</mtext></math>=<span>1D70D</span></span> + <span><math class="testfont"><mtext mathvariant="italic">σ</mtext></math>=<span>1D70E</span></span> + <span><math class="testfont"><mtext mathvariant="italic">τ</mtext></math>=<span>1D70F</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">υ</mtext></math>=<span>1D710</span></span> + <span><math class="testfont"><mtext mathvariant="italic">φ</mtext></math>=<span>1D711</span></span> + <span><math class="testfont"><mtext mathvariant="italic">χ</mtext></math>=<span>1D712</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ψ</mtext></math>=<span>1D713</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ω</mtext></math>=<span>1D714</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ϑ</mtext></math>=<span>1D717</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ϕ</mtext></math>=<span>1D719</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ϖ</mtext></math>=<span>1D71B</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ϰ</mtext></math>=<span>1D718</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ϱ</mtext></math>=<span>1D71A</span></span><br/> + <span><math class="testfont"><mtext mathvariant="italic">ϴ</mtext></math>=<span>1D6F3</span></span> + <span><math class="testfont"><mtext mathvariant="italic">ϵ</mtext></math>=<span>1D716</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-looped-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-looped-ref.html new file mode 100644 index 0000000000..12ccb490a1 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-looped-ref.html @@ -0,0 +1,54 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant looped (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-looped.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𞺀</mtext></math>=<span>1EE80</span></span> + <span><math class="testfont"><mtext>𞺁</mtext></math>=<span>1EE81</span></span> + <span><math class="testfont"><mtext>𞺕</mtext></math>=<span>1EE95</span></span> + <span><math class="testfont"><mtext>𞺖</mtext></math>=<span>1EE96</span></span> + <span><math class="testfont"><mtext>𞺂</mtext></math>=<span>1EE82</span></span> + <span><math class="testfont"><mtext>𞺇</mtext></math>=<span>1EE87</span></span> + <span><math class="testfont"><mtext>𞺗</mtext></math>=<span>1EE97</span></span> + <span><math class="testfont"><mtext>𞺃</mtext></math>=<span>1EE83</span></span> + <span><math class="testfont"><mtext>𞺘</mtext></math>=<span>1EE98</span></span> + <span><math class="testfont"><mtext>𞺓</mtext></math>=<span>1EE93</span></span><br/> + <span><math class="testfont"><mtext>𞺆</mtext></math>=<span>1EE86</span></span> + <span><math class="testfont"><mtext>𞺎</mtext></math>=<span>1EE8E</span></span> + <span><math class="testfont"><mtext>𞺔</mtext></math>=<span>1EE94</span></span> + <span><math class="testfont"><mtext>𞺑</mtext></math>=<span>1EE91</span></span> + <span><math class="testfont"><mtext>𞺙</mtext></math>=<span>1EE99</span></span> + <span><math class="testfont"><mtext>𞺈</mtext></math>=<span>1EE88</span></span> + <span><math class="testfont"><mtext>𞺚</mtext></math>=<span>1EE9A</span></span> + <span><math class="testfont"><mtext>𞺏</mtext></math>=<span>1EE8F</span></span> + <span><math class="testfont"><mtext>𞺛</mtext></math>=<span>1EE9B</span></span> + <span><math class="testfont"><mtext>𞺐</mtext></math>=<span>1EE90</span></span><br/> + <span><math class="testfont"><mtext>𞺒</mtext></math>=<span>1EE92</span></span> + <span><math class="testfont"><mtext>𞺋</mtext></math>=<span>1EE8B</span></span> + <span><math class="testfont"><mtext>𞺌</mtext></math>=<span>1EE8C</span></span> + <span><math class="testfont"><mtext>𞺍</mtext></math>=<span>1EE8D</span></span> + <span><math class="testfont"><mtext>𞺄</mtext></math>=<span>1EE84</span></span> + <span><math class="testfont"><mtext>𞺅</mtext></math>=<span>1EE85</span></span> + <span><math class="testfont"><mtext>𞺉</mtext></math>=<span>1EE89</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-looped.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-looped.html new file mode 100644 index 0000000000..1e9b4f1e21 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-looped.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant looped</title> +<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/#looped-mappings"> +<link rel="match" href="mathvariant-looped-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a looped mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-looped.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="looped">ا</mtext></math>=<span>1EE80</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ب</mtext></math>=<span>1EE81</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ت</mtext></math>=<span>1EE95</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ث</mtext></math>=<span>1EE96</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ج</mtext></math>=<span>1EE82</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ح</mtext></math>=<span>1EE87</span></span> + <span><math class="testfont"><mtext mathvariant="looped">خ</mtext></math>=<span>1EE97</span></span> + <span><math class="testfont"><mtext mathvariant="looped">د</mtext></math>=<span>1EE83</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ذ</mtext></math>=<span>1EE98</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ر</mtext></math>=<span>1EE93</span></span><br/> + <span><math class="testfont"><mtext mathvariant="looped">ز</mtext></math>=<span>1EE86</span></span> + <span><math class="testfont"><mtext mathvariant="looped">س</mtext></math>=<span>1EE8E</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ش</mtext></math>=<span>1EE94</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ص</mtext></math>=<span>1EE91</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ض</mtext></math>=<span>1EE99</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ط</mtext></math>=<span>1EE88</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ظ</mtext></math>=<span>1EE9A</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ع</mtext></math>=<span>1EE8F</span></span> + <span><math class="testfont"><mtext mathvariant="looped">غ</mtext></math>=<span>1EE9B</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ف</mtext></math>=<span>1EE90</span></span><br/> + <span><math class="testfont"><mtext mathvariant="looped">ق</mtext></math>=<span>1EE92</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ل</mtext></math>=<span>1EE8B</span></span> + <span><math class="testfont"><mtext mathvariant="looped">م</mtext></math>=<span>1EE8C</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ن</mtext></math>=<span>1EE8D</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ه</mtext></math>=<span>1EE84</span></span> + <span><math class="testfont"><mtext mathvariant="looped">و</mtext></math>=<span>1EE85</span></span> + <span><math class="testfont"><mtext mathvariant="looped">ي</mtext></math>=<span>1EE89</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-monospace-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-monospace-ref.html new file mode 100644 index 0000000000..bfa672afe5 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-monospace-ref.html @@ -0,0 +1,89 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant monospace (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-monospace.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝟶</mtext></math>=<span>1D7F6</span></span> + <span><math class="testfont"><mtext>𝟷</mtext></math>=<span>1D7F7</span></span> + <span><math class="testfont"><mtext>𝟸</mtext></math>=<span>1D7F8</span></span> + <span><math class="testfont"><mtext>𝟹</mtext></math>=<span>1D7F9</span></span> + <span><math class="testfont"><mtext>𝟺</mtext></math>=<span>1D7FA</span></span> + <span><math class="testfont"><mtext>𝟻</mtext></math>=<span>1D7FB</span></span> + <span><math class="testfont"><mtext>𝟼</mtext></math>=<span>1D7FC</span></span> + <span><math class="testfont"><mtext>𝟽</mtext></math>=<span>1D7FD</span></span> + <span><math class="testfont"><mtext>𝟾</mtext></math>=<span>1D7FE</span></span> + <span><math class="testfont"><mtext>𝟿</mtext></math>=<span>1D7FF</span></span><br/> + <span><math class="testfont"><mtext>𝙰</mtext></math>=<span>1D670</span></span> + <span><math class="testfont"><mtext>𝙱</mtext></math>=<span>1D671</span></span> + <span><math class="testfont"><mtext>𝙲</mtext></math>=<span>1D672</span></span> + <span><math class="testfont"><mtext>𝙳</mtext></math>=<span>1D673</span></span> + <span><math class="testfont"><mtext>𝙴</mtext></math>=<span>1D674</span></span> + <span><math class="testfont"><mtext>𝙵</mtext></math>=<span>1D675</span></span> + <span><math class="testfont"><mtext>𝙶</mtext></math>=<span>1D676</span></span> + <span><math class="testfont"><mtext>𝙷</mtext></math>=<span>1D677</span></span> + <span><math class="testfont"><mtext>𝙸</mtext></math>=<span>1D678</span></span> + <span><math class="testfont"><mtext>𝙹</mtext></math>=<span>1D679</span></span><br/> + <span><math class="testfont"><mtext>𝙺</mtext></math>=<span>1D67A</span></span> + <span><math class="testfont"><mtext>𝙻</mtext></math>=<span>1D67B</span></span> + <span><math class="testfont"><mtext>𝙼</mtext></math>=<span>1D67C</span></span> + <span><math class="testfont"><mtext>𝙽</mtext></math>=<span>1D67D</span></span> + <span><math class="testfont"><mtext>𝙾</mtext></math>=<span>1D67E</span></span> + <span><math class="testfont"><mtext>𝙿</mtext></math>=<span>1D67F</span></span> + <span><math class="testfont"><mtext>𝚀</mtext></math>=<span>1D680</span></span> + <span><math class="testfont"><mtext>𝚁</mtext></math>=<span>1D681</span></span> + <span><math class="testfont"><mtext>𝚂</mtext></math>=<span>1D682</span></span> + <span><math class="testfont"><mtext>𝚃</mtext></math>=<span>1D683</span></span><br/> + <span><math class="testfont"><mtext>𝚄</mtext></math>=<span>1D684</span></span> + <span><math class="testfont"><mtext>𝚅</mtext></math>=<span>1D685</span></span> + <span><math class="testfont"><mtext>𝚆</mtext></math>=<span>1D686</span></span> + <span><math class="testfont"><mtext>𝚇</mtext></math>=<span>1D687</span></span> + <span><math class="testfont"><mtext>𝚈</mtext></math>=<span>1D688</span></span> + <span><math class="testfont"><mtext>𝚉</mtext></math>=<span>1D689</span></span> + <span><math class="testfont"><mtext>𝚊</mtext></math>=<span>1D68A</span></span> + <span><math class="testfont"><mtext>𝚋</mtext></math>=<span>1D68B</span></span> + <span><math class="testfont"><mtext>𝚌</mtext></math>=<span>1D68C</span></span> + <span><math class="testfont"><mtext>𝚍</mtext></math>=<span>1D68D</span></span><br/> + <span><math class="testfont"><mtext>𝚎</mtext></math>=<span>1D68E</span></span> + <span><math class="testfont"><mtext>𝚏</mtext></math>=<span>1D68F</span></span> + <span><math class="testfont"><mtext>𝚐</mtext></math>=<span>1D690</span></span> + <span><math class="testfont"><mtext>𝚑</mtext></math>=<span>1D691</span></span> + <span><math class="testfont"><mtext>𝚒</mtext></math>=<span>1D692</span></span> + <span><math class="testfont"><mtext>𝚓</mtext></math>=<span>1D693</span></span> + <span><math class="testfont"><mtext>𝚔</mtext></math>=<span>1D694</span></span> + <span><math class="testfont"><mtext>𝚕</mtext></math>=<span>1D695</span></span> + <span><math class="testfont"><mtext>𝚖</mtext></math>=<span>1D696</span></span> + <span><math class="testfont"><mtext>𝚗</mtext></math>=<span>1D697</span></span><br/> + <span><math class="testfont"><mtext>𝚘</mtext></math>=<span>1D698</span></span> + <span><math class="testfont"><mtext>𝚙</mtext></math>=<span>1D699</span></span> + <span><math class="testfont"><mtext>𝚚</mtext></math>=<span>1D69A</span></span> + <span><math class="testfont"><mtext>𝚛</mtext></math>=<span>1D69B</span></span> + <span><math class="testfont"><mtext>𝚜</mtext></math>=<span>1D69C</span></span> + <span><math class="testfont"><mtext>𝚝</mtext></math>=<span>1D69D</span></span> + <span><math class="testfont"><mtext>𝚞</mtext></math>=<span>1D69E</span></span> + <span><math class="testfont"><mtext>𝚟</mtext></math>=<span>1D69F</span></span> + <span><math class="testfont"><mtext>𝚠</mtext></math>=<span>1D6A0</span></span> + <span><math class="testfont"><mtext>𝚡</mtext></math>=<span>1D6A1</span></span><br/> + <span><math class="testfont"><mtext>𝚢</mtext></math>=<span>1D6A2</span></span> + <span><math class="testfont"><mtext>𝚣</mtext></math>=<span>1D6A3</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-monospace.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-monospace.html new file mode 100644 index 0000000000..a1a5c2d3c3 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-monospace.html @@ -0,0 +1,95 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant monospace</title> +<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/#monospace-mappings"> +<link rel="match" href="mathvariant-monospace-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a monospace mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-monospace.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="monospace">0</mtext></math>=<span>1D7F6</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">1</mtext></math>=<span>1D7F7</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">2</mtext></math>=<span>1D7F8</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">3</mtext></math>=<span>1D7F9</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">4</mtext></math>=<span>1D7FA</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">5</mtext></math>=<span>1D7FB</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">6</mtext></math>=<span>1D7FC</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">7</mtext></math>=<span>1D7FD</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">8</mtext></math>=<span>1D7FE</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">9</mtext></math>=<span>1D7FF</span></span><br/> + <span><math class="testfont"><mtext mathvariant="monospace">A</mtext></math>=<span>1D670</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">B</mtext></math>=<span>1D671</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">C</mtext></math>=<span>1D672</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">D</mtext></math>=<span>1D673</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">E</mtext></math>=<span>1D674</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">F</mtext></math>=<span>1D675</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">G</mtext></math>=<span>1D676</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">H</mtext></math>=<span>1D677</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">I</mtext></math>=<span>1D678</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">J</mtext></math>=<span>1D679</span></span><br/> + <span><math class="testfont"><mtext mathvariant="monospace">K</mtext></math>=<span>1D67A</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">L</mtext></math>=<span>1D67B</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">M</mtext></math>=<span>1D67C</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">N</mtext></math>=<span>1D67D</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">O</mtext></math>=<span>1D67E</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">P</mtext></math>=<span>1D67F</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">Q</mtext></math>=<span>1D680</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">R</mtext></math>=<span>1D681</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">S</mtext></math>=<span>1D682</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">T</mtext></math>=<span>1D683</span></span><br/> + <span><math class="testfont"><mtext mathvariant="monospace">U</mtext></math>=<span>1D684</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">V</mtext></math>=<span>1D685</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">W</mtext></math>=<span>1D686</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">X</mtext></math>=<span>1D687</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">Y</mtext></math>=<span>1D688</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">Z</mtext></math>=<span>1D689</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">a</mtext></math>=<span>1D68A</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">b</mtext></math>=<span>1D68B</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">c</mtext></math>=<span>1D68C</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">d</mtext></math>=<span>1D68D</span></span><br/> + <span><math class="testfont"><mtext mathvariant="monospace">e</mtext></math>=<span>1D68E</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">f</mtext></math>=<span>1D68F</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">g</mtext></math>=<span>1D690</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">h</mtext></math>=<span>1D691</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">i</mtext></math>=<span>1D692</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">j</mtext></math>=<span>1D693</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">k</mtext></math>=<span>1D694</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">l</mtext></math>=<span>1D695</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">m</mtext></math>=<span>1D696</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">n</mtext></math>=<span>1D697</span></span><br/> + <span><math class="testfont"><mtext mathvariant="monospace">o</mtext></math>=<span>1D698</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">p</mtext></math>=<span>1D699</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">q</mtext></math>=<span>1D69A</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">r</mtext></math>=<span>1D69B</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">s</mtext></math>=<span>1D69C</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">t</mtext></math>=<span>1D69D</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">u</mtext></math>=<span>1D69E</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">v</mtext></math>=<span>1D69F</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">w</mtext></math>=<span>1D6A0</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">x</mtext></math>=<span>1D6A1</span></span><br/> + <span><math class="testfont"><mtext mathvariant="monospace">y</mtext></math>=<span>1D6A2</span></span> + <span><math class="testfont"><mtext mathvariant="monospace">z</mtext></math>=<span>1D6A3</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic-ref.html new file mode 100644 index 0000000000..2b992affe5 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic-ref.html @@ -0,0 +1,137 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant sans-serif-bold-italic (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-sans-serif-bold-italic.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝟃</mtext></math>=<span>1D7C3</span></span> + <span><math class="testfont"><mtext>𝞩</mtext></math>=<span>1D7A9</span></span> + <span><math class="testfont"><mtext>𝘼</mtext></math>=<span>1D63C</span></span> + <span><math class="testfont"><mtext>𝘽</mtext></math>=<span>1D63D</span></span> + <span><math class="testfont"><mtext>𝘾</mtext></math>=<span>1D63E</span></span> + <span><math class="testfont"><mtext>𝘿</mtext></math>=<span>1D63F</span></span> + <span><math class="testfont"><mtext>𝙀</mtext></math>=<span>1D640</span></span> + <span><math class="testfont"><mtext>𝙁</mtext></math>=<span>1D641</span></span> + <span><math class="testfont"><mtext>𝙂</mtext></math>=<span>1D642</span></span> + <span><math class="testfont"><mtext>𝙃</mtext></math>=<span>1D643</span></span><br/> + <span><math class="testfont"><mtext>𝙄</mtext></math>=<span>1D644</span></span> + <span><math class="testfont"><mtext>𝙅</mtext></math>=<span>1D645</span></span> + <span><math class="testfont"><mtext>𝙆</mtext></math>=<span>1D646</span></span> + <span><math class="testfont"><mtext>𝙇</mtext></math>=<span>1D647</span></span> + <span><math class="testfont"><mtext>𝙈</mtext></math>=<span>1D648</span></span> + <span><math class="testfont"><mtext>𝙉</mtext></math>=<span>1D649</span></span> + <span><math class="testfont"><mtext>𝙊</mtext></math>=<span>1D64A</span></span> + <span><math class="testfont"><mtext>𝙋</mtext></math>=<span>1D64B</span></span> + <span><math class="testfont"><mtext>𝙌</mtext></math>=<span>1D64C</span></span> + <span><math class="testfont"><mtext>𝙍</mtext></math>=<span>1D64D</span></span><br/> + <span><math class="testfont"><mtext>𝙎</mtext></math>=<span>1D64E</span></span> + <span><math class="testfont"><mtext>𝙏</mtext></math>=<span>1D64F</span></span> + <span><math class="testfont"><mtext>𝙐</mtext></math>=<span>1D650</span></span> + <span><math class="testfont"><mtext>𝙑</mtext></math>=<span>1D651</span></span> + <span><math class="testfont"><mtext>𝙒</mtext></math>=<span>1D652</span></span> + <span><math class="testfont"><mtext>𝙓</mtext></math>=<span>1D653</span></span> + <span><math class="testfont"><mtext>𝙔</mtext></math>=<span>1D654</span></span> + <span><math class="testfont"><mtext>𝙕</mtext></math>=<span>1D655</span></span> + <span><math class="testfont"><mtext>𝙖</mtext></math>=<span>1D656</span></span> + <span><math class="testfont"><mtext>𝙗</mtext></math>=<span>1D657</span></span><br/> + <span><math class="testfont"><mtext>𝙘</mtext></math>=<span>1D658</span></span> + <span><math class="testfont"><mtext>𝙙</mtext></math>=<span>1D659</span></span> + <span><math class="testfont"><mtext>𝙚</mtext></math>=<span>1D65A</span></span> + <span><math class="testfont"><mtext>𝙛</mtext></math>=<span>1D65B</span></span> + <span><math class="testfont"><mtext>𝙜</mtext></math>=<span>1D65C</span></span> + <span><math class="testfont"><mtext>𝙝</mtext></math>=<span>1D65D</span></span> + <span><math class="testfont"><mtext>𝙞</mtext></math>=<span>1D65E</span></span> + <span><math class="testfont"><mtext>𝙟</mtext></math>=<span>1D65F</span></span> + <span><math class="testfont"><mtext>𝙠</mtext></math>=<span>1D660</span></span> + <span><math class="testfont"><mtext>𝙡</mtext></math>=<span>1D661</span></span><br/> + <span><math class="testfont"><mtext>𝙢</mtext></math>=<span>1D662</span></span> + <span><math class="testfont"><mtext>𝙣</mtext></math>=<span>1D663</span></span> + <span><math class="testfont"><mtext>𝙤</mtext></math>=<span>1D664</span></span> + <span><math class="testfont"><mtext>𝙥</mtext></math>=<span>1D665</span></span> + <span><math class="testfont"><mtext>𝙦</mtext></math>=<span>1D666</span></span> + <span><math class="testfont"><mtext>𝙧</mtext></math>=<span>1D667</span></span> + <span><math class="testfont"><mtext>𝙨</mtext></math>=<span>1D668</span></span> + <span><math class="testfont"><mtext>𝙩</mtext></math>=<span>1D669</span></span> + <span><math class="testfont"><mtext>𝙪</mtext></math>=<span>1D66A</span></span> + <span><math class="testfont"><mtext>𝙫</mtext></math>=<span>1D66B</span></span><br/> + <span><math class="testfont"><mtext>𝙬</mtext></math>=<span>1D66C</span></span> + <span><math class="testfont"><mtext>𝙭</mtext></math>=<span>1D66D</span></span> + <span><math class="testfont"><mtext>𝙮</mtext></math>=<span>1D66E</span></span> + <span><math class="testfont"><mtext>𝙯</mtext></math>=<span>1D66F</span></span> + <span><math class="testfont"><mtext>𝞐</mtext></math>=<span>1D790</span></span> + <span><math class="testfont"><mtext>𝞑</mtext></math>=<span>1D791</span></span> + <span><math class="testfont"><mtext>𝞒</mtext></math>=<span>1D792</span></span> + <span><math class="testfont"><mtext>𝞓</mtext></math>=<span>1D793</span></span> + <span><math class="testfont"><mtext>𝞔</mtext></math>=<span>1D794</span></span> + <span><math class="testfont"><mtext>𝞕</mtext></math>=<span>1D795</span></span><br/> + <span><math class="testfont"><mtext>𝞖</mtext></math>=<span>1D796</span></span> + <span><math class="testfont"><mtext>𝞗</mtext></math>=<span>1D797</span></span> + <span><math class="testfont"><mtext>𝞘</mtext></math>=<span>1D798</span></span> + <span><math class="testfont"><mtext>𝞙</mtext></math>=<span>1D799</span></span> + <span><math class="testfont"><mtext>𝞚</mtext></math>=<span>1D79A</span></span> + <span><math class="testfont"><mtext>𝞛</mtext></math>=<span>1D79B</span></span> + <span><math class="testfont"><mtext>𝞜</mtext></math>=<span>1D79C</span></span> + <span><math class="testfont"><mtext>𝞝</mtext></math>=<span>1D79D</span></span> + <span><math class="testfont"><mtext>𝞞</mtext></math>=<span>1D79E</span></span> + <span><math class="testfont"><mtext>𝞟</mtext></math>=<span>1D79F</span></span><br/> + <span><math class="testfont"><mtext>𝞠</mtext></math>=<span>1D7A0</span></span> + <span><math class="testfont"><mtext>𝞢</mtext></math>=<span>1D7A2</span></span> + <span><math class="testfont"><mtext>𝞣</mtext></math>=<span>1D7A3</span></span> + <span><math class="testfont"><mtext>𝞤</mtext></math>=<span>1D7A4</span></span> + <span><math class="testfont"><mtext>𝞥</mtext></math>=<span>1D7A5</span></span> + <span><math class="testfont"><mtext>𝞦</mtext></math>=<span>1D7A6</span></span> + <span><math class="testfont"><mtext>𝞧</mtext></math>=<span>1D7A7</span></span> + <span><math class="testfont"><mtext>𝞨</mtext></math>=<span>1D7A8</span></span> + <span><math class="testfont"><mtext>𝞪</mtext></math>=<span>1D7AA</span></span> + <span><math class="testfont"><mtext>𝞫</mtext></math>=<span>1D7AB</span></span><br/> + <span><math class="testfont"><mtext>𝞬</mtext></math>=<span>1D7AC</span></span> + <span><math class="testfont"><mtext>𝞭</mtext></math>=<span>1D7AD</span></span> + <span><math class="testfont"><mtext>𝞮</mtext></math>=<span>1D7AE</span></span> + <span><math class="testfont"><mtext>𝞯</mtext></math>=<span>1D7AF</span></span> + <span><math class="testfont"><mtext>𝞰</mtext></math>=<span>1D7B0</span></span> + <span><math class="testfont"><mtext>𝞱</mtext></math>=<span>1D7B1</span></span> + <span><math class="testfont"><mtext>𝞲</mtext></math>=<span>1D7B2</span></span> + <span><math class="testfont"><mtext>𝞳</mtext></math>=<span>1D7B3</span></span> + <span><math class="testfont"><mtext>𝞴</mtext></math>=<span>1D7B4</span></span> + <span><math class="testfont"><mtext>𝞵</mtext></math>=<span>1D7B5</span></span><br/> + <span><math class="testfont"><mtext>𝞶</mtext></math>=<span>1D7B6</span></span> + <span><math class="testfont"><mtext>𝞷</mtext></math>=<span>1D7B7</span></span> + <span><math class="testfont"><mtext>𝞸</mtext></math>=<span>1D7B8</span></span> + <span><math class="testfont"><mtext>𝞹</mtext></math>=<span>1D7B9</span></span> + <span><math class="testfont"><mtext>𝞺</mtext></math>=<span>1D7BA</span></span> + <span><math class="testfont"><mtext>𝞻</mtext></math>=<span>1D7BB</span></span> + <span><math class="testfont"><mtext>𝞼</mtext></math>=<span>1D7BC</span></span> + <span><math class="testfont"><mtext>𝞽</mtext></math>=<span>1D7BD</span></span> + <span><math class="testfont"><mtext>𝞾</mtext></math>=<span>1D7BE</span></span> + <span><math class="testfont"><mtext>𝞿</mtext></math>=<span>1D7BF</span></span><br/> + <span><math class="testfont"><mtext>𝟀</mtext></math>=<span>1D7C0</span></span> + <span><math class="testfont"><mtext>𝟁</mtext></math>=<span>1D7C1</span></span> + <span><math class="testfont"><mtext>𝟂</mtext></math>=<span>1D7C2</span></span> + <span><math class="testfont"><mtext>𝟅</mtext></math>=<span>1D7C5</span></span> + <span><math class="testfont"><mtext>𝟇</mtext></math>=<span>1D7C7</span></span> + <span><math class="testfont"><mtext>𝟉</mtext></math>=<span>1D7C9</span></span> + <span><math class="testfont"><mtext>𝟆</mtext></math>=<span>1D7C6</span></span> + <span><math class="testfont"><mtext>𝟈</mtext></math>=<span>1D7C8</span></span> + <span><math class="testfont"><mtext>𝞡</mtext></math>=<span>1D7A1</span></span> + <span><math class="testfont"><mtext>𝟄</mtext></math>=<span>1D7C4</span></span><br/> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic.html new file mode 100644 index 0000000000..d1512bbce1 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-bold-italic.html @@ -0,0 +1,143 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant sans-serif-bold-italic</title> +<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/#sans-serif-bold-italic-mappings"> +<link rel="match" href="mathvariant-sans-serif-bold-italic-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a sans-serif-bold-italic mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-sans-serif-bold-italic.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">∂</mtext></math>=<span>1D7C3</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">∇</mtext></math>=<span>1D7A9</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">A</mtext></math>=<span>1D63C</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">B</mtext></math>=<span>1D63D</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">C</mtext></math>=<span>1D63E</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">D</mtext></math>=<span>1D63F</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">E</mtext></math>=<span>1D640</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">F</mtext></math>=<span>1D641</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">G</mtext></math>=<span>1D642</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">H</mtext></math>=<span>1D643</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">I</mtext></math>=<span>1D644</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">J</mtext></math>=<span>1D645</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">K</mtext></math>=<span>1D646</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">L</mtext></math>=<span>1D647</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">M</mtext></math>=<span>1D648</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">N</mtext></math>=<span>1D649</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">O</mtext></math>=<span>1D64A</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">P</mtext></math>=<span>1D64B</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Q</mtext></math>=<span>1D64C</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">R</mtext></math>=<span>1D64D</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">S</mtext></math>=<span>1D64E</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">T</mtext></math>=<span>1D64F</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">U</mtext></math>=<span>1D650</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">V</mtext></math>=<span>1D651</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">W</mtext></math>=<span>1D652</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">X</mtext></math>=<span>1D653</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Y</mtext></math>=<span>1D654</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Z</mtext></math>=<span>1D655</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">a</mtext></math>=<span>1D656</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">b</mtext></math>=<span>1D657</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">c</mtext></math>=<span>1D658</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">d</mtext></math>=<span>1D659</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">e</mtext></math>=<span>1D65A</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">f</mtext></math>=<span>1D65B</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">g</mtext></math>=<span>1D65C</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">h</mtext></math>=<span>1D65D</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">i</mtext></math>=<span>1D65E</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">j</mtext></math>=<span>1D65F</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">k</mtext></math>=<span>1D660</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">l</mtext></math>=<span>1D661</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">m</mtext></math>=<span>1D662</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">n</mtext></math>=<span>1D663</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">o</mtext></math>=<span>1D664</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">p</mtext></math>=<span>1D665</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">q</mtext></math>=<span>1D666</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">r</mtext></math>=<span>1D667</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">s</mtext></math>=<span>1D668</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">t</mtext></math>=<span>1D669</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">u</mtext></math>=<span>1D66A</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">v</mtext></math>=<span>1D66B</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">w</mtext></math>=<span>1D66C</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">x</mtext></math>=<span>1D66D</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">y</mtext></math>=<span>1D66E</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">z</mtext></math>=<span>1D66F</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Α</mtext></math>=<span>1D790</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Β</mtext></math>=<span>1D791</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Γ</mtext></math>=<span>1D792</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Δ</mtext></math>=<span>1D793</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Ε</mtext></math>=<span>1D794</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Ζ</mtext></math>=<span>1D795</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Η</mtext></math>=<span>1D796</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Θ</mtext></math>=<span>1D797</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Ι</mtext></math>=<span>1D798</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Κ</mtext></math>=<span>1D799</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Λ</mtext></math>=<span>1D79A</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Μ</mtext></math>=<span>1D79B</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Ν</mtext></math>=<span>1D79C</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Ξ</mtext></math>=<span>1D79D</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Ο</mtext></math>=<span>1D79E</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Π</mtext></math>=<span>1D79F</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Ρ</mtext></math>=<span>1D7A0</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Σ</mtext></math>=<span>1D7A2</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Τ</mtext></math>=<span>1D7A3</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Υ</mtext></math>=<span>1D7A4</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Φ</mtext></math>=<span>1D7A5</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Χ</mtext></math>=<span>1D7A6</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Ψ</mtext></math>=<span>1D7A7</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">Ω</mtext></math>=<span>1D7A8</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">α</mtext></math>=<span>1D7AA</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">β</mtext></math>=<span>1D7AB</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">γ</mtext></math>=<span>1D7AC</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">δ</mtext></math>=<span>1D7AD</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ε</mtext></math>=<span>1D7AE</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ζ</mtext></math>=<span>1D7AF</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">η</mtext></math>=<span>1D7B0</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">θ</mtext></math>=<span>1D7B1</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ι</mtext></math>=<span>1D7B2</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">κ</mtext></math>=<span>1D7B3</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">λ</mtext></math>=<span>1D7B4</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">μ</mtext></math>=<span>1D7B5</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ν</mtext></math>=<span>1D7B6</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ξ</mtext></math>=<span>1D7B7</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ο</mtext></math>=<span>1D7B8</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">π</mtext></math>=<span>1D7B9</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ρ</mtext></math>=<span>1D7BA</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ς</mtext></math>=<span>1D7BB</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">σ</mtext></math>=<span>1D7BC</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">τ</mtext></math>=<span>1D7BD</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">υ</mtext></math>=<span>1D7BE</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">φ</mtext></math>=<span>1D7BF</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">χ</mtext></math>=<span>1D7C0</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ψ</mtext></math>=<span>1D7C1</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ω</mtext></math>=<span>1D7C2</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ϑ</mtext></math>=<span>1D7C5</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ϕ</mtext></math>=<span>1D7C7</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ϖ</mtext></math>=<span>1D7C9</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ϰ</mtext></math>=<span>1D7C6</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ϱ</mtext></math>=<span>1D7C8</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ϴ</mtext></math>=<span>1D7A1</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-bold-italic">ϵ</mtext></math>=<span>1D7C4</span></span><br/> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-italic-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-italic-ref.html new file mode 100644 index 0000000000..d7e23248c6 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-italic-ref.html @@ -0,0 +1,79 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant sans-serif-italic (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-sans-serif-italic.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝘈</mtext></math>=<span>1D608</span></span> + <span><math class="testfont"><mtext>𝘉</mtext></math>=<span>1D609</span></span> + <span><math class="testfont"><mtext>𝘊</mtext></math>=<span>1D60A</span></span> + <span><math class="testfont"><mtext>𝘋</mtext></math>=<span>1D60B</span></span> + <span><math class="testfont"><mtext>𝘌</mtext></math>=<span>1D60C</span></span> + <span><math class="testfont"><mtext>𝘍</mtext></math>=<span>1D60D</span></span> + <span><math class="testfont"><mtext>𝘎</mtext></math>=<span>1D60E</span></span> + <span><math class="testfont"><mtext>𝘏</mtext></math>=<span>1D60F</span></span> + <span><math class="testfont"><mtext>𝘐</mtext></math>=<span>1D610</span></span> + <span><math class="testfont"><mtext>𝘑</mtext></math>=<span>1D611</span></span><br/> + <span><math class="testfont"><mtext>𝘒</mtext></math>=<span>1D612</span></span> + <span><math class="testfont"><mtext>𝘓</mtext></math>=<span>1D613</span></span> + <span><math class="testfont"><mtext>𝘔</mtext></math>=<span>1D614</span></span> + <span><math class="testfont"><mtext>𝘕</mtext></math>=<span>1D615</span></span> + <span><math class="testfont"><mtext>𝘖</mtext></math>=<span>1D616</span></span> + <span><math class="testfont"><mtext>𝘗</mtext></math>=<span>1D617</span></span> + <span><math class="testfont"><mtext>𝘘</mtext></math>=<span>1D618</span></span> + <span><math class="testfont"><mtext>𝘙</mtext></math>=<span>1D619</span></span> + <span><math class="testfont"><mtext>𝘚</mtext></math>=<span>1D61A</span></span> + <span><math class="testfont"><mtext>𝘛</mtext></math>=<span>1D61B</span></span><br/> + <span><math class="testfont"><mtext>𝘜</mtext></math>=<span>1D61C</span></span> + <span><math class="testfont"><mtext>𝘝</mtext></math>=<span>1D61D</span></span> + <span><math class="testfont"><mtext>𝘞</mtext></math>=<span>1D61E</span></span> + <span><math class="testfont"><mtext>𝘟</mtext></math>=<span>1D61F</span></span> + <span><math class="testfont"><mtext>𝘠</mtext></math>=<span>1D620</span></span> + <span><math class="testfont"><mtext>𝘡</mtext></math>=<span>1D621</span></span> + <span><math class="testfont"><mtext>𝘢</mtext></math>=<span>1D622</span></span> + <span><math class="testfont"><mtext>𝘣</mtext></math>=<span>1D623</span></span> + <span><math class="testfont"><mtext>𝘤</mtext></math>=<span>1D624</span></span> + <span><math class="testfont"><mtext>𝘥</mtext></math>=<span>1D625</span></span><br/> + <span><math class="testfont"><mtext>𝘦</mtext></math>=<span>1D626</span></span> + <span><math class="testfont"><mtext>𝘧</mtext></math>=<span>1D627</span></span> + <span><math class="testfont"><mtext>𝘨</mtext></math>=<span>1D628</span></span> + <span><math class="testfont"><mtext>𝘩</mtext></math>=<span>1D629</span></span> + <span><math class="testfont"><mtext>𝘪</mtext></math>=<span>1D62A</span></span> + <span><math class="testfont"><mtext>𝘫</mtext></math>=<span>1D62B</span></span> + <span><math class="testfont"><mtext>𝘬</mtext></math>=<span>1D62C</span></span> + <span><math class="testfont"><mtext>𝘭</mtext></math>=<span>1D62D</span></span> + <span><math class="testfont"><mtext>𝘮</mtext></math>=<span>1D62E</span></span> + <span><math class="testfont"><mtext>𝘯</mtext></math>=<span>1D62F</span></span><br/> + <span><math class="testfont"><mtext>𝘰</mtext></math>=<span>1D630</span></span> + <span><math class="testfont"><mtext>𝘱</mtext></math>=<span>1D631</span></span> + <span><math class="testfont"><mtext>𝘲</mtext></math>=<span>1D632</span></span> + <span><math class="testfont"><mtext>𝘳</mtext></math>=<span>1D633</span></span> + <span><math class="testfont"><mtext>𝘴</mtext></math>=<span>1D634</span></span> + <span><math class="testfont"><mtext>𝘵</mtext></math>=<span>1D635</span></span> + <span><math class="testfont"><mtext>𝘶</mtext></math>=<span>1D636</span></span> + <span><math class="testfont"><mtext>𝘷</mtext></math>=<span>1D637</span></span> + <span><math class="testfont"><mtext>𝘸</mtext></math>=<span>1D638</span></span> + <span><math class="testfont"><mtext>𝘹</mtext></math>=<span>1D639</span></span><br/> + <span><math class="testfont"><mtext>𝘺</mtext></math>=<span>1D63A</span></span> + <span><math class="testfont"><mtext>𝘻</mtext></math>=<span>1D63B</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-italic.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-italic.html new file mode 100644 index 0000000000..e847ca9bb8 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-italic.html @@ -0,0 +1,85 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant sans-serif-italic</title> +<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/#sans-serif-italic-mappings"> +<link rel="match" href="mathvariant-sans-serif-italic-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a sans-serif-italic mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-sans-serif-italic.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">A</mtext></math>=<span>1D608</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">B</mtext></math>=<span>1D609</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">C</mtext></math>=<span>1D60A</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">D</mtext></math>=<span>1D60B</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">E</mtext></math>=<span>1D60C</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">F</mtext></math>=<span>1D60D</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">G</mtext></math>=<span>1D60E</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">H</mtext></math>=<span>1D60F</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">I</mtext></math>=<span>1D610</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">J</mtext></math>=<span>1D611</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">K</mtext></math>=<span>1D612</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">L</mtext></math>=<span>1D613</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">M</mtext></math>=<span>1D614</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">N</mtext></math>=<span>1D615</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">O</mtext></math>=<span>1D616</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">P</mtext></math>=<span>1D617</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">Q</mtext></math>=<span>1D618</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">R</mtext></math>=<span>1D619</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">S</mtext></math>=<span>1D61A</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">T</mtext></math>=<span>1D61B</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">U</mtext></math>=<span>1D61C</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">V</mtext></math>=<span>1D61D</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">W</mtext></math>=<span>1D61E</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">X</mtext></math>=<span>1D61F</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">Y</mtext></math>=<span>1D620</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">Z</mtext></math>=<span>1D621</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">a</mtext></math>=<span>1D622</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">b</mtext></math>=<span>1D623</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">c</mtext></math>=<span>1D624</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">d</mtext></math>=<span>1D625</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">e</mtext></math>=<span>1D626</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">f</mtext></math>=<span>1D627</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">g</mtext></math>=<span>1D628</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">h</mtext></math>=<span>1D629</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">i</mtext></math>=<span>1D62A</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">j</mtext></math>=<span>1D62B</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">k</mtext></math>=<span>1D62C</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">l</mtext></math>=<span>1D62D</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">m</mtext></math>=<span>1D62E</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">n</mtext></math>=<span>1D62F</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">o</mtext></math>=<span>1D630</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">p</mtext></math>=<span>1D631</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">q</mtext></math>=<span>1D632</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">r</mtext></math>=<span>1D633</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">s</mtext></math>=<span>1D634</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">t</mtext></math>=<span>1D635</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">u</mtext></math>=<span>1D636</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">v</mtext></math>=<span>1D637</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">w</mtext></math>=<span>1D638</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">x</mtext></math>=<span>1D639</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">y</mtext></math>=<span>1D63A</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif-italic">z</mtext></math>=<span>1D63B</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-ref.html new file mode 100644 index 0000000000..1087565b42 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif-ref.html @@ -0,0 +1,89 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant sans-serif (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-sans-serif.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝟢</mtext></math>=<span>1D7E2</span></span> + <span><math class="testfont"><mtext>𝟣</mtext></math>=<span>1D7E3</span></span> + <span><math class="testfont"><mtext>𝟤</mtext></math>=<span>1D7E4</span></span> + <span><math class="testfont"><mtext>𝟥</mtext></math>=<span>1D7E5</span></span> + <span><math class="testfont"><mtext>𝟦</mtext></math>=<span>1D7E6</span></span> + <span><math class="testfont"><mtext>𝟧</mtext></math>=<span>1D7E7</span></span> + <span><math class="testfont"><mtext>𝟨</mtext></math>=<span>1D7E8</span></span> + <span><math class="testfont"><mtext>𝟩</mtext></math>=<span>1D7E9</span></span> + <span><math class="testfont"><mtext>𝟪</mtext></math>=<span>1D7EA</span></span> + <span><math class="testfont"><mtext>𝟫</mtext></math>=<span>1D7EB</span></span><br/> + <span><math class="testfont"><mtext>𝖠</mtext></math>=<span>1D5A0</span></span> + <span><math class="testfont"><mtext>𝖡</mtext></math>=<span>1D5A1</span></span> + <span><math class="testfont"><mtext>𝖢</mtext></math>=<span>1D5A2</span></span> + <span><math class="testfont"><mtext>𝖣</mtext></math>=<span>1D5A3</span></span> + <span><math class="testfont"><mtext>𝖤</mtext></math>=<span>1D5A4</span></span> + <span><math class="testfont"><mtext>𝖥</mtext></math>=<span>1D5A5</span></span> + <span><math class="testfont"><mtext>𝖦</mtext></math>=<span>1D5A6</span></span> + <span><math class="testfont"><mtext>𝖧</mtext></math>=<span>1D5A7</span></span> + <span><math class="testfont"><mtext>𝖨</mtext></math>=<span>1D5A8</span></span> + <span><math class="testfont"><mtext>𝖩</mtext></math>=<span>1D5A9</span></span><br/> + <span><math class="testfont"><mtext>𝖪</mtext></math>=<span>1D5AA</span></span> + <span><math class="testfont"><mtext>𝖫</mtext></math>=<span>1D5AB</span></span> + <span><math class="testfont"><mtext>𝖬</mtext></math>=<span>1D5AC</span></span> + <span><math class="testfont"><mtext>𝖭</mtext></math>=<span>1D5AD</span></span> + <span><math class="testfont"><mtext>𝖮</mtext></math>=<span>1D5AE</span></span> + <span><math class="testfont"><mtext>𝖯</mtext></math>=<span>1D5AF</span></span> + <span><math class="testfont"><mtext>𝖰</mtext></math>=<span>1D5B0</span></span> + <span><math class="testfont"><mtext>𝖱</mtext></math>=<span>1D5B1</span></span> + <span><math class="testfont"><mtext>𝖲</mtext></math>=<span>1D5B2</span></span> + <span><math class="testfont"><mtext>𝖳</mtext></math>=<span>1D5B3</span></span><br/> + <span><math class="testfont"><mtext>𝖴</mtext></math>=<span>1D5B4</span></span> + <span><math class="testfont"><mtext>𝖵</mtext></math>=<span>1D5B5</span></span> + <span><math class="testfont"><mtext>𝖶</mtext></math>=<span>1D5B6</span></span> + <span><math class="testfont"><mtext>𝖷</mtext></math>=<span>1D5B7</span></span> + <span><math class="testfont"><mtext>𝖸</mtext></math>=<span>1D5B8</span></span> + <span><math class="testfont"><mtext>𝖹</mtext></math>=<span>1D5B9</span></span> + <span><math class="testfont"><mtext>𝖺</mtext></math>=<span>1D5BA</span></span> + <span><math class="testfont"><mtext>𝖻</mtext></math>=<span>1D5BB</span></span> + <span><math class="testfont"><mtext>𝖼</mtext></math>=<span>1D5BC</span></span> + <span><math class="testfont"><mtext>𝖽</mtext></math>=<span>1D5BD</span></span><br/> + <span><math class="testfont"><mtext>𝖾</mtext></math>=<span>1D5BE</span></span> + <span><math class="testfont"><mtext>𝖿</mtext></math>=<span>1D5BF</span></span> + <span><math class="testfont"><mtext>𝗀</mtext></math>=<span>1D5C0</span></span> + <span><math class="testfont"><mtext>𝗁</mtext></math>=<span>1D5C1</span></span> + <span><math class="testfont"><mtext>𝗂</mtext></math>=<span>1D5C2</span></span> + <span><math class="testfont"><mtext>𝗃</mtext></math>=<span>1D5C3</span></span> + <span><math class="testfont"><mtext>𝗄</mtext></math>=<span>1D5C4</span></span> + <span><math class="testfont"><mtext>𝗅</mtext></math>=<span>1D5C5</span></span> + <span><math class="testfont"><mtext>𝗆</mtext></math>=<span>1D5C6</span></span> + <span><math class="testfont"><mtext>𝗇</mtext></math>=<span>1D5C7</span></span><br/> + <span><math class="testfont"><mtext>𝗈</mtext></math>=<span>1D5C8</span></span> + <span><math class="testfont"><mtext>𝗉</mtext></math>=<span>1D5C9</span></span> + <span><math class="testfont"><mtext>𝗊</mtext></math>=<span>1D5CA</span></span> + <span><math class="testfont"><mtext>𝗋</mtext></math>=<span>1D5CB</span></span> + <span><math class="testfont"><mtext>𝗌</mtext></math>=<span>1D5CC</span></span> + <span><math class="testfont"><mtext>𝗍</mtext></math>=<span>1D5CD</span></span> + <span><math class="testfont"><mtext>𝗎</mtext></math>=<span>1D5CE</span></span> + <span><math class="testfont"><mtext>𝗏</mtext></math>=<span>1D5CF</span></span> + <span><math class="testfont"><mtext>𝗐</mtext></math>=<span>1D5D0</span></span> + <span><math class="testfont"><mtext>𝗑</mtext></math>=<span>1D5D1</span></span><br/> + <span><math class="testfont"><mtext>𝗒</mtext></math>=<span>1D5D2</span></span> + <span><math class="testfont"><mtext>𝗓</mtext></math>=<span>1D5D3</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif.html new file mode 100644 index 0000000000..0b346aa178 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-sans-serif.html @@ -0,0 +1,95 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant sans-serif</title> +<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/#sans-serif-mappings"> +<link rel="match" href="mathvariant-sans-serif-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a sans-serif mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-sans-serif.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="sans-serif">0</mtext></math>=<span>1D7E2</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">1</mtext></math>=<span>1D7E3</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">2</mtext></math>=<span>1D7E4</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">3</mtext></math>=<span>1D7E5</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">4</mtext></math>=<span>1D7E6</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">5</mtext></math>=<span>1D7E7</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">6</mtext></math>=<span>1D7E8</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">7</mtext></math>=<span>1D7E9</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">8</mtext></math>=<span>1D7EA</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">9</mtext></math>=<span>1D7EB</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif">A</mtext></math>=<span>1D5A0</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">B</mtext></math>=<span>1D5A1</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">C</mtext></math>=<span>1D5A2</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">D</mtext></math>=<span>1D5A3</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">E</mtext></math>=<span>1D5A4</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">F</mtext></math>=<span>1D5A5</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">G</mtext></math>=<span>1D5A6</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">H</mtext></math>=<span>1D5A7</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">I</mtext></math>=<span>1D5A8</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">J</mtext></math>=<span>1D5A9</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif">K</mtext></math>=<span>1D5AA</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">L</mtext></math>=<span>1D5AB</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">M</mtext></math>=<span>1D5AC</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">N</mtext></math>=<span>1D5AD</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">O</mtext></math>=<span>1D5AE</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">P</mtext></math>=<span>1D5AF</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">Q</mtext></math>=<span>1D5B0</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">R</mtext></math>=<span>1D5B1</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">S</mtext></math>=<span>1D5B2</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">T</mtext></math>=<span>1D5B3</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif">U</mtext></math>=<span>1D5B4</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">V</mtext></math>=<span>1D5B5</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">W</mtext></math>=<span>1D5B6</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">X</mtext></math>=<span>1D5B7</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">Y</mtext></math>=<span>1D5B8</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">Z</mtext></math>=<span>1D5B9</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">a</mtext></math>=<span>1D5BA</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">b</mtext></math>=<span>1D5BB</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">c</mtext></math>=<span>1D5BC</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">d</mtext></math>=<span>1D5BD</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif">e</mtext></math>=<span>1D5BE</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">f</mtext></math>=<span>1D5BF</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">g</mtext></math>=<span>1D5C0</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">h</mtext></math>=<span>1D5C1</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">i</mtext></math>=<span>1D5C2</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">j</mtext></math>=<span>1D5C3</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">k</mtext></math>=<span>1D5C4</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">l</mtext></math>=<span>1D5C5</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">m</mtext></math>=<span>1D5C6</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">n</mtext></math>=<span>1D5C7</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif">o</mtext></math>=<span>1D5C8</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">p</mtext></math>=<span>1D5C9</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">q</mtext></math>=<span>1D5CA</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">r</mtext></math>=<span>1D5CB</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">s</mtext></math>=<span>1D5CC</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">t</mtext></math>=<span>1D5CD</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">u</mtext></math>=<span>1D5CE</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">v</mtext></math>=<span>1D5CF</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">w</mtext></math>=<span>1D5D0</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">x</mtext></math>=<span>1D5D1</span></span><br/> + <span><math class="testfont"><mtext mathvariant="sans-serif">y</mtext></math>=<span>1D5D2</span></span> + <span><math class="testfont"><mtext mathvariant="sans-serif">z</mtext></math>=<span>1D5D3</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-script-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-script-ref.html new file mode 100644 index 0000000000..60ced85bc3 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-script-ref.html @@ -0,0 +1,79 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant script (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-script.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𝒜</mtext></math>=<span>1D49C</span></span> + <span><math class="testfont"><mtext>ℬ</mtext></math>=<span>0212C</span></span> + <span><math class="testfont"><mtext>𝒞</mtext></math>=<span>1D49E</span></span> + <span><math class="testfont"><mtext>𝒟</mtext></math>=<span>1D49F</span></span> + <span><math class="testfont"><mtext>ℰ</mtext></math>=<span>02130</span></span> + <span><math class="testfont"><mtext>ℱ</mtext></math>=<span>02131</span></span> + <span><math class="testfont"><mtext>𝒢</mtext></math>=<span>1D4A2</span></span> + <span><math class="testfont"><mtext>ℋ</mtext></math>=<span>0210B</span></span> + <span><math class="testfont"><mtext>ℐ</mtext></math>=<span>02110</span></span> + <span><math class="testfont"><mtext>𝒥</mtext></math>=<span>1D4A5</span></span><br/> + <span><math class="testfont"><mtext>𝒦</mtext></math>=<span>1D4A6</span></span> + <span><math class="testfont"><mtext>ℒ</mtext></math>=<span>02112</span></span> + <span><math class="testfont"><mtext>ℳ</mtext></math>=<span>02133</span></span> + <span><math class="testfont"><mtext>𝒩</mtext></math>=<span>1D4A9</span></span> + <span><math class="testfont"><mtext>𝒪</mtext></math>=<span>1D4AA</span></span> + <span><math class="testfont"><mtext>𝒫</mtext></math>=<span>1D4AB</span></span> + <span><math class="testfont"><mtext>𝒬</mtext></math>=<span>1D4AC</span></span> + <span><math class="testfont"><mtext>ℛ</mtext></math>=<span>0211B</span></span> + <span><math class="testfont"><mtext>𝒮</mtext></math>=<span>1D4AE</span></span> + <span><math class="testfont"><mtext>𝒯</mtext></math>=<span>1D4AF</span></span><br/> + <span><math class="testfont"><mtext>𝒰</mtext></math>=<span>1D4B0</span></span> + <span><math class="testfont"><mtext>𝒱</mtext></math>=<span>1D4B1</span></span> + <span><math class="testfont"><mtext>𝒲</mtext></math>=<span>1D4B2</span></span> + <span><math class="testfont"><mtext>𝒳</mtext></math>=<span>1D4B3</span></span> + <span><math class="testfont"><mtext>𝒴</mtext></math>=<span>1D4B4</span></span> + <span><math class="testfont"><mtext>𝒵</mtext></math>=<span>1D4B5</span></span> + <span><math class="testfont"><mtext>𝒶</mtext></math>=<span>1D4B6</span></span> + <span><math class="testfont"><mtext>𝒷</mtext></math>=<span>1D4B7</span></span> + <span><math class="testfont"><mtext>𝒸</mtext></math>=<span>1D4B8</span></span> + <span><math class="testfont"><mtext>𝒹</mtext></math>=<span>1D4B9</span></span><br/> + <span><math class="testfont"><mtext>ℯ</mtext></math>=<span>0212F</span></span> + <span><math class="testfont"><mtext>𝒻</mtext></math>=<span>1D4BB</span></span> + <span><math class="testfont"><mtext>ℊ</mtext></math>=<span>0210A</span></span> + <span><math class="testfont"><mtext>𝒽</mtext></math>=<span>1D4BD</span></span> + <span><math class="testfont"><mtext>𝒾</mtext></math>=<span>1D4BE</span></span> + <span><math class="testfont"><mtext>𝒿</mtext></math>=<span>1D4BF</span></span> + <span><math class="testfont"><mtext>𝓀</mtext></math>=<span>1D4C0</span></span> + <span><math class="testfont"><mtext>𝓁</mtext></math>=<span>1D4C1</span></span> + <span><math class="testfont"><mtext>𝓂</mtext></math>=<span>1D4C2</span></span> + <span><math class="testfont"><mtext>𝓃</mtext></math>=<span>1D4C3</span></span><br/> + <span><math class="testfont"><mtext>ℴ</mtext></math>=<span>02134</span></span> + <span><math class="testfont"><mtext>𝓅</mtext></math>=<span>1D4C5</span></span> + <span><math class="testfont"><mtext>𝓆</mtext></math>=<span>1D4C6</span></span> + <span><math class="testfont"><mtext>𝓇</mtext></math>=<span>1D4C7</span></span> + <span><math class="testfont"><mtext>𝓈</mtext></math>=<span>1D4C8</span></span> + <span><math class="testfont"><mtext>𝓉</mtext></math>=<span>1D4C9</span></span> + <span><math class="testfont"><mtext>𝓊</mtext></math>=<span>1D4CA</span></span> + <span><math class="testfont"><mtext>𝓋</mtext></math>=<span>1D4CB</span></span> + <span><math class="testfont"><mtext>𝓌</mtext></math>=<span>1D4CC</span></span> + <span><math class="testfont"><mtext>𝓍</mtext></math>=<span>1D4CD</span></span><br/> + <span><math class="testfont"><mtext>𝓎</mtext></math>=<span>1D4CE</span></span> + <span><math class="testfont"><mtext>𝓏</mtext></math>=<span>1D4CF</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-script.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-script.html new file mode 100644 index 0000000000..afbdfd9f94 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-script.html @@ -0,0 +1,85 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant script</title> +<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/#script-mappings"> +<link rel="match" href="mathvariant-script-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a script mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-script.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="script">A</mtext></math>=<span>1D49C</span></span> + <span><math class="testfont"><mtext mathvariant="script">B</mtext></math>=<span>0212C</span></span> + <span><math class="testfont"><mtext mathvariant="script">C</mtext></math>=<span>1D49E</span></span> + <span><math class="testfont"><mtext mathvariant="script">D</mtext></math>=<span>1D49F</span></span> + <span><math class="testfont"><mtext mathvariant="script">E</mtext></math>=<span>02130</span></span> + <span><math class="testfont"><mtext mathvariant="script">F</mtext></math>=<span>02131</span></span> + <span><math class="testfont"><mtext mathvariant="script">G</mtext></math>=<span>1D4A2</span></span> + <span><math class="testfont"><mtext mathvariant="script">H</mtext></math>=<span>0210B</span></span> + <span><math class="testfont"><mtext mathvariant="script">I</mtext></math>=<span>02110</span></span> + <span><math class="testfont"><mtext mathvariant="script">J</mtext></math>=<span>1D4A5</span></span><br/> + <span><math class="testfont"><mtext mathvariant="script">K</mtext></math>=<span>1D4A6</span></span> + <span><math class="testfont"><mtext mathvariant="script">L</mtext></math>=<span>02112</span></span> + <span><math class="testfont"><mtext mathvariant="script">M</mtext></math>=<span>02133</span></span> + <span><math class="testfont"><mtext mathvariant="script">N</mtext></math>=<span>1D4A9</span></span> + <span><math class="testfont"><mtext mathvariant="script">O</mtext></math>=<span>1D4AA</span></span> + <span><math class="testfont"><mtext mathvariant="script">P</mtext></math>=<span>1D4AB</span></span> + <span><math class="testfont"><mtext mathvariant="script">Q</mtext></math>=<span>1D4AC</span></span> + <span><math class="testfont"><mtext mathvariant="script">R</mtext></math>=<span>0211B</span></span> + <span><math class="testfont"><mtext mathvariant="script">S</mtext></math>=<span>1D4AE</span></span> + <span><math class="testfont"><mtext mathvariant="script">T</mtext></math>=<span>1D4AF</span></span><br/> + <span><math class="testfont"><mtext mathvariant="script">U</mtext></math>=<span>1D4B0</span></span> + <span><math class="testfont"><mtext mathvariant="script">V</mtext></math>=<span>1D4B1</span></span> + <span><math class="testfont"><mtext mathvariant="script">W</mtext></math>=<span>1D4B2</span></span> + <span><math class="testfont"><mtext mathvariant="script">X</mtext></math>=<span>1D4B3</span></span> + <span><math class="testfont"><mtext mathvariant="script">Y</mtext></math>=<span>1D4B4</span></span> + <span><math class="testfont"><mtext mathvariant="script">Z</mtext></math>=<span>1D4B5</span></span> + <span><math class="testfont"><mtext mathvariant="script">a</mtext></math>=<span>1D4B6</span></span> + <span><math class="testfont"><mtext mathvariant="script">b</mtext></math>=<span>1D4B7</span></span> + <span><math class="testfont"><mtext mathvariant="script">c</mtext></math>=<span>1D4B8</span></span> + <span><math class="testfont"><mtext mathvariant="script">d</mtext></math>=<span>1D4B9</span></span><br/> + <span><math class="testfont"><mtext mathvariant="script">e</mtext></math>=<span>0212F</span></span> + <span><math class="testfont"><mtext mathvariant="script">f</mtext></math>=<span>1D4BB</span></span> + <span><math class="testfont"><mtext mathvariant="script">g</mtext></math>=<span>0210A</span></span> + <span><math class="testfont"><mtext mathvariant="script">h</mtext></math>=<span>1D4BD</span></span> + <span><math class="testfont"><mtext mathvariant="script">i</mtext></math>=<span>1D4BE</span></span> + <span><math class="testfont"><mtext mathvariant="script">j</mtext></math>=<span>1D4BF</span></span> + <span><math class="testfont"><mtext mathvariant="script">k</mtext></math>=<span>1D4C0</span></span> + <span><math class="testfont"><mtext mathvariant="script">l</mtext></math>=<span>1D4C1</span></span> + <span><math class="testfont"><mtext mathvariant="script">m</mtext></math>=<span>1D4C2</span></span> + <span><math class="testfont"><mtext mathvariant="script">n</mtext></math>=<span>1D4C3</span></span><br/> + <span><math class="testfont"><mtext mathvariant="script">o</mtext></math>=<span>02134</span></span> + <span><math class="testfont"><mtext mathvariant="script">p</mtext></math>=<span>1D4C5</span></span> + <span><math class="testfont"><mtext mathvariant="script">q</mtext></math>=<span>1D4C6</span></span> + <span><math class="testfont"><mtext mathvariant="script">r</mtext></math>=<span>1D4C7</span></span> + <span><math class="testfont"><mtext mathvariant="script">s</mtext></math>=<span>1D4C8</span></span> + <span><math class="testfont"><mtext mathvariant="script">t</mtext></math>=<span>1D4C9</span></span> + <span><math class="testfont"><mtext mathvariant="script">u</mtext></math>=<span>1D4CA</span></span> + <span><math class="testfont"><mtext mathvariant="script">v</mtext></math>=<span>1D4CB</span></span> + <span><math class="testfont"><mtext mathvariant="script">w</mtext></math>=<span>1D4CC</span></span> + <span><math class="testfont"><mtext mathvariant="script">x</mtext></math>=<span>1D4CD</span></span><br/> + <span><math class="testfont"><mtext mathvariant="script">y</mtext></math>=<span>1D4CE</span></span> + <span><math class="testfont"><mtext mathvariant="script">z</mtext></math>=<span>1D4CF</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-stretched-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-stretched-ref.html new file mode 100644 index 0000000000..8ad8f7b9bb --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-stretched-ref.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant stretched (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-stretched.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𞹾</mtext></math>=<span>1EE7E</span></span> + <span><math class="testfont"><mtext>𞹡</mtext></math>=<span>1EE61</span></span> + <span><math class="testfont"><mtext>𞹵</mtext></math>=<span>1EE75</span></span> + <span><math class="testfont"><mtext>𞹶</mtext></math>=<span>1EE76</span></span> + <span><math class="testfont"><mtext>𞹢</mtext></math>=<span>1EE62</span></span> + <span><math class="testfont"><mtext>𞹧</mtext></math>=<span>1EE67</span></span> + <span><math class="testfont"><mtext>𞹷</mtext></math>=<span>1EE77</span></span> + <span><math class="testfont"><mtext>𞹮</mtext></math>=<span>1EE6E</span></span> + <span><math class="testfont"><mtext>𞹴</mtext></math>=<span>1EE74</span></span> + <span><math class="testfont"><mtext>𞹱</mtext></math>=<span>1EE71</span></span><br/> + <span><math class="testfont"><mtext>𞹹</mtext></math>=<span>1EE79</span></span> + <span><math class="testfont"><mtext>𞹨</mtext></math>=<span>1EE68</span></span> + <span><math class="testfont"><mtext>𞹺</mtext></math>=<span>1EE7A</span></span> + <span><math class="testfont"><mtext>𞹯</mtext></math>=<span>1EE6F</span></span> + <span><math class="testfont"><mtext>𞹻</mtext></math>=<span>1EE7B</span></span> + <span><math class="testfont"><mtext>𞹰</mtext></math>=<span>1EE70</span></span> + <span><math class="testfont"><mtext>𞹲</mtext></math>=<span>1EE72</span></span> + <span><math class="testfont"><mtext>𞹪</mtext></math>=<span>1EE6A</span></span> + <span><math class="testfont"><mtext>𞹬</mtext></math>=<span>1EE6C</span></span> + <span><math class="testfont"><mtext>𞹭</mtext></math>=<span>1EE6D</span></span><br/> + <span><math class="testfont"><mtext>𞹤</mtext></math>=<span>1EE64</span></span> + <span><math class="testfont"><mtext>𞹩</mtext></math>=<span>1EE69</span></span> + <span><math class="testfont"><mtext>𞹼</mtext></math>=<span>1EE7C</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-stretched.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-stretched.html new file mode 100644 index 0000000000..84210c339b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-stretched.html @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant stretched</title> +<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/#stretched-mappings"> +<link rel="match" href="mathvariant-stretched-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a stretched mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-stretched.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="stretched">ڡ</mtext></math>=<span>1EE7E</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ب</mtext></math>=<span>1EE61</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ت</mtext></math>=<span>1EE75</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ث</mtext></math>=<span>1EE76</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ج</mtext></math>=<span>1EE62</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ح</mtext></math>=<span>1EE67</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">خ</mtext></math>=<span>1EE77</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">س</mtext></math>=<span>1EE6E</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ش</mtext></math>=<span>1EE74</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ص</mtext></math>=<span>1EE71</span></span><br/> + <span><math class="testfont"><mtext mathvariant="stretched">ض</mtext></math>=<span>1EE79</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ط</mtext></math>=<span>1EE68</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ظ</mtext></math>=<span>1EE7A</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ع</mtext></math>=<span>1EE6F</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">غ</mtext></math>=<span>1EE7B</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ف</mtext></math>=<span>1EE70</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ق</mtext></math>=<span>1EE72</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ك</mtext></math>=<span>1EE6A</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">م</mtext></math>=<span>1EE6C</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ن</mtext></math>=<span>1EE6D</span></span><br/> + <span><math class="testfont"><mtext mathvariant="stretched">ه</mtext></math>=<span>1EE64</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ي</mtext></math>=<span>1EE69</span></span> + <span><math class="testfont"><mtext mathvariant="stretched">ٮ</mtext></math>=<span>1EE7C</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-tailed-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-tailed-ref.html new file mode 100644 index 0000000000..5273a28e6b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-tailed-ref.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant tailed (reference)</title> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-tailed.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext>𞹒</mtext></math>=<span>1EE52</span></span> + <span><math class="testfont"><mtext>𞹋</mtext></math>=<span>1EE4B</span></span> + <span><math class="testfont"><mtext>𞹍</mtext></math>=<span>1EE4D</span></span> + <span><math class="testfont"><mtext>𞹉</mtext></math>=<span>1EE49</span></span> + <span><math class="testfont"><mtext>𞹂</mtext></math>=<span>1EE42</span></span> + <span><math class="testfont"><mtext>𞹇</mtext></math>=<span>1EE47</span></span> + <span><math class="testfont"><mtext>𞹗</mtext></math>=<span>1EE57</span></span> + <span><math class="testfont"><mtext>𞹟</mtext></math>=<span>1EE5F</span></span> + <span><math class="testfont"><mtext>𞹎</mtext></math>=<span>1EE4E</span></span> + <span><math class="testfont"><mtext>𞹔</mtext></math>=<span>1EE54</span></span><br/> + <span><math class="testfont"><mtext>𞹑</mtext></math>=<span>1EE51</span></span> + <span><math class="testfont"><mtext>𞹙</mtext></math>=<span>1EE59</span></span> + <span><math class="testfont"><mtext>𞹏</mtext></math>=<span>1EE4F</span></span> + <span><math class="testfont"><mtext>𞹛</mtext></math>=<span>1EE5B</span></span> + <span><math class="testfont"><mtext>𞹝</mtext></math>=<span>1EE5D</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-tailed.html b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-tailed.html new file mode 100644 index 0000000000..4590b76aa1 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mathvariant-tailed.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>mathvariant tailed</title> +<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/#tailed-mappings"> +<link rel="match" href="mathvariant-tailed-ref.html"/> +<meta name="assert" content="Verify that a single-char <mtext> with a tailed mathvariant is equivalent to an <mtext> with the transformed unicode character."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-tailed.woff"); + } + body > span { + padding: 10px; + } + span > span { + font-family: monospace; + font-size: 10px; + } + .testfont { + font-family: TestFont; + font-size: 10px; + } +</style> +<body> + <!-- Generated by mathml/tools/mathvariant.py; DO NOT EDIT. --> + <p>Test passes if all the equalities below are true.</p> + <span><math class="testfont"><mtext mathvariant="tailed">ق</mtext></math>=<span>1EE52</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">ل</mtext></math>=<span>1EE4B</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">ن</mtext></math>=<span>1EE4D</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">ي</mtext></math>=<span>1EE49</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">ج</mtext></math>=<span>1EE42</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">ح</mtext></math>=<span>1EE47</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">خ</mtext></math>=<span>1EE57</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">ٯ</mtext></math>=<span>1EE5F</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">س</mtext></math>=<span>1EE4E</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">ش</mtext></math>=<span>1EE54</span></span><br/> + <span><math class="testfont"><mtext mathvariant="tailed">ص</mtext></math>=<span>1EE51</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">ض</mtext></math>=<span>1EE59</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">ع</mtext></math>=<span>1EE4F</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">غ</mtext></math>=<span>1EE5B</span></span> + <span><math class="testfont"><mtext mathvariant="tailed">ں</mtext></math>=<span>1EE5D</span></span> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mi-fontstyle-fontweight-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/mi-fontstyle-fontweight-ref.html new file mode 100644 index 0000000000..63e6e2ba9c --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mi-fontstyle-fontweight-ref.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>single-char mi and fontstyle/fontweight attributes (reference)</title> + <style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-italic.woff"); + } + .testfont { + font-family: TestFont; + font-size: 32px; + } + </style> + </head> + <body> + <p>Test passes if you see <span class="testfont">𝜕</span> rendered twice, without any bold or italic style applied:</p> + <p><math class="testfont"><mi mathvariant="normal">𝜕</mi></math></p> + <p><math class="testfont"><mi mathvariant="normal">𝜕</mi></math></p> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/mi-fontstyle-fontweight.html b/testing/web-platform/tests/mathml/relations/css-styling/mi-fontstyle-fontweight.html new file mode 100644 index 0000000000..b6dd05ea20 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/mi-fontstyle-fontweight.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>single-char mi and fontstyle/fontweight attributes</title> + <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://bugzilla.mozilla.org/show_bug.cgi?id=1789081"> + <link rel="match" href="mi-fontstyle-fontweight-ref.html"/> + <meta name="assert" content="Verify that fontstyle/fontweight don't cancel the mathvariant transform on single-char mi elements."> + <style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/mathvariant-italic.woff"); + } + .testfont { + font-family: TestFont; + font-size: 32px; + } + </style> + </head> + <body> + <p>Test passes if you see <span class="testfont">𝜕</span> rendered twice, without any bold or italic style applied:</p> + <p><math class="testfont"><mi fontweight="bold">∂</mi></math></p> + <p><math class="testfont"><mi fontstyle="normal">∂</mi></math></p> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/multi-column-layout.html b/testing/web-platform/tests/mathml/relations/css-styling/multi-column-layout.html new file mode 100644 index 0000000000..88db5047e9 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/multi-column-layout.html @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>MathML inside multi-column</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#html-and-svg"> +<meta name="assert" content="Verify that putting MathML inside a multi-column list shouldn't affect its layout."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/feature-detection.js"></script> +<script> + setup({ explicit_done: true }); + window.addEventListener("DOMContentLoaded", function() { + var epsilon = 1; + var mfrac = document.getElementById("mfrac"); + var num = mfrac.firstElementChild.getBoundingClientRect(); + var denom = mfrac.lastElementChild.getBoundingClientRect(); + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + assert_approx_equals(num.width, 30, epsilon, "numerator width"); + assert_approx_equals(num.height, 40, epsilon, "numerator height"); + assert_approx_equals(denom.width, 50, epsilon, "numerator width"); + assert_approx_equals(denom.height, 60, epsilon, "numerator height"); + }, "mspace layout in multicol"); + test(function() { + assert_true(MathMLFeatureDetection.has_mfrac()); + assert_greater_than_equal(denom.bottom - num.top, + (40 + 60), + "numerator is above the denominator"); + assert_approx_equals((num.left + num.right) / 2, + (denom.left + denom.right) / 2, + epsilon, "numerator and denominator are horizontally aligned"); + }, "mfrac layout in multicol"); + done(); + }); +</script> +</head> +<body> + <div id="log"></div> + <div style="column-width: 10em; list-style-type: decimal;"> + <ol> + <li>blah</li> + <li> + <math> + <mfrac id="mfrac"> + <mspace width="30px" height="40px" style="background: cyan"></mspace> + <mspace width="50px" height="60px" style="background: yellow"></mspace> + </mfrac> + </li> + <li>blah</li> + <li>blah</li> + <li>blah</li> + </ol> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/not-participating-to-parent-layout.html b/testing/web-platform/tests/mathml/relations/css-styling/not-participating-to-parent-layout.html new file mode 100644 index 0000000000..0952679c62 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/not-participating-to-parent-layout.html @@ -0,0 +1,77 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Elements not participating to the layout of their parent</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<meta name="assert" content="Verify that display: none and out-of-flow positioned elements do not participate to layout of their parent."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/layout-comparison.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + + for (tag in MathMLFragments) { + if (!FragmentHelper.isValidChildOfMrow(tag) || + FragmentHelper.isEmpty(tag)) + continue; + ["display: none", + "display: contents", + "position: absolute", + "position: fixed" + ].forEach(style => { + document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\ +<div style="display: inline-block"><math>${MathMLFragments[tag]}</math></div>\ +<div style="display: inline-block"><math>${MathMLFragments[tag]}</math></div>\ +</div>`); + var div = document.body.lastElementChild; + + var elementContainer = div.firstElementChild; + var elementContainerWidth = elementContainer.getBoundingClientRect().width; + var element = FragmentHelper.element(elementContainer); + if (style === "display: contents" && + !element.classList.contains("mathml-container")) { + // A "display: contents" MathML child is not participating to + // parent layout because its computed style is "display: none". + // If we cannot append a MathML child then skip that test. + return; + } + FragmentHelper.forceNonEmptyElement(element); + var allowInvalid = true; + var child = FragmentHelper.appendChild(element, allowInvalid); + child.setAttribute("style", style); + + var referenceContainer = div.lastElementChild; + var referenceContainerWidth = referenceContainer.getBoundingClientRect().width; + var reference = FragmentHelper.element(referenceContainer); + FragmentHelper.forceNonEmptyElement(reference); + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + assert_approx_equals(elementContainerWidth, referenceContainerWidth, epsilon); + }, `${tag} preferred width calculation is not affected by children with "${style}" style`); + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + compareLayout(element, reference, epsilon); + }, `${tag} layout is not affected by children with "${style}" style`); + + div.style = "display: none;"; // Hide the div after measurement. + }); + } + + done(); + } +</script> +</head> +<body> + <div id="log"></div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/absolutely-positioned-001-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/absolutely-positioned-001-ref.html new file mode 100644 index 0000000000..447c5b722a --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/absolutely-positioned-001-ref.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>Absolutely positioned (reference)</title> +<body> + <p>Test passes if you see a green square and no red.</p> + <div style="position: absolute; left: 100px; top: 100px;"> + <math> + <mrow> + <mspace width="100px" height="300px" style="background: green"/> + <mspace width="100px" height="300px" style="background: green"/> + <mspace width="100px" height="300px" style="background: green"/> + </mrow> + </math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/absolutely-positioned-001.html b/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/absolutely-positioned-001.html new file mode 100644 index 0000000000..9a7851ba23 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/absolutely-positioned-001.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>Absolutely positioned</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-of-mrow"> +<link rel="match" href="absolutely-positioned-001-ref.html"/> +<meta name="assert" content="Verify visual rendering of absolutely positioned mtext elements."> +<body> + <p>Test passes if you see a green square and no red.</p> + <div style="position: absolute; left: 100px; top: 100px;"> + <math> + <mrow> + <mspace width="100px" height="300px" style="background: green"/> + <mspace width="100px" height="300px" style="background: red"/> + <mspace width="100px" height="300px" style="background: green"/> + <mtext style="position: absolute; left: 100px; top: 0px;"><span style="display: inline-block; width: 50px; height: 300px; background: green"></span></mtext> + <mtext style="position: absolute; left: 150px; top: 0px;"><span style="display: inline-block; width: 50px; height: 150px; background: green"></span></mtext> + <mtext style="position: absolute; left: 150px; top: 150px;"><span style="display: inline-block; width: 50px; height: 150px; background: green"></span></mtext> + </mrow> + </math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/all-mathml-containers.html b/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/all-mathml-containers.html new file mode 100644 index 0000000000..9069b92637 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/all-mathml-containers.html @@ -0,0 +1,103 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>absolutely positioned in all MathML elements</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<meta name="assert" content="Verify that absolutely positioned node works in all MathML elements."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<style> + /* override display: none on children of maction/semantics */ + maction > *, semantics > * { + display: math; + } +</style> +<script> + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + ["absolute", "fixed"].forEach(positionValue => { + for (tag in MathMLFragments) { + if (!FragmentHelper.isValidChildOfMrow(tag) || + FragmentHelper.isEmpty(tag)) + continue; + document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\ +<math>${MathMLFragments[tag]}</math>\ +</div>`); + let div = document.body.lastElementChild; + let element = FragmentHelper.element(div.firstElementChild); + FragmentHelper.forceNonEmptyElement(element); + if (element.classList.contains("mathml-container") || + element.classList.contains("foreign-container")) { + for (let i = 0; i < 5; i++) { + FragmentHelper.appendChild(element); + } + } + + let middleChild; + if (element.children.length >= 2) { + middleChild = FragmentHelper.appendChild(element, true /*allowInvalid*/); + middleChild.setAttribute("style", `position: ${positionValue}; left: 300px; top: 400px`); + let middlePosition = Math.floor(element.children.length/2); + element.insertBefore(middleChild, element.children[middlePosition]); + } + + let firstChild = FragmentHelper.appendChild(element, true /*allowInvalid*/); + firstChild.setAttribute("style", `position: ${positionValue}; left: 100px; top: 200px`); + element.insertBefore(firstChild, element.firstElementChild); + + let lastChild = FragmentHelper.appendChild(element, true /*allowInvalid*/); + lastChild.setAttribute("style", `position: ${positionValue}; left: 500px; top: 600px`); + + let referenceBox; + switch (positionValue) { + case "absolute": + // Use the absolutely positioned div ancestor. + referenceBox = div.getBoundingClientRect(); + break + case "fixed": + // Use the viewport. + referenceBox = {left: 0, top: 0}; + break; + default: + throw "reference box not defined"; + } + + let firstChildBox = firstChild.getBoundingClientRect(); + let lastChildBox = lastChild.getBoundingClientRect(); + let middleChildBox; + if (middleChild) { + middleChildBox = middleChild.getBoundingClientRect(); + } + + let epsilon = 1; + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + assert_approx_equals(firstChildBox.left - referenceBox.left, 100, epsilon); + assert_approx_equals(firstChildBox.top - referenceBox.top, 200, epsilon); + if (middleChildBox) { + assert_approx_equals(middleChildBox.left - referenceBox.left, 300, epsilon); + assert_approx_equals(middleChildBox.top - referenceBox.top, 400, epsilon); + } + assert_approx_equals(lastChildBox.left - referenceBox.left, 500, epsilon); + assert_approx_equals(lastChildBox.top - referenceBox.top, 600, epsilon); + }, `position: ${positionValue}; children in ${tag}`); + + div.style = "display: none;"; // Hide the div after measurement. + } + }); + + done(); + } +</script> +</head> +<body> + <div id="log"></div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/fixed-positioned-001-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/fixed-positioned-001-ref.html new file mode 100644 index 0000000000..03b9f56698 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/fixed-positioned-001-ref.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"/> +<title>Fixed positioned (reference)</title> +<style> + body { overflow: hidden; } +</style> +<body> + <div style="position: absolute; left: 100px; top: 200px; + height: 3000px; width: 3000px;"> + <math> + <mrow> + <mspace width="100px" height="300px" style="background: green"/> + <mspace width="100px" height="300px" style="background: green"/> + <mspace width="100px" height="300px" style="background: green"/> + </mrow> + </math> + <p>Test passes if you see a green square and no red.</p> + </div> + <script> + requestAnimationFrame(() => { + window.scrollTo(50, 100); + document.documentElement.classList.remove("reftest-wait"); + }); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/fixed-positioned-001.html b/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/fixed-positioned-001.html new file mode 100644 index 0000000000..994174162c --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/out-of-flow/fixed-positioned-001.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"/> +<title>Fixed positioned</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-of-mrow"> +<link rel="match" href="fixed-positioned-001-ref.html"/> +<meta name="assert" content="Verify visual rendering of fixed positioned mtext elements."> +<style> + body { overflow: hidden; } +</style> +<body> + <div style="position: absolute; left: 100px; top: 200px; + height: 3000px; width: 3000px;"> + <math> + <mrow> + <mspace width="100px" height="300px" style="background: green"/> + <mspace width="100px" height="300px" style="background: red"/> + <mspace width="100px" height="300px" style="background: green"/> + <mtext style="position: fixed; left: 150px; top: 100px;"><span style="display: inline-block; width: 50px; height: 300px; background: green"></span></mtext> + <mtext style="position: fixed; left: 200px; top: 100px;"><span style="display: inline-block; width: 50px; height: 150px; background: green"></span></mtext> + <mtext style="position: fixed; left: 200px; top: 250px;"><span style="display: inline-block; width: 50px; height: 150px; background: green"></span></mtext> + </mrow> + </math> + <p>Test passes if you see a green square and no red.</p> + </div> + <script> + requestAnimationFrame(() => { + window.scrollTo(50, 100); + document.documentElement.classList.remove("reftest-wait"); + }); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/overflow/computed-value-001.html b/testing/web-platform/tests/mathml/relations/css-styling/overflow/computed-value-001.html new file mode 100644 index 0000000000..0510f1da6d --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/overflow/computed-value-001.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>overflow on MathML elements</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#user-agent-stylesheet"> +<meta name="assert" content="overflow can be overridden on MathML elements."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<style> + /* selector defined in mathml-fragments.js */ + .element { + overflow: scroll; + } +</style> +</head> +<body> + <div id="log"></div> + <div id="container"> + <math class="element"></math> + </div> + <script> + test(function () { + var container = document.getElementById("container"); + for (tag in MathMLFragments) { + // Skip mtable as browsers don't have interoperable behavior for + // display: table. + // See https://github.com/w3c/csswg-drafts/issues/8133 + if (tag == "mtable") + continue; + container.insertAdjacentHTML("beforeend", `<math>${MathMLFragments[tag]}</math>`); + } + let unknownElement = FragmentHelper.createElement("unknown"); + unknownElement.setAttribute("class", "element"); + container.appendChild(unknownElement); + Array.from(document.getElementsByClassName("element")).forEach(element => { + var tag = element.tagName; + var style = window.getComputedStyle(element); + assert_equals(style["overflow"], "scroll", `overflow on ${tag}`); + }, `overflow can be overridden on all MathML elements`); + }); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/border-001.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/border-001.html new file mode 100644 index 0000000000..fd86388ccd --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/border-001.html @@ -0,0 +1,179 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>border</title> +<link rel="help" href="https://w3c.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="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/box-comparison.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-border"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 30, epsilon, "element width"); + assert_approx_equals(b.height, 40 + 50 + 50, epsilon, "element height"); + }, "Border properties on mrow"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + assert_true(MathMLFeatureDetection.has_dir()); + var s = measureSpaceAround("mrow-border-rtl") + 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"); + var b = document.getElementById("mrow-border-rtl"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 30, epsilon, "element width"); + assert_approx_equals(b.height, 40 + 50 + 50, epsilon, "element height"); + }, "Border properties on mrow (rtl)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-border-shorthand"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 20, epsilon, "element width"); + assert_approx_equals(b.height, 20 + 50 + 20, epsilon, "element height"); + }, "Border properties on mrow (shorthand)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-border-logical"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 30, epsilon, "element width"); + assert_approx_equals(b.height, 40 + 50 + 50, epsilon, "element height"); + }, "Border properties on mrow (logical)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + assert_true(MathMLFeatureDetection.has_dir()); + var s = measureSpaceAround("mrow-border-logical-rtl") + assert_approx_equals(s.left, 30, epsilon, "left border"); + assert_approx_equals(s.right, 20, epsilon, "right border"); + assert_approx_equals(s.top, 40, epsilon, "top border"); + assert_approx_equals(s.bottom, 50, epsilon, "bottom border"); + var b = document.getElementById("mrow-border-logical-rtl"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 30, epsilon, "element width"); + assert_approx_equals(b.height, 40 + 50 + 50, epsilon, "element height"); + }, "Border properties on mrow (logical, rtl)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-border-logical-shorthand"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 20, epsilon, "element width"); + assert_approx_equals(b.height, 30 + 50 + 30, epsilon, "element height"); + }, "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 solid transparent; + border-right: 30px solid transparent; + border-top: 40px solid transparent; + border-bottom: 50px solid transparent;"> + <mspace width="50px" height="50px"></mspace> + </mrow> + </mrow> + </math> + </p> + <p> + <math dir="rtl"> + <mrow> + <mrow id="mrow-border-rtl" + style="border-left: 20px solid transparent; + border-right: 30px solid transparent; + border-top: 40px solid transparent; + border-bottom: 50px solid transparent;"> + <mspace width="50px" height="50px"></mspace> + </mrow> + </mrow> + </math> + </p> + <p> + <math> + <mrow> + <mrow id="mrow-border-shorthand" + style="border: 20px solid transparent;"> + <mspace width="50px" height="50px"></mspace> + </mrow> + </mrow> + </math> + </p> + <p> + <math> + <mrow> + <mrow id="mrow-border-logical" + style="border-inline-start: 20px solid transparent; + border-inline-end: 30px solid transparent; + border-block-start: 40px solid transparent; + border-block-end: 50px solid transparent;"> + <mspace width="50px" height="50px"></mspace> + </mrow> + </mrow> + </math> + </p> + <p> + <math dir="rtl"> + <mrow> + <mrow id="mrow-border-logical-rtl" + style="border-inline-start: 20px solid transparent; + border-inline-end: 30px solid transparent; + border-block-start: 40px solid transparent; + border-block-end: 50px solid transparent;"> + <mspace width="50px" height="50px"></mspace> + </mrow> + </mrow> + </math> + </p> + <p> + <math> + <mrow> + <mrow id="mrow-border-logical-shorthand" + style="border-inline: 20px solid transparent; + border-block: 30px solid transparent;"> + <mspace width="50px" height="50px"></mspace> + </mrow> + </mrow> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/border-002.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/border-002.html new file mode 100644 index 0000000000..bfb7f76adc --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/border-002.html @@ -0,0 +1,72 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>border</title> +<link rel="help" href="https://w3c.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="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script src="/mathml/support/box-comparison.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + + for (tag in MathMLFragments) { + if (!FragmentHelper.isValidChildOfMrow(tag)) + continue; + + var style = "border-left: 30px solid; border-right: 40px solid; border-top: 50px solid; border-bottom: 60px solid;"; + + if (FragmentHelper.isEmpty(tag)) { + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var s = compareSizeWithAndWithoutStyle(tag, style); + assert_approx_equals(s.element_width_delta, 30 + 40, epsilon, "left/right border"); + assert_approx_equals(s.element_height_delta, 50 + 60, epsilon, "top/bottom border"); + assert_approx_equals(s.preferred_width_delta, 30 + 40, epsilon, "preferred width"); + }, `Border properties on ${tag}`); + continue; + } + + var default_border = tag === "merror" ? 1 : 0; + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var s = compareSpaceWithAndWithoutStyle(tag, style); + assert_approx_equals(s.left_delta + default_border, 30, epsilon, "left border"); + assert_approx_equals(s.right_delta + default_border, 40, epsilon, "right border"); + assert_approx_equals(s.top_delta + default_border, 50, epsilon, "top border"); + assert_approx_equals(s.bottom_delta + default_border, 60, epsilon, "bottom border"); + assert_approx_equals(s.element_width_delta + 2 * default_border, 30 + 40, epsilon, "element width"); + assert_approx_equals(s.element_height_delta + 2 * default_border, 50 + 60, epsilon, "element height"); + assert_approx_equals(s.preferred_width_delta + 2 * default_border, 30 + 40, epsilon, "element preferred width"); + }, `Border properties on ${tag}`); + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var s = compareSpaceWithAndWithoutStyle(tag, style, null, "rtl"); + assert_approx_equals(s.left_delta + default_border, 30, epsilon, "left border"); + assert_approx_equals(s.right_delta + default_border, 40, epsilon, "right border"); + assert_approx_equals(s.top_delta + default_border, 50, epsilon, "top border"); + assert_approx_equals(s.bottom_delta + default_border, 60, epsilon, "bottom border"); + assert_approx_equals(s.element_width_delta + 2 * default_border, 30 + 40, epsilon, "element width"); + assert_approx_equals(s.element_height_delta + 2 * default_border, 50 + 60, epsilon, "element height"); + assert_approx_equals(s.preferred_width_delta + 2 * default_border, 30 + 40, epsilon, "element preferred width"); + }, `Border properties on ${tag} (rtl)`); + } + + done(); + } +</script> +</head> +<body> + <div id="log"></div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/margin-001.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/margin-001.html new file mode 100644 index 0000000000..eabb6f46c7 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/margin-001.html @@ -0,0 +1,179 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>margin</title> +<link rel="help" href="https://w3c.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="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/box-comparison.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-margin"). + getBoundingClientRect(); + assert_approx_equals(b.width, 50, epsilon, "element width"); + assert_approx_equals(b.height, 50, epsilon, "element height"); + }, "Margin properties on mrow"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + assert_true(MathMLFeatureDetection.has_dir()); + var s = measureSpaceAround("mrow-margin-rtl") + 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"); + var b = document.getElementById("mrow-margin-rtl"). + getBoundingClientRect(); + assert_approx_equals(b.width, 50, epsilon, "element width"); + assert_approx_equals(b.height, 50, epsilon, "element height"); + }, "Margin properties on mrow (rtl)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-margin-shorthand"). + getBoundingClientRect(); + assert_approx_equals(b.width, 50, epsilon, "element width"); + assert_approx_equals(b.height, 50, epsilon, "element height"); + }, "Margin properties on mrow (shorthand)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-margin-logical"). + getBoundingClientRect(); + assert_approx_equals(b.width, 50, epsilon, "element width"); + assert_approx_equals(b.height, 50, epsilon, "element height"); + }, "Margin properties on mrow (logical)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + assert_true(MathMLFeatureDetection.has_dir()); + var s = measureSpaceAround("mrow-margin-logical-rtl") + assert_approx_equals(s.left, 30, epsilon, "left margin"); + assert_approx_equals(s.right, 20, epsilon, "right margin"); + assert_approx_equals(s.top, 40, epsilon, "top margin"); + assert_approx_equals(s.bottom, 50, epsilon, "bottom margin"); + var b = document.getElementById("mrow-margin-logical-rtl"). + getBoundingClientRect(); + assert_approx_equals(b.width, 50, epsilon, "element width"); + assert_approx_equals(b.height, 50, epsilon, "element height"); + }, "Margin properties on mrow (logical, rtl)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-margin-logical-shorthand"). + getBoundingClientRect(); + assert_approx_equals(b.width, 50, epsilon, "element width"); + assert_approx_equals(b.height, 50, epsilon, "element height"); + }, "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 dir="rtl"> + <mrow> + <mrow id="mrow-margin-rtl" + 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 dir="rtl"> + <mrow> + <mrow id="mrow-margin-logical-rtl" + 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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/margin-002.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/margin-002.html new file mode 100644 index 0000000000..b560ed125c --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/margin-002.html @@ -0,0 +1,86 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>margin</title> +<link rel="help" href="https://w3c.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="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script src="/mathml/support/box-comparison.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + + for (tag in MathMLFragments) { + if (!FragmentHelper.isValidChildOfMrow(tag)) + continue; + + var style = "margin-left: 30px; margin-right: 40px; margin-top: 50px; margin-bottom: 60px;"; + + if (FragmentHelper.isEmpty(tag)) { + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var s = compareSizeWithAndWithoutStyle(tag, style); + assert_approx_equals(s.width_delta, 30 + 40, epsilon, "left/right margin"); + assert_approx_equals(s.height_delta, 50 + 60, epsilon, "top/bottom margin"); + assert_approx_equals(s.element_width_delta, 0, epsilon, "element width"); + assert_approx_equals(s.element_height_delta, 0, epsilon, "element height"); + assert_approx_equals(s.preferred_width_delta, 30 + 40, epsilon, "preferred width"); + }, `Margin properties on ${tag}`); + continue; + } + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var s = compareSpaceWithAndWithoutStyle(tag, style); + assert_approx_equals(s.left_delta, 30, epsilon, "left margin"); + assert_approx_equals(s.right_delta, 40, epsilon, "right margin"); + assert_approx_equals(s.top_delta, 50, epsilon, "top margin"); + assert_approx_equals(s.bottom_delta, 60, epsilon, "bottom margin"); + assert_approx_equals(s.element_width_delta, 0, epsilon, "element width"); + assert_approx_equals(s.element_height_delta, 0, epsilon, "element height"); + assert_approx_equals(s.preferred_width_delta, 30 + 40, epsilon, "preferred width"); + }, `Margin properties on ${tag}`); + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var s = compareSpaceWithAndWithoutStyle(tag, style, null, "rtl"); + assert_approx_equals(s.left_delta, 30, epsilon, "left margin"); + assert_approx_equals(s.right_delta, 40, epsilon, "right margin"); + assert_approx_equals(s.top_delta, 50, epsilon, "top margin"); + assert_approx_equals(s.bottom_delta, 60, epsilon, "bottom margin"); + assert_approx_equals(s.element_width_delta, 0, epsilon, "element width"); + assert_approx_equals(s.element_height_delta, 0, epsilon, "element height"); + assert_approx_equals(s.preferred_width_delta, 30 + 40, epsilon, "preferred width"); + }, `Margin properties on ${tag} (rtl)`); + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + // Apply the same margin style on the parent mrow. + // The margins are not collapsed so they should be added twice. + var s = compareSpaceWithAndWithoutStyle(tag, style, style); + assert_approx_equals(s.left_delta, 30 * 2, epsilon, "left margin"); + assert_approx_equals(s.right_delta, 40 * 2, epsilon, "right margin"); + assert_approx_equals(s.top_delta, 50 * 2, epsilon, "top margin"); + assert_approx_equals(s.bottom_delta, 60 * 2, epsilon, "bottom margin"); + assert_approx_equals(s.element_width_delta, 0, epsilon, "element width"); + assert_approx_equals(s.element_height_delta, 0, epsilon, "element height"); + assert_approx_equals(s.preferred_width_delta, (30 + 40) * 2, epsilon, "preferred width"); + }, `Margin properties on ${tag} (no margin-collapsing)`); + } + + done(); + } +</script> +</head> +<body> + <div id="log"></div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/margin-003.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/margin-003.html new file mode 100644 index 0000000000..3b6b2a38db --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/margin-003.html @@ -0,0 +1,93 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>margin</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<meta name="assert" content="Verify that margin is taken into account on children."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script src="/mathml/support/layout-comparison.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + + for (tag in MathMLFragments) { + if (!FragmentHelper.isValidChildOfMrow(tag) || + FragmentHelper.isEmpty(tag) || + FragmentHelper.isTokenElement(tag) || + tag == "semantics" || + tag == "maction" || + tag == "mtable") + continue; + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + + document.body.insertAdjacentHTML("beforeend", `<hr/><div>\ +<div style="display: inline-block; border: 1px dashed blue;"><math>${MathMLFragments[tag]}</math></div><br/>\ +<div style="display: inline-block; border: 1px dashed green;"><math>${MathMLFragments[tag]}</math></div>\ +</div>`); + + var div = document.body.lastElementChild; + var elementShrinkWrapContainer = div.firstElementChild; + var element = elementShrinkWrapContainer.firstElementChild.firstElementChild; + var elementContainer = div.firstElementChild; + var referenceShrinkWrapContainer = div.lastElementChild; + var reference = referenceShrinkWrapContainer.firstElementChild.firstElementChild; + + FragmentHelper.forceNonEmptyElement(element); + FragmentHelper.forceNonEmptyElement(reference); + + var mspaceWidth = 20, mspaceHeight = 40, mspaceDepth = 30; + var marginLeft = 10, marginRight = 15, marginTop = 20, marginBottom = 25; + Array.from(element.children).forEach(mrow => { + mrow.outerHTML = `<mspace width="${mspaceWidth}px" height="${mspaceHeight}px" depth='${mspaceDepth}px' style='background: blue; margin-left: ${marginLeft}px; margin-right: ${marginRight}px; margin-top: ${marginTop}px; margin-bottom: ${marginBottom}px;'></mspace>`; + }); + + Array.from(reference.children).forEach(mrow => { + mrow.outerHTML = `<mspace width="${marginLeft+mspaceWidth+marginRight}px" height="${mspaceHeight+marginTop}px" depth='${mspaceDepth+marginBottom}px' style='background: green;'></mspace>`; + }); + + // Compare sizes. + compareSize(element, reference, epsilon); + + // Compare children positions. + var elementBox = element.getBoundingClientRect(); + var referenceBox = reference.getBoundingClientRect(); + for (var i = 0; i < element.children.length; i++) { + var childBox = element.children[i].getBoundingClientRect(); + var referenceChildBox = reference.children[i].getBoundingClientRect(); + assert_approx_equals(childBox.width + marginLeft + marginRight, referenceChildBox.width, epsilon, "inline size (child ${i})"); + assert_approx_equals(childBox.height + marginTop + marginBottom, referenceChildBox.height, epsilon, "block size (child ${i})"); + + assert_approx_equals(childBox.left - marginLeft - elementBox.left, + referenceChildBox.left - referenceBox.left, + epsilon, + `inline position (child ${i})`); + assert_approx_equals(childBox.top - marginTop - elementBox.top, + referenceChildBox.top - referenceBox.top, + epsilon, + `block position (child ${i})`); + } + + // Compare preferred widths. + assert_approx_equals(elementShrinkWrapContainer.offsetWidth, referenceShrinkWrapContainer.offsetWidth, epsilon, "preferred width"); + + }, `Margin properties on the children of ${tag}`); + } + + done(); + } +</script> +</head> +<body> + <div id="log"></div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-001.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-001.html new file mode 100644 index 0000000000..b6d4901f36 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-001.html @@ -0,0 +1,179 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>padding</title> +<link rel="help" href="https://w3c.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="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/box-comparison.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-padding"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 30, epsilon, "element width"); + assert_approx_equals(b.height, 40 + 50 + 50, epsilon, "element height"); + }, "Padding properties on mrow"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + assert_true(MathMLFeatureDetection.has_dir()); + var s = measureSpaceAround("mrow-padding-rtl") + 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"); + var b = document.getElementById("mrow-padding-rtl"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 30, epsilon, "element width"); + assert_approx_equals(b.height, 40 + 50 + 50, epsilon, "element height"); + }, "Padding properties on mrow (rtl)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-padding-shorthand"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 20, epsilon, "element width"); + assert_approx_equals(b.height, 20 + 50 + 20, epsilon, "element height"); + }, "Padding properties on mrow (shorthand)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-padding-logical"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 30, epsilon, "element width"); + assert_approx_equals(b.height, 40 + 50 + 50, epsilon, "element height"); + }, "Padding properties on mrow (logical)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + assert_true(MathMLFeatureDetection.has_dir()); + var s = measureSpaceAround("mrow-padding-logical-rtl") + assert_approx_equals(s.left, 30, epsilon, "left padding"); + assert_approx_equals(s.right, 20, epsilon, "right padding"); + assert_approx_equals(s.top, 40, epsilon, "top padding"); + assert_approx_equals(s.bottom, 50, epsilon, "bottom padding"); + var b = document.getElementById("mrow-padding-logical-rtl"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 30, epsilon, "element width"); + assert_approx_equals(b.height, 40 + 50 + 50, epsilon, "element height"); + }, "Padding properties on mrow (logical, rtl)"); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + 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"); + var b = document.getElementById("mrow-padding-logical-shorthand"). + getBoundingClientRect(); + assert_approx_equals(b.width, 20 + 50 + 20, epsilon, "element width"); + assert_approx_equals(b.height, 30 + 50 + 30, epsilon, "element height"); + }, "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 dir="rtl"> + <mrow> + <mrow id="mrow-padding-rtl" + 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 dir="rtl"> + <mrow> + <mrow id="mrow-padding-logical-rtl" + 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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-002.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-002.html new file mode 100644 index 0000000000..89d3bdc7ef --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-002.html @@ -0,0 +1,71 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>padding</title> +<link rel="help" href="https://w3c.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="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script src="/mathml/support/box-comparison.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + + for (tag in MathMLFragments) { + if (!FragmentHelper.isValidChildOfMrow(tag)) + continue; + + var defaultInlinePadding = (tag === "mfrac" ? 1 : 0); + var style = `padding-left: ${defaultInlinePadding + 30}px; padding-right: ${defaultInlinePadding + 40}px; padding-top: 50px; padding-bottom: 60px;`; + + if (FragmentHelper.isEmpty(tag)) { + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var s = compareSizeWithAndWithoutStyle(tag, style); + assert_approx_equals(s.element_width_delta, 30 + 40, epsilon, "left/right padding"); + assert_approx_equals(s.element_height_delta, 50 + 60, epsilon, "top/bottom padding"); + assert_approx_equals(s.preferred_width_delta, 30 + 40, epsilon, "preferred width"); + }, `Padding properties on ${tag}`); + continue; + } + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var s = compareSpaceWithAndWithoutStyle(tag, style); + assert_approx_equals(s.left_delta, 30, epsilon, "left padding"); + assert_approx_equals(s.right_delta, 40, epsilon, "right padding"); + assert_approx_equals(s.top_delta, 50, epsilon, "top padding"); + assert_approx_equals(s.bottom_delta, 60, epsilon, "bottom padding"); + assert_approx_equals(s.element_width_delta, 30 + 40, epsilon, "element width"); + assert_approx_equals(s.element_height_delta, 50 + 60, epsilon, "element height"); + assert_approx_equals(s.preferred_width_delta, 30 + 40, epsilon, "preferred width"); + }, `Padding properties on ${tag}`); + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var s = compareSpaceWithAndWithoutStyle(tag, style, "rtl"); + assert_approx_equals(s.left_delta, 30, epsilon, "left padding"); + assert_approx_equals(s.right_delta, 40, epsilon, "right padding"); + assert_approx_equals(s.top_delta, 50, epsilon, "top padding"); + assert_approx_equals(s.bottom_delta, 60, epsilon, "bottom padding"); + assert_approx_equals(s.element_width_delta, 30 + 40, epsilon, "element width"); + assert_approx_equals(s.element_height_delta, 50 + 60, epsilon, "element height"); + assert_approx_equals(s.preferred_width_delta, 30 + 40, epsilon, "preferred width"); + }, `Padding properties on ${tag} (rtl)`); + } + + done(); + } +</script> +</head> +<body> + <div id="log"></div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-001-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-001-ref.html new file mode 100644 index 0000000000..150a650bc2 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-001-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>Padding/border/margin</title> +<body> + <p>This test passes if you see a purple square of side 100px, surrounded by a + 10px blue padding, surrounded by a 10px blue/yellow dashed border, itself + surrounded by a 10px pink margin.</p> + </div> + <div style="background: pink; position: absolute; left: 10px; top: 3em;"> + <div style="background: blue; border: 10px dashed yellow; padding: 10px; margin: 10px;"> + <div style="width: 100px; height: 100px; background: purple;"></div> + </div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-001.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-001.html new file mode 100644 index 0000000000..b0fb17c7d2 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-001.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>Padding/border/margin</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-of-mrow"> +<link rel="match" href="padding-border-margin-001-ref.html"/> +<meta name="assert" content="Verify visual rendering of padding/border/margin on the mrow element."> +<body> + <p>This test passes if you see a purple square of side 100px, surrounded by a + 10px blue padding, surrounded by a 10px blue/yellow dashed border, itself + surrounded by a 10px pink margin.</p> + <div style="background: pink; position: absolute; left: 10px; top: 3em;"> + <math> + <mrow style="background: blue; border: 10px dashed yellow; padding: 10px; margin: 10px;"> + <mspace width="100px" height="100px" style="background: purple;"></mspace> + </mrow> + </math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002-ref.html new file mode 100644 index 0000000000..e13a9f47ff --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002-ref.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>Padding/border/margin on largeop (reference)</title> +<body> + <p>This test passes if you see a cyan rectangle of width 300px and + height 1500px, surrounded by a 10px blue padding, surrounded by a 10px + blue/yellow dashed border, itself + surrounded by a 10px pink margin.</p> + </div> + <div style="background: pink; position: absolute; left: 10px; top: 4em;"> + <div style="background: blue; border: 10px dashed yellow; padding: 10px; margin: 10px;"> + <div style="width: 300px; height: 1500px; background: cyan;"></div> + </div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002.html new file mode 100644 index 0000000000..4559fc49ce --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-002.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>Padding/border/margin on largeop</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-math-style-property"> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-of-operators"> +<link rel="match" href="padding-border-margin-002-ref.html"/> +<meta name="assert" content="Verify visual rendering of padding/border/margin on a displaystyle mo element with the largeop property."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/largeop-displayoperatorminheight5000.woff"); + } + math { + /* Largeop variant for U+2AFF has width 100px + and height 300 * 5000 / 1000 = 1500px */ + font-family: TestFont; + font-size: 300px; + } +</style> +<body> + <p>This test passes if you see a cyan rectangle of width 300px and + height 1500px, surrounded by a 10px blue padding, surrounded by a 10px + blue/yellow dashed border, itself + surrounded by a 10px pink margin.</p> + <div style="background: pink; position: absolute; left: 10px; top: 4em;"> + <math displaystyle="true"> + <mo largeop="true" lspace="0" rspace="0" style="background: blue; border: 10px dashed yellow; padding: 10px; margin: 10px; color: cyan;">⫿</mo> + </math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-003-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-003-ref.html new file mode 100644 index 0000000000..275494ddd8 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-003-ref.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>Padding/border/margin on an operator, stretchy along the block axis (reference)</title> +<body> + <p>This test passes if you see a cyan rectangle of width 300px and + height 1500px, surrounded by a 10px blue padding, surrounded by a 10px + blue/yellow dashed border, itself + surrounded by a 10px pink margin.</p> + </div> + <div style="background: pink; position: absolute; left: 10px; top: 4em;"> + <div style="background: blue; border: 10px dashed yellow; padding: 10px; margin: 10px;"> + <div style="width: 300px; height: 1500px; background: cyan;"></div> + </div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-003.html b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-003.html new file mode 100644 index 0000000000..c54682f309 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/padding-border-margin/padding-border-margin-003.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>Padding/border/margin on an operator, stretchy along the block axis</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<link rel="help" href="https://w3c.github.io/mathml-core/#dfn-algorithm-for-stretching-operators-along-the-block-axis"> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-of-operators"> +<link rel="match" href="padding-border-margin-003-ref.html"/> +<meta name="assert" content="Verify visual rendering of padding/border/margin on an operator, stretchy along the block axis."> +<style> + @font-face { + font-family: TestFont; + src: url("/fonts/math/stretchy.woff"); + } + math { + font-family: TestFont; + font-size: 300px; + } +</style> +<body> + <p>This test passes if you see a cyan rectangle of width 300px and + height 1500px, surrounded by a 10px blue padding, surrounded by a 10px + blue/yellow dashed border, itself + surrounded by a 10px pink margin.</p> + <div style="background: pink; position: absolute; left: 10px; top: 4em;"> + <math> + <mspace height="750px" depth="750px"/> + <mo lspace="0" rspace="0" style="background: blue; border: 10px dashed yellow; padding: 10px; margin: 10px; color: cyan;">⥜</mo> + </math> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001-ref.html new file mode 100644 index 0000000000..3d71d72fb3 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001-ref.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>presentational hints</title> +<link rel="stylesheet" href="/fonts/ahem.css"> +<style> + @font-face { + font-family: DoubleStruck; + src: url("/fonts/math/mathvariant-double-struck.woff"); + } + @font-face { + font-family: Italic; + src: url("/fonts/math/mathvariant-italic.woff"); + } + math { + font: 25px/1 Ahem; + } +</style> +<body> + <p>dir: + <math style="direction: ltr;"> + <mtext>X</mtext> + <mtext>p</mtext> + </math> + </p> + <p>mathcolor: + <math style="color: green;"> + <mtext>X</mtext> + <mtext>p</mtext> + </math> + </p> + <p>mathbackground: + <math style="background: green;"> + <mtext>X</mtext> + <mtext>p</mtext> + </p> + <p>mathsize: + <math> + <mtext style="font-size: 100%">X</mtext> + </math> + </p> + <p>mathvariant: + <math style="font-family: DoubleStruck, Italic;"> + <mtext style="text-transform: math-italic">ب</mtext> + </math> + </p> + <p>displaystyle: + <math style="math-style: compact"> + <munder> + <mo movablelimits="true">X</mo> + <mo>X</mo> + </munder> + </math> + </p> + <p>scriptlevel: + <math> + <mtext style="math-depth: 0;">X</mtext> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001.html b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001.html new file mode 100644 index 0000000000..842d04b40a --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001.html @@ -0,0 +1,72 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>presentational hints</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"> +<link rel="help" href="https://w3c.github.io/mathml-core/#double-struck-mappings"> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#new-text-transform-values"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-mathvariant-attribute"> +<link rel="match" href="presentational-hints-001-ref.html"/> +<link rel="stylesheet" href="/fonts/ahem.css"> +<meta name="assert" content="Verify that local author style wins over presentation hints attributes"> +<style> + @font-face { + font-family: DoubleStruck; + src: url("/fonts/math/mathvariant-double-struck.woff"); + } + @font-face { + font-family: Italic; + src: url("/fonts/math/mathvariant-italic.woff"); + } + math { + font: 25px/1 Ahem; + } +</style> +<body> + <p>dir: + <math dir="rtl" style="direction: ltr;"> + <mtext>X</mtext> + <mtext>p</mtext> + </math> + </p> + <p>mathcolor: + <math mathcolor="red" style="color: green;"> + <mtext>X</mtext> + <mtext>p</mtext> + </math> + </p> + <p>mathbackground: + <math mathbackground="red" style="background: green;"> + <mtext>X</mtext> + <mtext>p</mtext> + </p> + <p>mathsize: + <math> + <mtext mathsize="300%" style="font-size: 100%">X</mtext> + </math> + </p> + <p>mathvariant: + <math style="font-family: DoubleStruck, Italic;"> + <mtext mathvariant="double-struck" + style="text-transform: math-italic">ب</mtext> + </math> + </p> + <p>displaystyle: + <math displaystyle="true" style="math-style: compact"> + <munder> + <mo movablelimits="true">X</mo> + <mo>X</mo> + </munder> + </math> + </p> + <p>scriptlevel: + <math> + <mtext scriptlevel="1" style="math-depth: 0;">X</mtext> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-002-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-002-ref.html new file mode 100644 index 0000000000..b8f5458b9b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-002-ref.html @@ -0,0 +1,59 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"/> +<title>presentational hints (dynamic)</title> +<link rel="stylesheet" href="/fonts/ahem.css"> +<style> + @font-face { + font-family: DoubleStruck; + src: url("/fonts/math/mathvariant-double-struck.woff"); + } + math { + font: 25px/1 Ahem; + } +</style> +</head> +<body> + <p>dir: + <math dir="rtl"> + <mtext>X</mtext> + <mtext>p</mtext> + </math> + </p> + <p>mathcolor: + <math mathcolor="green"> + <mtext>X</mtext> + <mtext>p</mtext> + </math> + </p> + <p>mathbackground: + <math mathbackground="green"> + <mtext>X</mtext> + <mtext>p</mtext> + </p> + <p>mathsize: + <math> + <mtext mathsize="300%">X</mtext> + </math> + </p> + <p>mathvariant: + <math style="font-family: DoubleStruck;"> + <mtext mathvariant="double-struck">ب</mtext> + </math> + </p> + <p>displaystyle: + <math displaystyle="true"> + <munder> + <mo movablelimits="true">X</mo> + <mo>X</mo> + </munder> + </math> + </p> + <p>scriptlevel: + <math> + <mtext scriptlevel="-1">X</mtext> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-002.html b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-002.html new file mode 100644 index 0000000000..fc89b07a37 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-002.html @@ -0,0 +1,84 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"/> +<title>presentational hints (dynamic)</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"> +<link rel="help" href="https://w3c.github.io/mathml-core/#double-struck-mappings"> +<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#new-text-transform-values"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-mathvariant-attribute"> +<link rel="match" href="presentational-hints-002-ref.html"/> +<link rel="stylesheet" href="/fonts/ahem.css"> +<meta name="assert" content="Verify dynamically setting attributes mapped to style."> +<style> + @font-face { + font-family: DoubleStruck; + src: url("/fonts/math/mathvariant-double-struck.woff"); + } + math { + font: 25px/1 Ahem; + } +</style> +<script> + window.addEventListener("load", function() { + // force initial layout so we're sure what we're testing against + document.documentElement.getBoundingClientRect(); + + document.getElementById("dir").setAttribute("dir", "rtl"); + document.getElementById("mathcolor").setAttribute("mathcolor", "green"); + document.getElementById("mathbackground").setAttribute("mathbackground", "green"); + document.getElementById("mathsize").setAttribute("mathsize", "300%"); + document.getElementById("mathvariant").setAttribute("mathvariant", "double-struck"); + document.getElementById("displaystyle").setAttribute("displaystyle", "true"); + document.getElementById("scriptlevel").setAttribute("scriptlevel", "-1"); + + document.documentElement.classList.remove('reftest-wait'); + }); +</script> +</head> +<body> + <p>dir: + <math id="dir"> + <mtext>X</mtext> + <mtext>p</mtext> + </math> + </p> + <p>mathcolor: + <math id="mathcolor"> + <mtext>X</mtext> + <mtext>p</mtext> + </math> + </p> + <p>mathbackground: + <math id="mathbackground"> + <mtext>X</mtext> + <mtext>p</mtext> + </p> + <p>mathsize: + <math> + <mtext id="mathsize">X</mtext> + </math> + </p> + <p>mathvariant: + <math style="font-family: DoubleStruck;"> + <mtext id="mathvariant">ب</mtext> + </math> + </p> + <p>displaystyle: + <math id="displaystyle"> + <munder> + <mo movablelimits="true">X</mo> + <mo>X</mo> + </munder> + </math> + </p> + <p>scriptlevel: + <math> + <mtext id="scriptlevel">X</mtext> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/scriptlevel-001.html b/testing/web-platform/tests/mathml/relations/css-styling/scriptlevel-001.html new file mode 100644 index 0000000000..e9be1f2965 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/scriptlevel-001.html @@ -0,0 +1,219 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Automatic scriptlevel</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-mathvariant-attribute"> +<link rel="help" href="https://w3c.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes"> +<link rel="stylesheet" href="/fonts/ahem.css"> +<meta name="assert" content="Verify automatic scriptlevel changes"> +<style> + #container, math { + /* Ahem font does not have a MATH table so the font-size scale factor + is always 0.71^{computed - inherited math script level} */ + font: 100px/1 Ahem; + } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script> + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + function fontSize(element) { + return parseFloat((/(.+)px/).exec(window.getComputedStyle(element).getPropertyValue("font-size"))[1]); + } + function runTests() { + var container = document.getElementById("container"); + var epsilon = .1 + var fontSizeAtScriptLevelZero = fontSize(container); + + test(function() { + var element = document.getElementById("mfrac_displaystyle"); + assert_approx_equals(fontSize(element.children[0]), fontSizeAtScriptLevelZero, epsilon, "numerator"); + assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero, epsilon, "denominator"); + }, "automatic scriptlevel on mfrac (displaystyle=true)"); + + test(function() { + var element = document.getElementById("mfrac_notdisplaystyle"); + assert_approx_equals(fontSize(element.children[0]), fontSizeAtScriptLevelZero * .71, epsilon, "numerator"); + assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero * .71, epsilon, "denominator"); + }, "automatic scriptlevel on mfrac (displaystyle=false)"); + + test(function() { + var element = document.getElementsByTagName("mroot")[0]; + assert_approx_equals(fontSize(element.children[0]), fontSizeAtScriptLevelZero, epsilon, "base"); + assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero * .71 * .71, epsilon, "index"); + }, "automatic scriptlevel on mroot"); + + ["msub", "msup", "msubsup", "munder", "mover", "munderover", "mmultiscripts"].forEach(tag => { + test(function() { + var element = document.getElementsByTagName(tag)[0]; + for (var i = 0; i < element.children.length; i++) + assert_approx_equals(fontSize(element.children[i]), i > 0 ? fontSizeAtScriptLevelZero * .71 : fontSizeAtScriptLevelZero, epsilon, `child ${i}`); + }, `automatic scriptlevel on ${tag}`); + }); + + test(function() { + var element = document.querySelector("munder[accentunder='true']"); + assert_approx_equals(fontSize(element.children[0]), fontSizeAtScriptLevelZero, epsilon, "base"); + assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero, epsilon, "under"); + }, `automatic scriptlevel on munder (accentunder=true)`); + + test(function() { + var element = document.querySelector("mover[accent='true']"); + assert_approx_equals(fontSize(element.children[0]), fontSizeAtScriptLevelZero, epsilon, "base"); + assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero, epsilon, "over"); + }, `automatic scriptlevel on mover (accent=true)`); + + test(function() { + var element = document.querySelector("munderover[accentunder='true']"); + assert_approx_equals(fontSize(element.children[0]), fontSizeAtScriptLevelZero, epsilon, "base"); + assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero, epsilon, "under"); + assert_approx_equals(fontSize(element.children[2]), fontSizeAtScriptLevelZero * .71, epsilon, "over"); + }, `automatic scriptlevel on munderover (accentunder=true)`); + + test(function() { + var element = document.querySelector("munderover[accent='true']"); + assert_approx_equals(fontSize(element.children[0]), fontSizeAtScriptLevelZero, epsilon, "base"); + assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero * .71, epsilon, "under"); + assert_approx_equals(fontSize(element.children[2]), fontSizeAtScriptLevelZero, epsilon, "over"); + }, `automatic scriptlevel on munderover (accent=true)`); + + test(function() { + var element = document.getElementById("munderover-dynamic-case-insensitive") + assert_approx_equals(fontSize(element.children[0]), fontSizeAtScriptLevelZero, epsilon, "base"); + assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero * .71, epsilon, "under"); + assert_approx_equals(fontSize(element.children[2]), fontSizeAtScriptLevelZero, epsilon, "over"); + + element.removeAttribute("accent"); + element.setAttribute("accentunder", "TrUe"); + assert_approx_equals(fontSize(element.children[0]), fontSizeAtScriptLevelZero, epsilon, "base"); + assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero, epsilon, "under"); + assert_approx_equals(fontSize(element.children[2]), fontSizeAtScriptLevelZero * .71, epsilon, "over"); + }, "checking dynamic/case-insensitive accent/accentunder"); + + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <div id="container"> + <p> + <math displaystyle="true"> + <mfrac id="mfrac_displaystyle"> + <mn>0</mn> + <mn>1</mn> + </mfrac> + </math> + + <math displaystyle="false"> + <mfrac id="mfrac_notdisplaystyle"> + <mn>0</mn> + <mn>1</mn> + </mfrac> + </math> + </p> + <p> + <math> + <mroot> + <mn>0</mn> + <mn>1</mn> + </mroot> + </math> + </p> + <p> + <math> + <msub> + <mn>0</mn> + <mn>1</mn> + </msub> + </math> + <math> + <msup> + <mn>0</mn> + <mn>1</mn> + </msup> + </math> + <math> + <msubsup> + <mn>0</mn> + <mn>1</mn> + <mn>2</mn> + </msubsup> + </math> + <math> + <munder> + <mn>0</mn> + <mn>1</mn> + </munder> + </math> + <math> + <mover> + <mn>0</mn> + <mn>1</mn> + </mover> + </math> + <math> + <munderover> + <mn>0</mn> + <mn>1</mn> + <mn>2</mn> + </munderover> + </math> + <math> + <mmultiscripts> + <mn>0</mn> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + <mn>4</mn> + <mprescripts/> + <mn>6</mn> + <mn>7</mn> + <mn>8</mn> + <mn>9</mn> + </mmultiscripts> + </math> + </p> + <p> + <math> + <munder accentunder="true"> + <mn>0</mn> + <mn>1</mn> + </munder> + </math> + <math> + <mover accent="true"> + <mn>0</mn> + <mn>1</mn> + </mover> + </math> + <math> + <munderover accent="true"> + <mn>0</mn> + <mn>1</mn> + <mn>2</mn> + </munderover> + </math> + <math> + <munderover accentunder="true"> + <mn>0</mn> + <mn>1</mn> + <mn>2</mn> + </munderover> + </math> + </p> + <p> + <math> + <munderover id="munderover-dynamic-case-insensitive" accent="TrUe"> + <mn>0</mn> + <mn>1</mn> + <mn>2</mn> + </munderover> + </math> + </p> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/transform-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/transform-ref.html new file mode 100644 index 0000000000..005e8a7882 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/transform-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Transform property (reference)</title> +</head> +<body> + <p>Rectangles should be rotated.</p> + <div style="background: green; width: 200px; height: 200px; position: absolute; top: 100px; transform: rotate(90deg)"></div> + <div style="background: green; width: 200px; height: 200px; position: absolute; top: 300px; transform: rotate(90deg)"></div> + </div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/transform.html b/testing/web-platform/tests/mathml/relations/css-styling/transform.html new file mode 100644 index 0000000000..c45fda3469 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/transform.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Transform property</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="match" href="transform-ref.html"/> +<meta name="assert" content="Verify that the transform property works on MathML elements."> +</head> +<body> + <p>Rectangles should be rotated.</p> + <div> + <math><mspace width="200px" height="200px" style="position:absolute; top:100px; background: green; transform: rotate(90deg)"/></math> + </div> + <div style="position: absolute; top: 300px; width: 200px; height: 200px"> + <math style="position: absolute; transform: rotate(90deg)"><mspace width="200px" height="200px" style="background: green"/></math> + </div> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/visibility-001-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/visibility-001-ref.html new file mode 100644 index 0000000000..fcaf5fe85b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-001-ref.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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/visibility-001.html b/testing/web-platform/tests/mathml/relations/css-styling/visibility-001.html new file mode 100644 index 0000000000..56bf7b7da2 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-001.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<title>visibility</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.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 id="dynamic"> + <math><mi>1</mi></math> + <math><mn>2</mn></math> + <math><mo>3</mo></math> + <math><mtext>4</mtext></math> + <math><ms>5</ms></math> + </div> + </div> + <script> + window.addEventListener("load", () => { + document.getElementById("dynamic").style.visibility = "hidden"; + document.documentElement.classList.remove("reftest-wait"); + }); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/visibility-002-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/visibility-002-ref.html new file mode 100644 index 0000000000..fcaf5fe85b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-002-ref.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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/visibility-002.html b/testing/web-platform/tests/mathml/relations/css-styling/visibility-002.html new file mode 100644 index 0000000000..f92d0faf6d --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-002.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<title>visibility</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://w3c.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 id="dynamic"> + <math><mfrac><mn>1</mn><mn>2</mn></mfrac></math> + </div> + </div> + <script src="/mathml/support/feature-detection.js"></script> + <script> + window.addEventListener("load", () => { + document.getElementById("dynamic").style.visibility = "hidden"; + document.documentElement.classList.remove("reftest-wait"); + }); + </script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mfrac");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/visibility-003-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/visibility-003-ref.html new file mode 100644 index 0000000000..fcaf5fe85b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-003-ref.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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/visibility-003.html b/testing/web-platform/tests/mathml/relations/css-styling/visibility-003.html new file mode 100644 index 0000000000..4bf4d45c81 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-003.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<title>visibility</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://w3c.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 id="dynamic"> + <math><msqrt><mn>1</mn></msqrt></math> + <math><mroot><mn>2</mn><mn>3</mn></mroot></math> + </div> + </div> + <script src="/mathml/support/feature-detection.js"></script> + <script> + window.addEventListener("load", () => { + document.getElementById("dynamic").style.visibility = "hidden"; + document.documentElement.classList.remove("reftest-wait"); + }); + </script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_msqrt");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/visibility-004.tentative-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/visibility-004.tentative-ref.html new file mode 100644 index 0000000000..fcaf5fe85b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-004.tentative-ref.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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/visibility-004.tentative.html b/testing/web-platform/tests/mathml/relations/css-styling/visibility-004.tentative.html new file mode 100644 index 0000000000..28678eaf0c --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-004.tentative.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<title>visibility</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext"> +<link rel="help" href="https://github.com/mathml-refresh/mathml-core/pull/24"> +<link rel="match" href="visibility-004.tentative-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><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 id="dynamic"> + <math><menclose notation="left"><mn>1</mn></menclose></math> + <math><menclose notation="right"><mn>2</mn></menclose></math> + <math><menclose notation="top"><mn>3</mn></menclose></math> + <math><menclose notation="bottom"><mn>4</mn></menclose></math> + <math><menclose notation="box"><mn>5</mn></menclose></math> + <math><menclose notation="roundedbox"><mn>6</mn></menclose></math> + <math><menclose notation="actuarial"><mn>7</mn></menclose></math> + <math><menclose notation="madruwb"><mn>8</mn></menclose></math> + <math><menclose notation="horizontalstrike"><mn>9</mn></menclose></math> + <math><menclose notation="verticalstrike"><mn>10</mn></menclose></math> + <math><menclose notation="updiagonalstrike"><mn>11</mn></menclose></math> + <math><menclose notation="downdiagonalstrike"><mn>12</mn></menclose></math> + <math><menclose notation="longdiv"><mn>13</mn></menclose></math> + <math><menclose notation="circle"><mn>14</mn></menclose></math> + </div> + </div> + <script> + window.addEventListener("load", () => { + document.getElementById("dynamic").style.visibility = "hidden"; + document.documentElement.classList.remove("reftest-wait"); + }); + </script> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_menclose");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/visibility-005-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/visibility-005-ref.html new file mode 100644 index 0000000000..fcaf5fe85b --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-005-ref.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> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/visibility-005.html b/testing/web-platform/tests/mathml/relations/css-styling/visibility-005.html new file mode 100644 index 0000000000..a3af376fea --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-005.html @@ -0,0 +1,88 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<title>visibility</title> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> +<link rel="help" href="https://w3c.github.io/mathml-core/#operator-fence-separator-or-accent-mo"> +<link rel="match" href="visibility-005-ref.html"/> +<meta name="assert" content="Verify that visibility=hidden is used for normal, stretchy and large operators."> +<style> + math { + font: 20px/1 Ahem; + } + @font-face { + font-family: operators; + src: url("/fonts/math/operators.woff"); + } + mo { + font-family: operators; + } +</style> +</head> +<body> + <p>Test passes if you see a green square.</p> + <div style="background: green; color: red; width: 200px; height: 200px;"> + <math> + <!-- unstretched operators --> + <mo style="visibility: hidden">⥯</mo> + <mo style="visibility: hidden">+</mo> + <mo style="visibility: hidden">-</mo> + </math> + <math displaystyle="true"> + <!-- large operator --> + <mo largeop="true" style="visibility: hidden">⥯</mo> + </math> + <math> + <mrow> + <!-- stretchy, small size --> + <mspace height="2em"/> + <mo style="visibility: hidden">⥯</mo> + </mrow> + </math> + <math> + <mrow> + <!-- stretchy, large size --> + <mspace height="4em"/> + <mo style="visibility: hidden">⥯</mo> + </mrow> + </math> + <div id="dynamic"> + <math> + <!-- unstretched operators --> + <mo stretchy="false">⥯</mo> + <mo>+</mo> + <mo>-</mo> + </math> + <math displaystyle="true"> + <!-- large operator --> + <mo largeop="true">⥯</mo> + </math> + <math> + <mrow> + <!-- stretchy, small size --> + <mspace height="2em"/> + <mo>⥯</mo> + </mrow> + </math> + <math> + <mrow> + <!-- stretchy, large size --> + <mspace height="4em"/> + <mo>⥯</mo> + </mrow> + </math> + </div> + </div> + <script src="/mathml/support/fonts.js"></script> + <script> + window.addEventListener("load", () => loadAllFonts().then(() => { + document.getElementById("dynamic").style.visibility = "hidden"; + document.documentElement.classList.remove("reftest-wait"); + })); + </script> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_menclose");</script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/width-height-001.html b/testing/web-platform/tests/mathml/relations/css-styling/width-height-001.html new file mode 100644 index 0000000000..e762b0060e --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/width-height-001.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>width, height, inline-size and block-size</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<meta name="assert" content="Verify that width, height, inline-size and block-size properties are ignored."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script src="/mathml/support/box-comparison.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + + for (tag in MathMLFragments) { + if (!FragmentHelper.isValidChildOfMrow(tag) || tag === "mtable") + continue; + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var style = "width: 500px; height: 400px;"; + var s = compareSizeWithAndWithoutStyle(tag, style); + assert_approx_equals(s.width_delta, 0, epsilon, "width"); + assert_approx_equals(s.height_delta, 0, epsilon, "height"); + assert_approx_equals(s.element_width_delta, 0, epsilon, "element width"); + assert_approx_equals(s.element_height_delta, 0, epsilon, "element height"); + }, `width and height properties on ${tag}`); + + test(function() { + assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); + var style = "inline-size: 500px; block-size: 400px;"; + var s = compareSizeWithAndWithoutStyle(tag, style); + assert_approx_equals(s.width_delta, 0, epsilon, "width"); + assert_approx_equals(s.height_delta, 0, epsilon, "height"); + assert_approx_equals(s.element_width_delta, 0, epsilon, "element width"); + assert_approx_equals(s.element_height_delta, 0, epsilon, "element height"); + }, `inline-size and block-size properties on ${tag}`); + } + + done(); + } +</script> +</head> +<body> + <div id="log"></div> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/force-horizontal-tb.html b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/force-horizontal-tb.html new file mode 100644 index 0000000000..e239cdca5a --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/force-horizontal-tb.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Forced writing-mode on MathML elements</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#user-agent-stylesheet"> +<meta name="assert" content="Test that writing-mode is forced to horizontal-tb on MathML elements."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<style> + /* selector defined in mathml-fragments.js */ + .element { + writing-mode: vertical-lr; + padding-block-start: 10px; + padding-block-end: 15px; + padding-inline-start: 20px; + padding-inline-end: 25px; + } +</style> +</head> +<body> + <div id="log"></div> + <div id="container"> + <math class="element"></math> + </div> + <script> + var container = document.getElementById("container"); + for (tag in MathMLFragments) { + container.insertAdjacentHTML("beforeend", `<math>${MathMLFragments[tag]}</math>`); + } + let unknownElement = FragmentHelper.createElement("unknown"); + unknownElement.setAttribute("class", "element"); + container.appendChild(unknownElement); + Array.from(document.getElementsByClassName("element")).forEach(element => { + var tag = element.tagName; + var style = window.getComputedStyle(element); + test(function () { + assert_equals(style["writing-mode"], "horizontal-tb"); + }, `writing-mode is forced to horizontal-tb on <${tag}> element`); + test(function () { + assert_equals(style["padding-block-start"], style["padding-top"]); + assert_equals(style["padding-block-end"], style["padding-bottom"]); + assert_equals(style["padding-inline-start"], style["padding-left"]); + assert_equals(style["padding-inline-end"], style["padding-right"]); + }, `logical properties interpreted in horizontal-tb on <${tag}> element`); + }); + </script> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/reset-and-logicial-property-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/reset-and-logicial-property-ref.html new file mode 100644 index 0000000000..6eae88efb1 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/reset-and-logicial-property-ref.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>Reset writing-mode and logical property (reference)</title> + </head> + <body> + <p>Test passes if you see a green square.</p> + <math style="writing-mode: horizontal-tb; + padding-top: 200px; + background: green"> + <mspace width="200px"/> + </math> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/reset-and-logicial-property.html b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/reset-and-logicial-property.html new file mode 100644 index 0000000000..939cfc5ba6 --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/reset-and-logicial-property.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>Reset writing-mode and logical property</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling"> + <meta name="assert" content="Verify how forced writing-mode is taken into account for logicial properties."> + <link rel="match" href="reset-and-logicial-property-ref.html"> + </head> + <body> + <p>Test passes if you see a green square.</p> + <math style="writing-mode: vertical-lr; + padding-block-start: 200px; + background: green"> + <mspace width="200px"/> + </math> + <script src="/mathml/support/feature-detection.js"></script> + <script>MathMLFeatureDetection.ensure_for_match_reftest("has_mspace");</script> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.html b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.html new file mode 100644 index 0000000000..b751caf90d --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-001.html @@ -0,0 +1,69 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>writing mode</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<meta name="assert" content="Verify CSS writing mode (writing-mode and directionproperties) for mrow."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/layout-comparison.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + var reference = document.getElementById("horizontal-tb_ltr"); + + ["horizontal-tb_rtl"].forEach(id => { + var element = document.getElementById(id); + + test(function() { + var style = window.getComputedStyle(element); + var writingMode = id.split("_"); + assert_equals(style.getPropertyValue("writing-mode"), + writingMode[0], "writing-mode"); + assert_equals(style.getPropertyValue("direction"), + writingMode[1], "direction"); + }, `Inheritance of CSS writing-mode and direction (id='${id}')`); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + compareLayout(element, reference, epsilon); + }, `Layout of mrow (id='${id}')`); + }); + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <p> + <math> + <mrow id="horizontal-tb_ltr"> + <mspace style="background: blue" + width="20px" height="30px" depth="40px"></mspace> + <mspace style="background: black" + width="50px" depth="60px"></mspace> + <mspace style="background: yellow" + width="70px" height="80px"></mspace> + </mrow> + </math> + </p> + <p> + <math style="direction: rtl;"> + <mrow id="horizontal-tb_rtl"> + <mspace style="background: blue" + width="20px" height="30px" depth="40px"></mspace> + <mspace style="background: black" + width="50px" depth="60px"></mspace> + <mspace style="background: yellow" + width="70px" height="80px"></mspace> + </mrow> + </math> + </p> +</body> +</html> diff --git a/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.html b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.html new file mode 100644 index 0000000000..c0b64a917a --- /dev/null +++ b/testing/web-platform/tests/mathml/relations/css-styling/writing-mode/writing-mode-002.html @@ -0,0 +1,82 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>writing mode</title> +<link rel="help" href="https://w3c.github.io/mathml-core/#layout-algorithms"> +<meta name="assert" content="Verify CSS writing mode (writing-mode and direction properties) for mrow."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/mathml/support/feature-detection.js"></script> +<script src="/mathml/support/layout-comparison.js"></script> +<script src="/mathml/support/mathml-fragments.js"></script> +<script> + var epsilon = 1; + + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + + function runTests() { + for (tag in MathMLFragments) { + if (tag == "annotation" || tag == "annotation-xml") + continue; // These tags have display: none. + + ["horizontal-tb_rtl"].forEach(id => { + var writingMode = id.split("_"); + var writingModeString = `writing-mode: ${writingMode[0]}; direction: ${writingMode[1]};`; + + document.body.insertAdjacentHTML("beforeend", `<div>\ +<math>${MathMLFragments[tag]}</math>\ +<math>${MathMLFragments[tag]}</math>\ +</div>`); + var div = document.body.lastElementChild; + + var styleMath = div.firstElementChild; + styleMath.setAttribute("style", writingModeString); + var styleElement = FragmentHelper.element(styleMath); + + var referenceMath = div.lastElementChild; + var referenceElement = FragmentHelper.element(referenceMath); + + [styleMath, referenceMath].forEach(math => { + Array.from(math.getElementsByClassName("mathml-container")).forEach(container => { + container.insertAdjacentHTML("beforeend", "\ +<mspace style='background: blue'\ + width='20px' height='30px' depth='40px'></mspace>\ +<mspace style='background: black'\ + width='50px' depth='60px'></mspace>\ +<mspace style='background: yellow'\ + width='70px' height='80px'></mspace>"); + }); + Array.from(math.getElementsByClassName("foreign-container")).forEach(container => { + container.insertAdjacentHTML("beforeend", "\ +<span style='display: inline-block; background: lightblue;\ + inline-size: 20px; block-size: 30px;\ + vertical-align: bottom;'></span>\ +<span style='display: inline-block; background: pink;\ + inline-size: 40px; block-size: 50px;\ + vertical-align: bottom;'></span>"); + }); + }); + + test(function() { + assert_true(MathMLFeatureDetection.has_mspace()); + var style = window.getComputedStyle(styleElement); + assert_equals(style.getPropertyValue("writing-mode"), + writingMode[0], "writing-mode"); + assert_equals(style.getPropertyValue("direction"), + writingMode[1], "direction"); + compareLayout(styleElement, referenceElement, epsilon); + }, `Layout of ${tag} (${writingModeString})`); + + div.style = "display: none;"; // Hide the div after testing. + }); + } + done(); + } +</script> +</head> +<body> + <div id="log"></div> +</body> +</html> |