1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:57:44 +00:00

LibWeb: Make separate functions for calculating min/max content sizes

At first, these are just wrappers around calculate_intrinsic_sizes().
Eventually, we'll make them do only the work necessary for their
specific size.
This commit is contained in:
Andreas Kling 2022-07-08 00:40:53 +02:00
parent 1690d88887
commit 496cf39cf5
4 changed files with 35 additions and 30 deletions

View file

@ -689,8 +689,8 @@ float FlexFormattingContext::content_size_suggestion(FlexItem const& item) const
{
// FIXME: Apply clamps
if (is_row_layout())
return calculate_min_and_max_content_width(item.box).min_content_size;
return calculate_min_and_max_content_height(item.box).min_content_size;
return calculate_min_content_width(item.box);
return calculate_min_content_height(item.box);
}
// https://drafts.csswg.org/css-flexbox-1/#transferred-size-suggestion