1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:27:35 +00:00

LibWeb: Use max content contribution in flex_fraction in GFC

As spec comment in the code says we should use item’s max-content
contribution to calculate flex fraction.

Likely, it was calculate_max_content_size() because we didn't have
calculate_max_content_contribution() when this function was implemented
initially.
This commit is contained in:
Aliaksandr Kalenik 2023-10-23 23:15:32 +02:00 committed by Andreas Kling
parent 802b58d7e1
commit 4dab17427f
3 changed files with 35 additions and 1 deletions

View file

@ -1240,7 +1240,7 @@ void GridFormattingContext::expand_flexible_tracks(AvailableSpace const& availab
});
if (crosses_flexible_track)
result = max(result, find_the_size_of_an_fr(spanned_tracks, calculate_max_content_size(item, dimension)));
result = max(result, find_the_size_of_an_fr(spanned_tracks, calculate_max_content_contribution(item, dimension)));
}
return result;