summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/stacking-context
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/CSS2/stacking-context')
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order-ref.html19
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order.html39
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/opacity-affects-block-in-inline-ref.html2
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/opacity-affects-block-in-inline.html6
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-parent-stacking-context-ref.html8
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-parent-stacking-context.html21
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context-ref.html3
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context.html19
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/opacity-transition-change-parent-stacking-context-ref.html4
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/opacity-transition-change-parent-stacking-context.html21
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/zindex-affects-block-in-inline-ref.html2
-rw-r--r--testing/web-platform/tests/css/CSS2/stacking-context/zindex-affects-block-in-inline.html7
12 files changed, 151 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order-ref.html b/testing/web-platform/tests/css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order-ref.html
new file mode 100644
index 0000000000..9bf223c3b5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order-ref.html
@@ -0,0 +1,19 @@
+<!doctype HTML>
+<link rel="author" title="Chris Harrelson" href="chrishtr@chromium.org">
+<style>
+ #one, #two {
+ width: 200px; height: 200px; background: lightblue; position: relative
+ }
+ #one {
+ background: lightblue
+ }
+ #two {
+ background: lightgray;
+ margin-top: -200px;
+ }
+</style>
+<div id=scroller style="overflow: scroll; width: 300px; height: 300px; will-change: transform">
+ <div id=one></div>
+ <div id=two></div>
+ <div id=spacer style="width: 50px; height: 5000px"></div>
+</div>
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order.html b/testing/web-platform/tests/css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order.html
new file mode 100644
index 0000000000..1abf6f292e
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order.html
@@ -0,0 +1,39 @@
+<!doctype HTML>
+<link rel="author" title="Chris Harrelson" href="chrishtr@chromium.org">
+<link rel="match" href="composite-change-after-scroll-preserves-stacking-order-ref.html">
+<link rel="help" href="https://www.w3.org/TR/CSS2/zindex.html"/>
+<script src="/common/reftest-wait.js"></script>
+<script src="/web-animations/testcommon.js"></script>
+<style>
+ #one, #two {
+ width: 200px; height: 200px; background: lightblue; position: relative
+ }
+ #one {
+ background: lightblue
+ }
+ #two {
+ background: lightgray;
+ margin-top: -200px;
+ }
+</style>
+<html class=reftest-wait>
+ <div id=scroller style="overflow: scroll; width: 300px; height: 300px; will-change: transform">
+ <div id=one></div>
+ <div id=two></div>
+ <div id=spacer style="width: 50px; height: 5000px"></div>
+ </div>
+</html>
+<script>
+ onload = () => {
+ waitForAnimationFrames(2).then(() => {
+ scroller.scrollBy(0, 1000);
+ waitForAnimationFrames(2).then(() => {
+ one.style = 'will-change: transform';
+ waitForAnimationFrames(2).then(() => {
+ scroller.scrollBy(0, -1000);
+ takeScreenshot();
+ });
+ });
+ });
+ };
+</script>
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/opacity-affects-block-in-inline-ref.html b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-affects-block-in-inline-ref.html
new file mode 100644
index 0000000000..24ed7c921a
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-affects-block-in-inline-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<div style="width: 100px; height: 100px; background: green; opacity: 0.5;"></div>
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/opacity-affects-block-in-inline.html b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-affects-block-in-inline.html
new file mode 100644
index 0000000000..340ca185d9
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-affects-block-in-inline.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=884236">
+<link rel="match" href="opacity-affects-block-in-inline-ref.html">
+<span style="opacity: 0.5;">
+ <div style="width: 100px; height: 100px; background: green;"></div>
+</span>
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-parent-stacking-context-ref.html b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-parent-stacking-context-ref.html
new file mode 100644
index 0000000000..16df33369f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-parent-stacking-context-ref.html
@@ -0,0 +1,8 @@
+<!doctype HTML>
+<title>CSS Test Reference</title>
+<link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org" />
+<div style="width: 100px; height: 100px; background: lightblue; will-change: transform; position: absolute">
+ <div id=target style="backface-visibility: hidden">
+ <div style="width: 50px; height: 50px; background: lightgray; top: 75px; position: relative"></div>
+ </div>
+</div>
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-parent-stacking-context.html b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-parent-stacking-context.html
new file mode 100644
index 0000000000..e58bf47c2f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-parent-stacking-context.html
@@ -0,0 +1,21 @@
+<!doctype HTML>
+<html class="reftest-wait">
+ <title>CSS Test: Test for re-paint after stacking context removal due to opacity</title>
+ <link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org" />
+ <link rel="help" href="https://www.w3.org/TR/CSS2/zindex.html">
+ <link rel="match" href="opacity-change-parent-stacking-context-ref.html">
+ <script src="/common/reftest-wait.js"></script>
+ <div style="width: 100px; height: 100px; background: lightblue; will-change: transform; position: absolute">
+ <div id=target style="opacity: 0; backface-visibility: hidden">
+ <div style="width: 50px; height: 50px; background: lightgray; top: 75px; position: relative"></div>
+ </div>
+ </div>
+ <script>
+ onload = function() {
+ requestAnimationFrame(() => requestAnimationFrame(() => {
+ target.style.opacity = 1;
+ takeScreenshot();
+ }));
+ }
+ </script>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context-ref.html b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context-ref.html
new file mode 100644
index 0000000000..da17527af5
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context-ref.html
@@ -0,0 +1,3 @@
+<!doctype HTML>
+<div style="width: 100px; height: 100px; z-index: 1; opacity: 0.9; background: blue; position: absolute">
+</div>
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context.html b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context.html
new file mode 100644
index 0000000000..c3c680c68f
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context.html
@@ -0,0 +1,19 @@
+<!doctype HTML>
+<html class="reftest-wait">
+ <title>CSS Test: Test for re-paint after stacking context changes opacity twice</title>
+ <link rel="help" href="https://www.w3.org/TR/CSS2/zindex.html">
+ <link rel="match" href="opacity-change-twice-stacking-context-ref.html">
+ <script src="/common/reftest-wait.js"></script>
+ <div id="target" style="width: 100px; height: 100px; z-index: 1; opacity: 0; background: blue; position: absolute">
+ </div>
+ <script>
+ onload = () => {
+ requestAnimationFrame(() => requestAnimationFrame(() => {
+ target.style.opacity = 1;
+ target.offsetHeight;
+ target.style.opacity = 0.9;
+ takeScreenshot();
+ }));
+ }
+ </script>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/opacity-transition-change-parent-stacking-context-ref.html b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-transition-change-parent-stacking-context-ref.html
new file mode 100644
index 0000000000..65138c9a66
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-transition-change-parent-stacking-context-ref.html
@@ -0,0 +1,4 @@
+<!doctype HTML>
+<title>CSS Test Reference</title>
+<link rel="author" title="Philip Rogers" href="mailto:pdr@chromium.org" />
+<div style="opacity: 1; width: 100px; height: 100px; background: green;"></div> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/opacity-transition-change-parent-stacking-context.html b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-transition-change-parent-stacking-context.html
new file mode 100644
index 0000000000..c163a4c7e6
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/opacity-transition-change-parent-stacking-context.html
@@ -0,0 +1,21 @@
+<!doctype HTML>
+<html class="reftest-wait">
+ <title>CSS Test: Test for re-paint after stacking context removal due to opacity transition</title>
+ <link rel="author" title="Philip Rogers" href="mailto:pdr@chromium.org" />
+ <link rel="help" href="https://www.w3.org/TR/CSS2/zindex.html">
+ <link rel="match" href="opacity-transition-change-parent-stacking-context-ref.html">
+ <script src="/common/reftest-wait.js"></script>
+ <div style="position: relative;">
+ <div id=target style="transition:.00001s ease; opacity: 0; backface-visibility: hidden; width: 100px; height: 100px; background: green;"></div>
+ </div>
+ <script>
+ onload = function() {
+ requestAnimationFrame(() => requestAnimationFrame(() => {
+ target.style.opacity = 1;
+ requestAnimationFrame(() => {
+ takeScreenshot();
+ });
+ }));
+ }
+ </script>
+</html>
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/zindex-affects-block-in-inline-ref.html b/testing/web-platform/tests/css/CSS2/stacking-context/zindex-affects-block-in-inline-ref.html
new file mode 100644
index 0000000000..c0fdb338d0
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/zindex-affects-block-in-inline-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<div style="background: green; width: 100px; height: 100px;"></div>
diff --git a/testing/web-platform/tests/css/CSS2/stacking-context/zindex-affects-block-in-inline.html b/testing/web-platform/tests/css/CSS2/stacking-context/zindex-affects-block-in-inline.html
new file mode 100644
index 0000000000..5a5c9e3dcc
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/stacking-context/zindex-affects-block-in-inline.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=764458">
+<link rel="match" href="zindex-affects-block-in-inline-ref.html">
+<div style="position: relative; z-index: 1; background: red; width: 100px; height: 100px;"></div>
+<span style="position: relative; z-index: 2; top: -100px;">
+ <div style="background: green; width: 100px; height: 100px;"></div>
+</span>