Merge pull request #12269 from mrego/css-contain-stacking-context

[css-contain] Containment and stacking contexts
diff --git a/css/css-contain/contain-layout-016.html b/css/css-contain/contain-layout-016.html
new file mode 100644
index 0000000..e8fdede
--- /dev/null
+++ b/css/css-contain/contain-layout-016.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Layout containment stacking context</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
+<link rel="match" href="../reference/pass_if_pass_below.html">
+<meta name=assert content="Layout containment elements create a stacking context.">
+<style>
+div {
+  contain: layout;
+  background: white;
+}
+span {
+  position: relative;
+  z-index: -1;
+}
+</style>
+
+<p>Test passes if there is the word "PASS" below.</p>
+<div><span>PASS</span></div>
diff --git a/css/css-contain/contain-layout-017.html b/css/css-contain/contain-layout-017.html
new file mode 100644
index 0000000..c8118ad
--- /dev/null
+++ b/css/css-contain/contain-layout-017.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Layout containment stacking context</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
+<link rel="match" href="../reference/nothing.html">
+<meta name=assert content="Elements in which layout containment doesn't apply, do not create a stacking context.">
+<style>
+div {
+  display: ruby-text;
+  contain: layout;
+  background: white;
+}
+span {
+  position: relative;
+  z-index: -1;
+}
+</style>
+
+<p>There should be nothing below.</p>
+<div><span>FAIL</span></div>
diff --git a/css/css-contain/contain-paint-020.html b/css/css-contain/contain-paint-020.html
new file mode 100644
index 0000000..44a6217
--- /dev/null
+++ b/css/css-contain/contain-paint-020.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Paint containment stacking context</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-paint">
+<link rel="match" href="../reference/pass_if_pass_below.html">
+<meta name=assert content="Paint containment elements create a stacking context.">
+<style>
+div {
+  contain: paint;
+  background: white;
+}
+span {
+  position: relative;
+  z-index: -1;
+}
+</style>
+
+<p>Test passes if there is the word "PASS" below.</p>
+<div><span>PASS</span></div>
diff --git a/css/css-contain/contain-paint-021.html b/css/css-contain/contain-paint-021.html
new file mode 100644
index 0000000..a8ea1c8
--- /dev/null
+++ b/css/css-contain/contain-paint-021.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Containment Test: Paint containment stacking context</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-paint">
+<link rel="match" href="../reference/nothing.html">
+<meta name=assert content="Elements in which paint containment doesn't apply, do not create a stacking context.">
+<style>
+div {
+  display: ruby-text;
+  contain: paint;
+  background: white;
+}
+span {
+  position: relative;
+  z-index: -1;
+}
+</style>
+
+<p>There should be nothing below.</p>
+<div><span>FAIL</span></div>