aboutsummaryrefslogtreecommitdiffstats
path: root/test/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-02-08 20:27:20 +0100
committerbptato <nincsnevem662@gmail.com>2025-02-08 20:46:07 +0100
commit78eca80d8870c667b5f934033e3b643eef5f0d1a (patch)
tree06f61a686a72030c149d8bf29d459bc603f8cd68 /test/layout
parent2c136265658450ea91cb81ee6b3a85198a0c4844 (diff)
downloadchawan-78eca80d8870c667b5f934033e3b643eef5f0d1a.tar.gz
layout: fix nested float positioning
Setting the width to max-content was supposed to be an optimization, but it seems max-content has some issues when interacting with floats. Arguably this is just hiding the bug, but my attempt to fix max-content was not successful... (That is to say, I suspect floats still behave strangely in tables.)
Diffstat (limited to 'test/layout')
-rw-r--r--test/layout/inline-float-weirdness.color.expected6
-rw-r--r--test/layout/shrink-to-fit-indirect-floating-descendant.expected1
-rw-r--r--test/layout/shrink-to-fit-indirect-floating-descendant.html9
3 files changed, 13 insertions, 3 deletions
diff --git a/test/layout/inline-float-weirdness.color.expected b/test/layout/inline-float-weirdness.color.expected
index bed34fc1..cb8782d8 100644
--- a/test/layout/inline-float-weirdness.color.expected
+++ b/test/layout/inline-float-weirdness.color.expected
@@ -1,6 +1,6 @@
-test test  test test test 
-test  test  test 
-test  test  test 
+test test  test test  test 
+test  test  test 
+test  test  test 
test test 
test 
test 
diff --git a/test/layout/shrink-to-fit-indirect-floating-descendant.expected b/test/layout/shrink-to-fit-indirect-floating-descendant.expected
new file mode 100644
index 00000000..4d14d06f
--- /dev/null
+++ b/test/layout/shrink-to-fit-indirect-floating-descendant.expected
@@ -0,0 +1 @@
+ abcd
diff --git a/test/layout/shrink-to-fit-indirect-floating-descendant.html b/test/layout/shrink-to-fit-indirect-floating-descendant.html
new file mode 100644
index 00000000..28ebbfac
--- /dev/null
+++ b/test/layout/shrink-to-fit-indirect-floating-descendant.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<div style="float: right">
+<div>
+<div style="float: right">d</div>
+<div style="float: right">c</div>
+<div style="float: left">a</div>
+<div style="float: left">b</div>
+</div>
+</div>