diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/mathml/ssty-4.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/mathml/ssty-4.html')
-rw-r--r-- | layout/reftests/mathml/ssty-4.html | 186 |
1 files changed, 186 insertions, 0 deletions
diff --git a/layout/reftests/mathml/ssty-4.html b/layout/reftests/mathml/ssty-4.html new file mode 100644 index 0000000000..b04c86b20f --- /dev/null +++ b/layout/reftests/mathml/ssty-4.html @@ -0,0 +1,186 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <head> + <title>Dynamic ssty tests</title> + <!-- See ssty-1-ref.html for an explanation of this font --> + <style type="text/css" media="screen, print"> + @font-face { + font-family: "sstyfont"; + src: url("ssty.woff"); + } + </style> + </head> + <body> + + <math> + <mstyle style="font-family: 'sstyfont';"> + <mfrac id="mfrac0"> + <mo>A</mo> + </mfrac> + </mstyle> + </math> + + <p> + + <math> + <mstyle style="font-family: 'sstyfont';"> + <mfrac> + <mo>A</mo> + <mo id="mo0"></mo> + </mfrac> + </mstyle> + </math> + + <p> + + <math> + <mstyle style="font-family: 'sstyfont';"> + <mfrac> + <mo>A</mo> + <mo id="mo1">A</mo> + </mfrac> + </mstyle> + </math> + + <p> + + <math> + <mstyle style="font-family: 'sstyfont';" id="mstyle0"> + </mstyle> + </math> + + <p> + + <math> + <mstyle id="mstyle1"> + <mfrac> + <mfrac> + <mo>A</mo> + <mo>A</mo> + </mfrac> + <mfrac> + <mo>A</mo> + <mo>A</mo> + </mfrac> + </mfrac> + </mstyle> + </math> + + <p> + + <math> + <mstyle id="mstyle2" style="font-family: 'sstyfont';"> + <mfrac> + <mfrac> + <mo>A</mo> + <mo>A</mo> + </mfrac> + <mfrac> + <mo>A</mo> + <mo>A</mo> + </mfrac> + </mfrac> + </mstyle> + </math> + + <p> + + <math> + <mstyle id="mstyle3" style="font-family: 'sstyfont';"> + <mfrac> + <mfrac> + <mo>A</mo> + <mo>A</mo> + </mfrac> + <mfrac> + <mo>A</mo> + <mo>A</mo> + </mfrac> + </mfrac> + </mstyle> + </math> + + <p> + + <math> + <mstyle style="font-family: 'sstyfont';"> + <mfrac> + <mo>A</mo> + <mrow> + <mrow> + <mrow id="mrow0"> + </mrow> + </mrow> + </mrow> + </mfrac> + </mstyle> + </math> + + <p> + + <math> + <mstyle id="mstyle4" style ="font-family: 'sstyfont'; font-feature-settings: 'ssty' 0"> + <mfrac> + <mfrac> + <mo>A</mo> + <mo>A</mo> + </mfrac> + <mfrac> + <mo>A</mo> + <mo>A</mo> + </mfrac> + </mfrac> + </mstyle> + </math> + + <p> + + <math> + <mstyle id="mstyle5" style ="font-family: 'sstyfont';"> + <mfrac> + <mfrac> + <mo>A</mo> + <mo>A</mo> + </mfrac> + <mfrac> + <mo>A</mo> + <mo>A</mo> + </mfrac> + </mfrac> + </mstyle> + </math> + + <script> + function doTest() + { + var mo = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo"); + mo.innerHTML = "A"; + // An added child gets ssty font feature + document.getElementById("mfrac0").appendChild(mo); + // A child with changed text gets ssty font feature + document.getElementById("mo0").innerHTML = "A"; + // A relocated child loses ssty font feature setting + document.getElementById("mstyle0").appendChild(document.getElementById("mo1")); + // A change in style + document.getElementById("mstyle1").setAttribute("style", "font-family: 'sstyfont';"); + // Changes in script size multiplier affect ssty setting + document.getElementById("mstyle2").setAttribute("scriptsizemultiplier", "1.2"); + document.getElementById("mstyle3").setAttribute("scriptsizemultiplier", "0.8"); + + // ssty gets added to descendants as well + var mo1 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo"); + mo1.innerHTML = "A"; + document.getElementById("mrow0").appendChild(mo1); + // removing explicit ssty setting works + document.getElementById("mstyle4").setAttribute( + "style", "font-family: 'sstyfont';") + // setting an explicit ssty font feature + document.getElementById("mstyle5").setAttribute( + "style" , "font-family: 'sstyfont'; font-feature-settings: 'ssty' 0") + + document.documentElement.removeAttribute("class"); + } + window.addEventListener("MozReftestInvalidate", doTest); + </script> + </body> +</html> |