diff options
author | Andreas Kling <kling@serenityos.org> | 2023-05-18 14:56:31 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-18 18:06:30 +0200 |
commit | e3d182bfe2264f021c5d1c5f3663f77cc61261d0 (patch) | |
tree | 73fa4e0dac9c9a5c024b34260f6fc257bea2228f /Userland/Libraries/LibWeb/Layout | |
parent | 82aedfcaf0eb1a91c2f604849928c6af783a0a3c (diff) | |
download | serenity-e3d182bfe2264f021c5d1c5f3663f77cc61261d0.zip |
LibWeb: Fix "Unsupported main size for flex-basis" spam about calc()
For flex items with a calc() value for a main size, we can just convert
them to a calculation-backed LengthPercentage.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp index da7efb0094..9b01495910 100644 --- a/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp @@ -555,9 +555,11 @@ CSS::FlexBasisData FlexFormattingContext::used_flex_basis_for_item(FlexItem cons flex_basis.length_percentage = main_size.length(); } else if (main_size.is_percentage()) { flex_basis.length_percentage = main_size.percentage(); + } else if (main_size.is_calculated()) { + flex_basis.length_percentage = CSS::LengthPercentage { main_size.calculated() }; } else { // FIXME: Support other size values! - dbgln("FIXME: Unsupported main size for flex-basis!"); + dbgln("FIXME: Unsupported main size for flex-basis: {}", main_size); flex_basis.type = CSS::FlexBasis::Content; } } |