summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/mathml/relations
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/mathml/relations')
-rw-r--r--testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001-ref.html16
-rw-r--r--testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001.html23
-rw-r--r--testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002-ref.html30
-rw-r--r--testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002.html33
-rw-r--r--testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003-ref.html31
-rw-r--r--testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003.html38
-rw-r--r--testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004-ref.html19
-rw-r--r--testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004.html22
8 files changed, 212 insertions, 0 deletions
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001-ref.html
new file mode 100644
index 0000000000..5d4e6b7dca
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>MathML and ::first-line/::first-letter pseudo-elements (reference)</title>
+<p>PASS if there is no red.</p>
+<ol>
+ <li>
+ <math>
+ <mtext class="firstline"><span>Hello,<br/>World!</span></mtext>
+ </math>
+ </li>
+ <li>
+ <math>
+ <mtext class="firstletter">Hello, World!</mtext>
+ </math>
+ </li>
+</ol>
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001.html
new file mode 100644
index 0000000000..42d0f04ed8
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-001.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>MathML and ::first-line/::first-letter pseudo-elements</title>
+<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes">
+<link rel="match" href="first-line-first-letter-pseudo-elements-001-ref.html"/>
+<meta name="assert" content="::first-line and ::first-letter do not apply to MathML elements.">
+<style>
+ .firstline::first-line { background: red; }
+ .firstletter::first-letter { background: red; }
+</style>
+<p>PASS if there is no red.</p>
+<ol>
+ <li>
+ <math>
+ <mtext class="firstline"><span>Hello,<br/>World!</span></mtext>
+ </math>
+ </li>
+ <li>
+ <math>
+ <mtext class="firstletter">Hello, World!</mtext>
+ </math>
+ </li>
+</ol>
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002-ref.html
new file mode 100644
index 0000000000..d4c79c7218
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002-ref.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>MathML and ::first-line/::first-letter pseudo-elements (reference)</title>
+<style>
+ .firstline > span { background: lime; }
+ .firstletter > span { background: lime; }
+</style>
+<p>PASS if the first line or letter is green.</p>
+<ol>
+ <li>
+ <div style="display: inline math" class="firstline">
+ <span>Hello,</span><br/>World!
+ </div>
+ </li>
+ <li>
+ <div style="display: inline math" class="firstletter">
+ <span>H</span>ello, World!
+ </div>
+ </li>
+ <li>
+ <div style="display: block math" class="firstline">
+ <span>Hello,</span><br/>World!
+ </div>
+ </li>
+ <li>
+ <div style="display: block math" class="firstletter">
+ <span>H</span>ello, World!
+ </div>
+ </li>
+</ol>
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002.html
new file mode 100644
index 0000000000..7e206c951e
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-002.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>MathML and ::first-line/::first-letter pseudo-elements</title>
+<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes">
+<link rel="match" href="first-line-first-letter-pseudo-elements-002-ref.html"/>
+<meta name="assert" content="::first-line and ::first-letter do apply to non-MathML specified display math elements, because their computed values are block/inline flow.">
+<style>
+ .firstline::first-line { background: lime; }
+ .firstletter::first-letter { background: lime; }
+</style>
+<p>PASS if the first line or letter is green.</p>
+<ol>
+ <li>
+ <div style="display: inline math" class="firstline">
+ Hello,<br/>World!
+ </div>
+ </li>
+ <li>
+ <div style="display: inline math" class="firstletter">
+ Hello, World!
+ </div>
+ </li>
+ <li>
+ <div style="display: block math" class="firstline">
+ Hello,<br/>World!
+ </div>
+ </li>
+ <li>
+ <div style="display: block math" class="firstletter">
+ Hello, World!
+ </div>
+ </li>
+</ol>
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003-ref.html
new file mode 100644
index 0000000000..825b397057
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>MathML and ::first-line/::first-letter pseudo-elements (reference)</title>
+<p>PASS if there is no red.</p>
+<ol>
+ <li>
+ <div class="firstline">
+ <math style="display: inline math"><mtext>Hello<br>World!</mtext></math>
+ </li>
+ <li>
+ <div class="firstletter">
+ <math>
+ <mtext style="display: inline math">Hello<br>World!</mtext>
+ </math>
+ </div>
+ </li>
+ <li>
+ <div class="firstline">
+ <math>
+ <mtext style="display: block math">Hello<br>World!</mtext>
+ </math>
+ </div>
+ </li>
+ <li>
+ <div class="firstletter">
+ <math>
+ <mtext style="display: block math">Hello<br>World!</mtext>
+ </math>
+ </div>
+ </li>
+</ol>
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003.html
new file mode 100644
index 0000000000..042a9555e6
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-003.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>MathML and ::first-line/::first-letter pseudo-elements</title>
+<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes">
+<link rel="match" href="first-line-first-letter-pseudo-elements-003-ref.html"/>
+<meta name="assert" content="display math elements do not contribute a first formatted line/letter to ancestors.">
+<style>
+ .firstline::first-line { background: red; }
+ .firstletter::first-letter { background: red; }
+</style>
+<p>PASS if there is no red.</p>
+<ol>
+ <li>
+ <div class="firstline">
+ <math style="display: inline math"><mtext>Hello<br>World!</mtext></math>
+ </li>
+ <li>
+ <div class="firstletter">
+ <math>
+ <mtext style="display: inline math">Hello<br>World!</mtext>
+ </math>
+ </div>
+ </li>
+ <li>
+ <div class="firstline">
+ <math>
+ <mtext style="display: block math">Hello<br>World!</mtext>
+ </math>
+ </div>
+ </li>
+ <li>
+ <div class="firstletter">
+ <math>
+ <mtext style="display: block math">Hello<br>World!</mtext>
+ </math>
+ </div>
+ </li>
+</ol>
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004-ref.html
new file mode 100644
index 0000000000..60d3427489
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>MathML and ::first-line/::first-letter pseudo-elements (reference)</title>
+<style>
+ .firstline > span { background: lime; }
+ .firstletter > span { background: lime; }
+</style>
+<ol>
+ <li>PASS if first line is green:
+ <math>
+ <mtext><span class="firstline"><span>Hello,</span><br/>World!</span></mtext>
+ </math>
+ </li>
+ <li>PASS if first letter is green:
+ <math>
+ <mtext><span class="firstletter"><span>H</span>ello, World!</span></mtext>
+ </math>
+ </li>
+</ol>
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004.html b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004.html
new file mode 100644
index 0000000000..b463266bdb
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/first-line-first-letter-pseudo-elements-004.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>MathML and ::first-line/::first-letter pseudo-elements</title>
+<link rel="help" href="https://w3c.github.io/mathml-core/#legacy-mathml-style-attributes">
+<link rel="match" href="first-line-first-letter-pseudo-elements-004-ref.html"/>
+<meta name="assert" content="::first-letter/::first-line works for HTML elements inside MathML.">
+<style>
+ .firstline::first-line { background: lightgreen; }
+ .firstletter::first-letter { background: lightgreen; }
+</style>
+<ol>
+ <li>PASS if first line is green:
+ <math>
+ <mtext><span class="firstline">Hello,<br/>World!</span></mtext>
+ </math>
+ </li>
+ <li>PASS if first letter is green:
+ <math>
+ <mtext><span class="firstletter">Hello, World!</span></mtext>
+ </math>
+ </li>
+</ol>