aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-05-03 17:30:56 +0200
committerbptato <nincsnevem662@gmail.com>2025-05-03 17:49:32 +0200
commit015aa0fd92ece4bdc1f645131b96369f801ed961 (patch)
tree1563324b8e12ad6f9275704285fa0e91c941f3be /test
parentcdfa5ea9aa451b6be5790382881431eec2722394 (diff)
downloadchawan-015aa0fd92ece4bdc1f645131b96369f801ed961.tar.gz
layout, csstree: build stacking contexts together with tree
We often redo sub-layouts in layout, and this makes stacking contexts very hard to build reliably there. This fixes a bug where positioned descendants of flex items would sometimes mysteriously disappear.
Diffstat (limited to 'test')
-rw-r--r--test/layout/position-absolute-z-index-in-root.color.expected1
-rw-r--r--test/layout/position-absolute-z-index-in-root.html3
-rw-r--r--test/layout/position-relative-in-relative-relayouted-in-flex-item.color.expected1
-rw-r--r--test/layout/position-relative-in-relative-relayouted-in-flex-item.html6
4 files changed, 11 insertions, 0 deletions
diff --git a/test/layout/position-absolute-z-index-in-root.color.expected b/test/layout/position-absolute-z-index-in-root.color.expected
new file mode 100644
index 00000000..3d2e1f0a
--- /dev/null
+++ b/test/layout/position-absolute-z-index-in-root.color.expected
@@ -0,0 +1 @@
+test
diff --git a/test/layout/position-absolute-z-index-in-root.html b/test/layout/position-absolute-z-index-in-root.html
new file mode 100644
index 00000000..eaae4038
--- /dev/null
+++ b/test/layout/position-absolute-z-index-in-root.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<div style="position: absolute; z-index: 4">test</div>
+<div style="position: absolute; z-index: 3; background: red; width: 2em; height: 1em">
diff --git a/test/layout/position-relative-in-relative-relayouted-in-flex-item.color.expected b/test/layout/position-relative-in-relative-relayouted-in-flex-item.color.expected
new file mode 100644
index 00000000..3d2e1f0a
--- /dev/null
+++ b/test/layout/position-relative-in-relative-relayouted-in-flex-item.color.expected
@@ -0,0 +1 @@
+test
diff --git a/test/layout/position-relative-in-relative-relayouted-in-flex-item.html b/test/layout/position-relative-in-relative-relayouted-in-flex-item.html
new file mode 100644
index 00000000..b13c4c51
--- /dev/null
+++ b/test/layout/position-relative-in-relative-relayouted-in-flex-item.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<div style="display: flex">
+<div style="position: relative; margin-bottom: 1em">
+<div style="background: red; display: flow-root">
+<div style="position: relative">
+test