1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 16:47:42 +00:00
serenity/Tests/LibWeb/Layout
Andreas Kling af118abdf0 LibWeb: Use fit-content width in place of indefinite flex item widths
In `flex-direction: column` layouts, a flex item's intrinsic height may
depend on its width, but the width is calculated *after* the intrinsic
height is required.

Unfortunately, the specification doesn't tell us exactly what to do here
(missing inputs to intrinsic sizing is a common problem) so we take the
solution that flexbox applies in 9.2.3.C and apply it to all intrinsic
height calculations within FlexFormattingContext: if the used width of
an item is not yet known when its intrinsic height is requested, we
substitute the fit-content width instead.

Note that while this is technically ad-hoc, it's basically extrapolating
the spec's suggestion in one specific case and using it in all cases.
2023-03-27 23:28:07 +02:00
..
expected LibWeb: Use fit-content width in place of indefinite flex item widths 2023-03-27 23:28:07 +02:00
input LibWeb: Use fit-content width in place of indefinite flex item widths 2023-03-27 23:28:07 +02:00
layout_test.sh LibWeb: Run LibWeb layout tests using headless-browser 2023-03-13 12:41:10 +00:00