diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /testing/web-platform/tests/mathml/presentation-markup/mrow | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-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/tests/mathml/presentation-markup/mrow')
11 files changed, 337 insertions, 17 deletions
diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html index 2463c40476..0b14ac5334 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html @@ -35,11 +35,12 @@ </head> <body> <div id="log"></div> - <!-- Note: mpadded attributes are not tested since MathML3 did not allow to - set them from mstyle. Also, it is not clear whether munderover's - accent/accentunder could be applied from mstyle, given that the former - clashes with mo@accent. Other legacy mstyle attributes not in MathML - Core or without visual effect are not tested. + <!-- Note: In earlier versions of MathML, putting some attributes on the + mstyle element was supposed to produce the same rendering as putting them + on the all descendants (with some exceptions). In MathML Core, relevant + style attributes are implemented as CSS properties and are no longer + specific to the mstyle element. The tests below verify that attributes + on mstyle that are not mapped to CSS have no effect. --> <p class="TestContainer" id="mspace"> <math> @@ -84,12 +85,12 @@ <mn>3</mn> </munder> </mstyle> - <mstyle accent="false"> - <mover> - <mn>4</mn> - <mo>⇀</mo> - </mover> - </mstyle> + <!-- Note: accent was a shared attribute name for mover and mo, so + make mstyle an ancestor of mo but not of mover. --> + <mover> + <mn>4</mn> + <mstyle accent="false"><mo>⇀</mo></mstyle> + </mover> <mstyle stretchy="false" symmetric="false" maxsize="20px"> <mrow> <mo>|</mo> @@ -102,6 +103,15 @@ <mn>4</mn> </mrow> </mstyle> + <mstyle form="prefix"> + <mrow> + <mn>1</mn> + <!-- Infix and prefix forms of − do not have the same lspace/rspace + values in the operator dictionary --> + <mo>−</mo> + <mn>2</mn> + </mrow> + </mstyle> </math> <math displaystyle="true"> <mstyle> @@ -115,12 +125,10 @@ <mn>3</mn> </munder> </mstyle> - <mstyle> - <mover> - <mn>4</mn> - <mo>⇀</mo> - </mover> - </mstyle> + <mover> + <mn>4</mn> + <mstyle><mo>⇀</mo></mstyle> + </mover> <mstyle> <mrow> <mo>|</mo> @@ -133,6 +141,13 @@ <mn>4</mn> </mrow> </mstyle> + <mstyle> + <mrow> + <mn>1</mn> + <mo>−</mo> + <mn>2</mn> + </mrow> + </mstyle> </math> </p> <!-- notation attribute is from MathML3's menclose element --> @@ -160,5 +175,92 @@ </mstyle> </math> </p> + <p class="TestContainer" id="mpadded"> + <math> + <mstyle width="100px" height="50px" depth="50px" + lspace="10px" voffset="15px"> + <mpadded style="background: lightblue"> + <mspace width="10px" height="10px" style="background: black"></mspace> + </mpadded> + </mstyle> + </math> + <math> + <mstyle> + <mpadded style="background: lightblue"> + <mspace width="10px" height="10px" style="background: black"></mspace> + </mpadded> + </mstyle> + </math> + </p> + <p class="TestContainer" id="mover"> + <math> + <mstyle accent="true"> + <mover> + <mn>1</mn> + <mn>2</mn> + </mover> + </mstyle> + </math> + <math> + <mstyle> + <mover> + <mn>1</mn> + <mn>2</mn> + </mover> + </mstyle> + </math> + </p> + <p class="TestContainer" id="munder"> + <math> + <mstyle accentunder="true"> + <munder> + <mn>1</mn> + <mn>2</mn> + </munder> + </mstyle> + </math> + <math> + <mstyle> + <munder> + <mn>1</mn> + <mn>2</mn> + </munder> + </mstyle> + </math> + </p> + <p class="TestContainer" id="munderover"> + <math> + <mstyle accent="true"> + <munderover> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + </munderover> + </mstyle> + <mstyle accentunder="true"> + <munderover> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + </munderover> + </mstyle> + </math> + <math> + <mstyle> + <munderover> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + </munderover> + </mstyle> + <mstyle> + <munderover> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + </munderover> + </mstyle> + </math> + </p> </body> </html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001-ref.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001-ref.html new file mode 100644 index 0000000000..7d99e48c92 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001-ref.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<title><semantics> - mozilla bug 468059 (reference)</title> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> + math, p { + font: 25px Ahem; + } +</style> +<p> + <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> + <semantics> + <mstyle displaystyle="true"> + <munderover> + <mo movablelimits="true">pXp</mo> + <mtext>XpXpXp</mtext> + <mtext>XpXpXp</mtext> + </munderover> + </mstyle> + </semantics> + </math> +</p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001.html new file mode 100644 index 0000000000..63aa9a4da8 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<title><semantics> - mozilla bug 468059</title> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=468059"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="match" href="semantics-001-ref.html"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<meta name="assert" content="MathML inside a semantics element inherits displaystyle."> +<style> + math, p { + font: 25px Ahem; + } +</style> +<p> + <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> + <semantics> + <munderover> + <mo movablelimits="true">pXp</mo> + <mtext>XpXpXp</mtext> + <mtext>XpXpXp</mtext> + </munderover> + </semantics> + </math> +</p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002-ref.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002-ref.html new file mode 100644 index 0000000000..8abdad93de --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002-ref.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<title>semantics element and legacy rendering rules (reference)</title> +<meta charset="utf-8"/> +<p>Empty semantics: <math><mrow></mrow></math></p> +<p>annotation: <math><mrow><annotation>annotation</annotation></mrow></math></p> +<p>annotation-xml: <math><mrow><annotation-xml encoding="MathML-Presentation"><mtext>annotation-xml</mtext></annotation-xml></mrow></math></p> +<p>presentation MathML (no annotations): <math><mrow><mtext>presentation MathML</mtext></mrow></math></p> +<p>content MathML (no annotations): <math><mrow><csymbol>content MathML</csymbol></mrow></math></p> +<p>presentation MathML ; annotation: <math><mrow><mtext>presentation MathML</mtext></mrow></math></p> +<p>presentation MathML ; annotation-xml: <math><mrow><mtext>presentation MathML</mtext></mrow></math></p> +<p>content MathML ; annotation: <math><mrow><csymbol>content MathML</csymbol></mrow></math></p> +<p>content MathML ; annotation-xml: <math><mrow><csymbol>content MathML</csymbol></mrow></math></p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002.html new file mode 100644 index 0000000000..62028fb863 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<title>semantics element and legacy rendering rules</title> +<meta charset="utf-8"/> +<link rel="help" href="https://developer.mozilla.org/en-US/docs/Web/MathML/Element/semantics"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="match" href="semantics-002-ref.html"> +<meta name="assert" content="semantics element rendered as an mrow with only the first child displayed and does not rely on legacy rules to choose another child to display instead."> +<p>Empty semantics: <math><semantics></semantics></math></p> +<p>annotation: <math><semantics><annotation>annotation</annotation></semantics></math></p> +<p>annotation-xml: <math><semantics><annotation-xml encoding="MathML-Presentation"><mtext>annotation-xml</mtext></annotation-xml></semantics></math></p> +<p>presentation MathML (no annotations): <math><semantics><mtext>presentation MathML</mtext></semantics></math></p> +<p>content MathML (no annotations): <math><semantics><csymbol>content MathML</csymbol></semantics></math></p> +<p>presentation MathML ; annotation: <math><semantics><mtext>presentation MathML</mtext><annotation>annotation</annotation></semantics></math></p> +<p>presentation MathML ; annotation-xml: <math><semantics><mtext>presentation MathML</mtext><annotation-xml encoding="application/mathml-presentation+xml"><mtext>annotation-xml</mtext></annotation-xml></semantics></math></p> +<p>content MathML ; annotation: <math><semantics><csymbol>content MathML</csymbol><annotation>annotation</annotation></semantics></math></p> +<p>content MathML ; annotation-xml: <math><semantics><csymbol>content MathML</csymbol><annotation-xml encoding="application/mathml-presentation+xml"><mtext>annotation-xml</mtext></annotation-xml></semantics></math></p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003-ref.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003-ref.html new file mode 100644 index 0000000000..7b6e21a3eb --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<title>semantics element and legacy rendering rules (reference)</title> +<meta charset="utf-8"/> +<p>annotation 1: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation 2: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation 3: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 1: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 2: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 3: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 4: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 5: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 6: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 7: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003.html new file mode 100644 index 0000000000..83572f4c8c --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title>semantics element and legacy rendering rules</title> +<meta charset="utf-8"/> +<link rel="help" href="https://developer.mozilla.org/en-US/docs/Web/MathML/Element/semantics"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="match" href="semantics-003-ref.html"> +<meta name="assert" content="semantics element rendered as an mrow with only the first child displayed and does not rely on legacy rules to choose another child to display instead."> +<p>annotation 1: <math><semantics><csymbol>Content MathML</csymbol><annotation>annotation</annotation><annotation>error</annotation><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml></semantics></math></p> +<p>annotation 2: <math><semantics><csymbol>Content MathML</csymbol><annotation encoding="application/x-tex">\sin x + 5</annotation><annotation>error</annotation><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml></semantics></math></p> +<p>annotation 3: <math><semantics><csymbol>Content MathML</csymbol><annotation src="external-resource">error</annotation><annotation>annotation</annotation><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml></semantics></math></p> +<p>annotation-xml 1: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="application/mathml-presentation+xml"><mtext>application/mathml-presentation+xml</mtext></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> +<p>annotation-xml 2: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="MathML-Presentation"><mtext>MathML-Presentation</mtext></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> +<p>annotation-xml 3: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="image/svg+xml"><svg xmlns="http://www.w3.org/2000/svg" height="2em"><text y="1em">image/svg+xml</text></svg></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> +<p>annotation-xml 4: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="SVG1.1"><svg xmlns="http://www.w3.org/2000/svg" height="2em"><text y="1em">SVG1.1</text></svg></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> +<p>annotation-xml 5: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="application/xhtml+xml"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>application/xhtml+xml</title></head><body><p>application/xhtml+xml</p></body></html></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></math></p> +<p>annotation-xml 6: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="text/html"><html><head><title>text/html</title></head><body><p>text/html</p></body></html></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> +<p>annotation-xml 7: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="unknown"><mtext>error</mtext></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>annotation-xml</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004-ref.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004-ref.html new file mode 100644 index 0000000000..855d887bbc --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004-ref.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<title><semantics> - mozilla bug 512418 (reference)</title> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> + math, p { + font: 25px Ahem; + } +</style> +<p> + XpXpXp<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mrow> + <mrow> + <mo>lcm</mo> + <mo>(</mo> + <mn>a</mn> + <mo>,</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + <mo>=</mo> + <mfrac> + <mrow> + <mo>(</mo> + <mn>a</mn> + <mo>⁢</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + <mrow> + <mo>gcd</mo> + <mo>(</mo> + <mn>a</mn> + <mo>,</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + </mfrac> + </mrow> + </math>XpXpXp +</p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004.html new file mode 100644 index 0000000000..17f0f1ecd0 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<title><semantics> - mozilla bug 512418</title> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=512418"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="match" href="semantics-004-ref.html"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<meta name="assert" content="The semantics element shouldn't add space around it."> +<style> + math, p { + font: 25px Ahem; + } +</style> +<p> + XpXpXp<math xmlns="http://www.w3.org/1998/Math/MathML"> + <semantics> + <mrow> + <mrow> + <mo>lcm</mo> + <mo>(</mo> + <mn>a</mn> + <mo>,</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + <mo>=</mo> + <mfrac> + <mrow> + <mo>(</mo> + <mn>a</mn> + <mo>⁢</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + <mrow> + <mo>gcd</mo> + <mo>(</mo> + <mn>a</mn> + <mo>,</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + </mfrac> + </mrow> + </semantics> + </math>XpXpXp +</p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005-ref.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005-ref.html new file mode 100644 index 0000000000..cf722603e1 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005-ref.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<title><semantics> - mozilla bug 21479 (reference)</title> +<meta charset="utf-8"/> +<p> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <mover> + <mspace width="300px" height="10px" mathbackground="black"></mspace> + <mo>¯</mo> + </mover> + </math> +</p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005.html new file mode 100644 index 0000000000..e4fe611c47 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<title><semantics> - mozilla bug 21479</title> +<meta charset="utf-8"/> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=21479"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="match" href="semantics-005-ref.html"> +<meta name="assert" content="The embellished operator made of a single mo inside a semantics element is treated the same as the mo alone."> +<p> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <mover> + <mspace width="300px" height="10px" mathbackground="black"></mspace> + <semantics><mo>¯</mo></semantics> + </mover> + </math> +</p> |