Images 💾

Last commit ⭐

commit af118abdf0a735d23159eeeb2a867a6acb880977
Author:     Andreas Kling <kling@serenityos.org>
AuthorDate: Mon Mar 27 20:56:20 2023 +0200
Commit:     Andreas Kling <kling@serenityos.org>
CommitDate: Mon Mar 27 23:28:07 2023 +0200

    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.