LibWeb: Treat "flex-basis: 0px" like any other definite basis value

This commit is contained in:
Andreas Kling 2022-07-10 23:49:02 +02:00
parent 61c27815e4
commit f7750985fa
Notes: sideshowbarker 2024-07-17 09:30:23 +09:00

View file

@ -581,10 +581,7 @@ void FlexFormattingContext::determine_flex_base_size_and_hypothetical_main_size(
// A. If the item has a definite used flex basis, thats the flex base size.
if (used_flex_basis.is_definite()) {
auto specified_base_size = get_pixel_size(m_state, child_box, used_flex_basis.length_percentage.value());
if (specified_base_size == 0)
return calculated_main_size(flex_item.box);
return specified_base_size;
return get_pixel_size(m_state, child_box, used_flex_basis.length_percentage.value());
}
// B. If the flex item has ...