summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/mozilla/tests/mathml/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /testing/web-platform/mozilla/tests/mathml/scripts
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/mozilla/tests/mathml/scripts')
-rw-r--r--testing/web-platform/mozilla/tests/mathml/scripts/mmultiscripts-empty-scripts-ref.html75
-rw-r--r--testing/web-platform/mozilla/tests/mathml/scripts/mmultiscripts-empty-scripts.html77
-rw-r--r--testing/web-platform/mozilla/tests/mathml/scripts/munderover-empty-scripts-ref.html38
-rw-r--r--testing/web-platform/mozilla/tests/mathml/scripts/munderover-empty-scripts.html38
-rw-r--r--testing/web-platform/mozilla/tests/mathml/scripts/scriptlevel-movablelimits-accent-ref.html28
-rw-r--r--testing/web-platform/mozilla/tests/mathml/scripts/scriptlevel-movablelimits-accent.html38
-rw-r--r--testing/web-platform/mozilla/tests/mathml/scripts/subscript-italic-correction.html62
7 files changed, 356 insertions, 0 deletions
diff --git a/testing/web-platform/mozilla/tests/mathml/scripts/mmultiscripts-empty-scripts-ref.html b/testing/web-platform/mozilla/tests/mathml/scripts/mmultiscripts-empty-scripts-ref.html
new file mode 100644
index 0000000000..2b47eb4d1b
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/mathml/scripts/mmultiscripts-empty-scripts-ref.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+ <title>Comparison of script elements</title>
+ </head>
+ <body>
+ msubsup:
+ <math>
+ <mmultiscripts style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">ccc</mtext>
+ </mmultiscripts>
+ </math>
+
+ <br><br>
+
+ msubsup:
+ <math>
+ <mmultiscripts style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ <none/>
+ </mmultiscripts>
+ </math>
+
+ <br><br>
+
+ msup / msubsup:
+ <math>
+ <mmultiscripts style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <none/>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ </mmultiscripts>
+ </math>
+
+ <math>
+ <mmultiscripts style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <none/>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ </mmultiscripts>
+ </math>
+
+ <br><br>
+
+
+ mrow / msub:
+ <math>
+ <mrow style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ </mrow>
+ </math>
+
+ <math>
+ <mrow style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ </mrow>
+ </math>
+
+ <br><br>
+
+ msupsub:
+ <math>
+ <mmultiscripts style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <none />
+ <none />
+ </mmultiscripts>
+ </math>
+
+ </body>
+</html>
diff --git a/testing/web-platform/mozilla/tests/mathml/scripts/mmultiscripts-empty-scripts.html b/testing/web-platform/mozilla/tests/mathml/scripts/mmultiscripts-empty-scripts.html
new file mode 100644
index 0000000000..31473c2a72
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/mathml/scripts/mmultiscripts-empty-scripts.html
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Comparison of script elements</title>
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=669932">
+ <link rel="match" href="mmultiscripts-empty-scripts-ref.html">
+ <meta name="assert" content="Verify elements with empty sub/sup scripts render the same as equivalent elements with less scripts.">
+ </head>
+ <body>
+ msubsup:
+ <math>
+ <msubsup style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">ccc</mtext>
+ </msubsup>
+ </math>
+
+ <br><br>
+
+ <!-- Different rules apply to msub, so it won't provide equivalent output -->
+ msubsup:
+ <math>
+ <msubsup style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ <mrow></mrow>
+ </msubsup>
+ </math>
+
+ <br><br>
+
+ msup / msubsup:
+ <math>
+ <msup style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ </msup>
+ </math>
+
+ <math>
+ <msubsup style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mrow></mrow>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ </msubsup>
+ </math>
+
+ <br><br>
+
+ mrow / msub:
+ <math>
+ <mrow style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ </mrow>
+ </math>
+
+ <math>
+ <msub style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mrow></mrow>
+ </msub>
+ </math>
+
+ <br><br>
+
+ msupsub:
+ <math>
+ <msubsup style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mrow></mrow>
+ <mrow></mrow>
+ </msubsup>
+ </math>
+
+ </body>
+</html>
diff --git a/testing/web-platform/mozilla/tests/mathml/scripts/munderover-empty-scripts-ref.html b/testing/web-platform/mozilla/tests/mathml/scripts/munderover-empty-scripts-ref.html
new file mode 100644
index 0000000000..5e0ba0bac1
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/mathml/scripts/munderover-empty-scripts-ref.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test munderover with empty scripts</title>
+ </head>
+ <body>
+
+ <p>munder / munderover with empty overscript:
+ <math>
+ <munderover style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ <mspace></mspace>
+ </munderover>
+ </math>
+ </p>
+
+ <p>mover / munderover with empty underscript:
+ <math>
+ <munderover style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mspace></mspace>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ </munderover>
+ </math>
+ </p>
+
+ <p>mrow / munder with empty scripts:
+ <math>
+ <munderover style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mspace></mspace>
+ <mspace></mspace>
+ </munderover>
+ </math>
+ </p>
+ </body>
+</html>
diff --git a/testing/web-platform/mozilla/tests/mathml/scripts/munderover-empty-scripts.html b/testing/web-platform/mozilla/tests/mathml/scripts/munderover-empty-scripts.html
new file mode 100644
index 0000000000..671c889211
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/mathml/scripts/munderover-empty-scripts.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test munderover with empty scripts</title>
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=669932">
+ <link rel="match" href="munderover-empty-scripts-ref.html">
+ <meta name="assert" content="Verify elements with empty under/over scripts render the same as equivalent elements with less scripts.">
+ </head>
+ <body>
+
+ <p>munder / munderover with empty overscript:
+ <math>
+ <munder style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ </munder>
+ </math>
+ </p>
+
+ <p>mover / munderover with empty underscript:
+ <math>
+ <mover style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ <mtext style="background-color: rgba(0, 255, 0, 0.4);">bbb</mtext>
+ </mover>
+ </math>
+ </p>
+
+ <p>mrow / munder with empty scripts:
+ <math>
+ <mrow style="background: red;">
+ <mtext style="background-color: rgba(0, 0, 255, 0.4);">AAA</mtext>
+ </mrow>
+ </math>
+ </p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/mozilla/tests/mathml/scripts/scriptlevel-movablelimits-accent-ref.html b/testing/web-platform/mozilla/tests/mathml/scripts/scriptlevel-movablelimits-accent-ref.html
new file mode 100644
index 0000000000..20a0f65ec7
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/mathml/scripts/scriptlevel-movablelimits-accent-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Test accent/accentunder (reference)</title>
+ </head>
+ <body>
+ <math displaystyle="false">
+ <munderover>
+ <mo>∑</mo>
+ <mi>a</mi>
+ <mi>b</mi>
+ </munderover>
+ </math>
+ <math displaystyle="false">
+ <munder>
+ <mo>∑</mo>
+ <mi>a</mi>
+ </munder>
+ </math>
+ <math displaystyle="false">
+ <mover>
+ <mo>∑</mo>
+ <mi>a</mi>
+ </mover>
+ </math>
+ </body>
+</html>
diff --git a/testing/web-platform/mozilla/tests/mathml/scripts/scriptlevel-movablelimits-accent.html b/testing/web-platform/mozilla/tests/mathml/scripts/scriptlevel-movablelimits-accent.html
new file mode 100644
index 0000000000..4da97dadbf
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/mathml/scripts/scriptlevel-movablelimits-accent.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Test accent/accentunder</title>
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=669713">
+ <link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.munder">
+ <link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.mover">
+ <link rel="help" href="https://www.w3.org/TR/MathML3/chapter3.html#presm.munderover">
+ <link rel="match" href="scriptlevel-movablelimits-accent-ref.html">
+ <meta name="assert" content="Verify accentunder='true' or accent='true' is ignored when an underover element is laid out as a subsup element.">
+ </head>
+ <body>
+ <!-- Per MathML3, setting accentunder/accent to true prevents scriptlevel
+ from being incremented, however such attributes should be ignored when
+ scripts are drawn as subcript/superscript, which is the case here
+ because U+2211 N-ARY SUMMATION defaults to movablelimits="true". -->
+ <math displaystyle="false">
+ <munderover accentunder="true" accent="true">
+ <mo>∑</mo>
+ <mi>a</mi>
+ <mi>b</mi>
+ </munderover>
+ </math>
+ <math displaystyle="false">
+ <munder accentunder="true">
+ <mo>∑</mo>
+ <mi>a</mi>
+ </munder>
+ </math>
+ <math displaystyle="false">
+ <mover accent="true">
+ <mo>∑</mo>
+ <mi>a</mi>
+ </mover>
+ </math>
+ </body>
+</html>
diff --git a/testing/web-platform/mozilla/tests/mathml/scripts/subscript-italic-correction.html b/testing/web-platform/mozilla/tests/mathml/scripts/subscript-italic-correction.html
new file mode 100644
index 0000000000..2c39d825ff
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/mathml/scripts/subscript-italic-correction.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>italic correction for subscripts</title>
+ <meta charset="utf-8"/>
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=945254">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#dfn-italic-correction">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script type="text/javascript">
+ function verifyItalicCorrections()
+ {
+ var epsilon = 2;
+ for (var i = 0; i < 8; i += 2) {
+ var sub = document.getElementById("s" + i);
+ var sup = document.getElementById("s" + (i+1));
+ var italicCorrection =
+ sup.getBoundingClientRect().left - sub.getBoundingClientRect().left;
+ assert_greater_than(italicCorrection, epsilon);
+ }
+ }
+
+ promise_test(() => {
+ return new Promise(resolve => {
+ window.addEventListener("load", resolve);
+ }).then(verifyItalicCorrections);
+ }, "Italic correction of base is used to place subscripts.");
+ </script>
+ <style>
+ math { font-size: 50px; }
+ </style>
+ </head>
+ <body>
+
+ <div>
+ <math>
+ <msubsup>
+ <mi mathbackground="#5f5">f</mi>
+ <mspace id="s0" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s1" width="50px" height="50px" mathbackground="blue"/>
+ </msubsup>
+ </math>
+ </div>
+
+ <br/>
+
+ <div>
+ <math>
+ <mmultiscripts>
+ <mi mathbackground="#5f5">f</mi>
+ <mspace id="s2" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s3" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s4" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s5" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s6" width="50px" height="50px" mathbackground="blue"/>
+ <mspace id="s7" width="50px" height="50px" mathbackground="blue"/>
+ </mmultiscripts>
+ </math>
+ </div>
+
+ </body>
+</html>