about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-04-10 20:43:12 +0200
committerbptato <nincsnevem662@gmail.com>2025-04-10 20:43:32 +0200
commit581aa021d4b30075d01b892e78bf4757e8942c4e (patch)
tree55c0fc854aaeb8ccfb0fca61ab0066a261983597 /test
parent18d35105cd3a47192d8b00f28e23998c2dccf0f2 (diff)
downloadchawan-581aa021d4b30075d01b892e78bf4757e8942c4e.tar.gz
layout, render: fix positioning of absolute flex item descendants
Always placing boxes relative to their parent *seems* prettier, but the
implementation was broken and I can't come up with a sane working one.

So we're back to just special casing position: absolute in render.
Sad, but at least it works.  (I think it's also a bit more efficient.)
Diffstat (limited to 'test')
-rw-r--r--test/layout/non-positioned-flex-item-respects-accepts-z-index.color.expected3
-rw-r--r--test/layout/non-positioned-flex-item-respects-accepts-z-index.html12
-rw-r--r--test/layout/position-absolute-with-relative-inline-parent-offset.color.expected2
-rw-r--r--test/layout/position-absolute-with-relative-inline-parent-offset.html2
4 files changed, 17 insertions, 2 deletions
diff --git a/test/layout/non-positioned-flex-item-respects-accepts-z-index.color.expected b/test/layout/non-positioned-flex-item-respects-accepts-z-index.color.expected
index 46d1979d..d1ea3a34 100644
--- a/test/layout/non-positioned-flex-item-respects-accepts-z-index.color.expected
+++ b/test/layout/non-positioned-flex-item-respects-accepts-z-index.color.expected
@@ -1 +1,4 @@
 test test
+test
+test test
+eh?
diff --git a/test/layout/non-positioned-flex-item-respects-accepts-z-index.html b/test/layout/non-positioned-flex-item-respects-accepts-z-index.html
index 956f2591..fabad52f 100644
--- a/test/layout/non-positioned-flex-item-respects-accepts-z-index.html
+++ b/test/layout/non-positioned-flex-item-respects-accepts-z-index.html
@@ -1,5 +1,17 @@
 <!DOCTYPE html>
+<div style="position: relative; line-height: 1em">
 <div style="display: flex">
 <div style="background: red; position: absolute; height: 1em; width: 5ch"></div>
 <div style="z-index: 1">
 test test
+</div>
+</div>
+<div style="display: flex; flex-direction: column">
+<div>test</div>
+<div style="z-index: -1">
+test test
+<div style="position: absolute; top: 3em">
+eh?
+</div>
+</div>
+</div>
diff --git a/test/layout/position-absolute-with-relative-inline-parent-offset.color.expected b/test/layout/position-absolute-with-relative-inline-parent-offset.color.expected
index fd207776..8feac12e 100644
--- a/test/layout/position-absolute-with-relative-inline-parent-offset.color.expected
+++ b/test/layout/position-absolute-with-relative-inline-parent-offset.color.expected
@@ -1,6 +1,6 @@
 
 Note: per CSS, the absolute box's sizing is explicitly UB, apparently to
-accomodate for Gecko's broken rendering. We follow Blink.
+accommodate for Gecko's broken rendering. We follow Blink.
 
 
 
diff --git a/test/layout/position-absolute-with-relative-inline-parent-offset.html b/test/layout/position-absolute-with-relative-inline-parent-offset.html
index 88f5882f..ddabca34 100644
--- a/test/layout/position-absolute-with-relative-inline-parent-offset.html
+++ b/test/layout/position-absolute-with-relative-inline-parent-offset.html
@@ -2,7 +2,7 @@
 <!-- don't ask -->
 <p>
 Note: per CSS, the absolute box's sizing is explicitly UB, apparently to
-accomodate for Gecko's broken rendering.  We follow Blink.
+accommodate for Gecko's broken rendering.  We follow Blink.
 </p>
 <br>
 <br>test test <span style="position:relative">test test<div style="display: inline-block">adsfasdf</div><BR>