about summary refs log tree commit diff stats
path: root/test/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-10-25 17:48:15 +0200
committerbptato <nincsnevem662@gmail.com>2024-10-25 17:49:47 +0200
commit8b46e95183c3605432589efcc67844ff2d1dda45 (patch)
tree48c3ce0eb5fa68db2a8b90608d85c1e38f2535d2 /test/layout
parentaed823c999ba7c68d8c2f3fc4cf94648d9b1c33e (diff)
downloadchawan-8b46e95183c3605432589efcc67844ff2d1dda45.tar.gz
layout: fix nested absolute positioning, refactor initial size resolution
Nested position: absolute was broken, so fix it.

Also, it makes no sense to dispatch inside layoutBlockChild when we
know the expected resolution algorithm upon calling it anyway, so now we
do that statically.

Finally, fix some bugs in position: absolute size resolution.
Diffstat (limited to 'test/layout')
-rw-r--r--test/layout/absolute-in-absolute.color.expected10
-rw-r--r--test/layout/absolute-in-absolute.html15
2 files changed, 25 insertions, 0 deletions
diff --git a/test/layout/absolute-in-absolute.color.expected b/test/layout/absolute-in-absolute.color.expected
new file mode 100644
index 00000000..0e5ede43
--- /dev/null
+++ b/test/layout/absolute-in-absolute.color.expected
@@ -0,0 +1,10 @@
+test
+test 
+test2
+test2
+test2
+test2
+test2
+test2
+test2
+test2
diff --git a/test/layout/absolute-in-absolute.html b/test/layout/absolute-in-absolute.html
new file mode 100644
index 00000000..00b7c692
--- /dev/null
+++ b/test/layout/absolute-in-absolute.html
@@ -0,0 +1,15 @@
+<div style="position: absolute">
+<span style="display: inline-block; position: absolute; background: red">
+test
+test
+<div style="position: absolute; background: blue">
+test2 test2 test2 test2
+</div>
+<br>
+<br>
+<br>
+<br>
+<br>
+<div style="position: absolute; background: blue; width: 0">
+test2 test2 test2 test2
+</div>