diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-12-17 01:23:52 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-12-17 19:35:41 +0100 |
| commit | 7d91d0dfe6309edeee7d7562d6054a8fb0392573 (patch) | |
| tree | dede41714721d9ec6f4d7a61a66afb5b9fa7fe6b /test/layout | |
| parent | c514f8c8b2e11557eed512d55321f9c8382ac2cc (diff) | |
| download | chawan-7d91d0dfe6309edeee7d7562d6054a8fb0392573.tar.gz | |
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.
Diffstat (limited to 'test/layout')
12 files changed, 75 insertions, 0 deletions
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 +[48;2;255;0;0mtest [49m + 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 @@ +<div style="display: flow-root; width: 3ch"> +<div style="float: right">float</div> +<pre style="width: 6ch; display: flow-root; background: red">test</pre> 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 @@ +<table style="width: 4ch"> +<tr> +<td width=0%> +<div style="display: flex"> +<div> +testtest +</div> +</div> +</td> +<td width=100%> +second +</table> 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 @@ +<!DOCTYPE html> +<body style="height: 2em; display: flex; flex-direction:column"> +<pre> +test +test +test +test +test +test +test +</pre> +<div> +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 @@ +[48;2;128;0;128m [48;2;0;0;255mtest test test [48;2;128;0;128m [49m + 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 @@ +<!DOCTYPE html> +<div style="padding: 0 1ch; background: purple"> +<div style="float: right"> +</div> +<div style="background: red"> +<div style="background: blue; display: flow-root"> +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 +[48;2;128;0;128m [49m +[48;2;255;0;0mtest test test test test test test test test test test test test test test test [49mtest 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 @@ +<!DOCTYPE html> +<body> +<div style="float: right">right</div> +<div style="display: flow-root; background: purple"> +<div style="margin-left: auto; margin-right: auto; width: 100%; background: red"> +<pre> +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 @@ +[48;2;255;0;0m test [49m +[48;2;255;0;0m test [49m +[48;2;255;0;0m test [49m +[48;2;255;0;0m test [49m +[48;2;255;0;0m test [49m +[48;2;255;0;0m test [49m +[48;2;255;0;0m test [49m +[48;2;255;0;0m test [49m + 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 @@ +<!DOCTYPE html> +<div style="display: flex; width: 20ch; background: blue"> +<div style="display: flex; flex-direction: column; max-width: 100%"> +<div style="padding-left: 20ch; padding-right: 20ch; background: red"> +test test test test test test test test |