From 7d91d0dfe6309edeee7d7562d6054a8fb0392573 Mon Sep 17 00:00:00 2001 From: bptato Date: Tue, 17 Dec 2024 01:23:52 +0100 Subject: layout: propagate intrinsic minimum height Necessary for flex. Previously we just used the actual height, but that didn't account for boxes that size themselves depending on the available height (mainly just images for now). This also irons out intrinsic min width calculation somewhat, squashing several bugs. I hope it works well. It is a significant change in size calculation, so maybe there are still new bugs lurking. --- .../bfc-child-after-float-overflows-parent.color.expected | 3 +++ test/layout/bfc-child-after-float-overflows-parent.html | 3 +++ test/layout/flex-in-table-intrinsic-min-width.expected | 1 + test/layout/flex-in-table-intrinsic-min-width.html | 12 ++++++++++++ .../flex-item-intrinsic-min-height-respected.expected | 9 +++++++++ test/layout/flex-item-intrinsic-min-height-respected.html | 13 +++++++++++++ ...-reposition-with-left-padding-fills-space.color.expected | 2 ++ .../float-reposition-with-left-padding-fills-space.html | 7 +++++++ ...h-overflows-parent-perc-width-after-float.color.expected | 4 ++++ ...c-min-width-overflows-parent-perc-width-after-float.html | 7 +++++++ ...sted-flex-direction-swap-padding-overflow.color.expected | 9 +++++++++ .../layout/nested-flex-direction-swap-padding-overflow.html | 5 +++++ 12 files changed, 75 insertions(+) create mode 100644 test/layout/bfc-child-after-float-overflows-parent.color.expected create mode 100644 test/layout/bfc-child-after-float-overflows-parent.html create mode 100644 test/layout/flex-in-table-intrinsic-min-width.expected create mode 100644 test/layout/flex-in-table-intrinsic-min-width.html create mode 100644 test/layout/flex-item-intrinsic-min-height-respected.expected create mode 100644 test/layout/flex-item-intrinsic-min-height-respected.html create mode 100644 test/layout/float-reposition-with-left-padding-fills-space.color.expected create mode 100644 test/layout/float-reposition-with-left-padding-fills-space.html create mode 100644 test/layout/intrinsic-min-width-overflows-parent-perc-width-after-float.color.expected create mode 100644 test/layout/intrinsic-min-width-overflows-parent-perc-width-after-float.html create mode 100644 test/layout/nested-flex-direction-swap-padding-overflow.color.expected create mode 100644 test/layout/nested-flex-direction-swap-padding-overflow.html (limited to 'test/layout') diff --git a/test/layout/bfc-child-after-float-overflows-parent.color.expected b/test/layout/bfc-child-after-float-overflows-parent.color.expected new file mode 100644 index 00000000..c6426e9d --- /dev/null +++ b/test/layout/bfc-child-after-float-overflows-parent.color.expected @@ -0,0 +1,3 @@ +float +test  + diff --git a/test/layout/bfc-child-after-float-overflows-parent.html b/test/layout/bfc-child-after-float-overflows-parent.html new file mode 100644 index 00000000..94a48acc --- /dev/null +++ b/test/layout/bfc-child-after-float-overflows-parent.html @@ -0,0 +1,3 @@ +
+
float
+
test
diff --git a/test/layout/flex-in-table-intrinsic-min-width.expected b/test/layout/flex-in-table-intrinsic-min-width.expected new file mode 100644 index 00000000..82f2670f --- /dev/null +++ b/test/layout/flex-in-table-intrinsic-min-width.expected @@ -0,0 +1 @@ + testtest second diff --git a/test/layout/flex-in-table-intrinsic-min-width.html b/test/layout/flex-in-table-intrinsic-min-width.html new file mode 100644 index 00000000..61b48f29 --- /dev/null +++ b/test/layout/flex-in-table-intrinsic-min-width.html @@ -0,0 +1,12 @@ + + + +
+
+
+testtest +
+
+
+second +
diff --git a/test/layout/flex-item-intrinsic-min-height-respected.expected b/test/layout/flex-item-intrinsic-min-height-respected.expected new file mode 100644 index 00000000..b7ad464d --- /dev/null +++ b/test/layout/flex-item-intrinsic-min-height-respected.expected @@ -0,0 +1,9 @@ +test +test +test +test +test +test +test + +test test test test diff --git a/test/layout/flex-item-intrinsic-min-height-respected.html b/test/layout/flex-item-intrinsic-min-height-respected.html new file mode 100644 index 00000000..71a0dec7 --- /dev/null +++ b/test/layout/flex-item-intrinsic-min-height-respected.html @@ -0,0 +1,13 @@ + + +
+test
+test
+test
+test
+test
+test
+test
+
+
+test test test test diff --git a/test/layout/float-reposition-with-left-padding-fills-space.color.expected b/test/layout/float-reposition-with-left-padding-fills-space.color.expected new file mode 100644 index 00000000..4e703901 --- /dev/null +++ b/test/layout/float-reposition-with-left-padding-fills-space.color.expected @@ -0,0 +1,2 @@ + test test test   + diff --git a/test/layout/float-reposition-with-left-padding-fills-space.html b/test/layout/float-reposition-with-left-padding-fills-space.html new file mode 100644 index 00000000..7e87bc99 --- /dev/null +++ b/test/layout/float-reposition-with-left-padding-fills-space.html @@ -0,0 +1,7 @@ + +
+
+
+
+
+test test test diff --git a/test/layout/intrinsic-min-width-overflows-parent-perc-width-after-float.color.expected b/test/layout/intrinsic-min-width-overflows-parent-perc-width-after-float.color.expected new file mode 100644 index 00000000..cd858133 --- /dev/null +++ b/test/layout/intrinsic-min-width-overflows-parent-perc-width-after-float.color.expected @@ -0,0 +1,4 @@ + right +  +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 test test test test test + diff --git a/test/layout/intrinsic-min-width-overflows-parent-perc-width-after-float.html b/test/layout/intrinsic-min-width-overflows-parent-perc-width-after-float.html new file mode 100644 index 00000000..11e3663e --- /dev/null +++ b/test/layout/intrinsic-min-width-overflows-parent-perc-width-after-float.html @@ -0,0 +1,7 @@ + + +
right
+
+
+
+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 test test test test test 
diff --git a/test/layout/nested-flex-direction-swap-padding-overflow.color.expected b/test/layout/nested-flex-direction-swap-padding-overflow.color.expected
new file mode 100644
index 00000000..fd65de93
--- /dev/null
+++ b/test/layout/nested-flex-direction-swap-padding-overflow.color.expected
@@ -0,0 +1,9 @@
+                    test                
+                    test                
+                    test                
+                    test                
+                    test                
+                    test                
+                    test                
+                    test                
+
diff --git a/test/layout/nested-flex-direction-swap-padding-overflow.html b/test/layout/nested-flex-direction-swap-padding-overflow.html
new file mode 100644
index 00000000..ed3056ff
--- /dev/null
+++ b/test/layout/nested-flex-direction-swap-padding-overflow.html
@@ -0,0 +1,5 @@
+
+
+
+
+test test test test test test test test -- cgit