mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Remove redundant call to fit-content sizing in flex layout
We were calculating the fit-content cross size and then throwing it away and doing it again. You might think this wasn't so bad since fit-content relies on cacheable intrinsic sizes *buuuuut* since we're actually modifying the constraints for the second call, we were indeed doing completely wasted work here.
This commit is contained in:
parent
9840a8c750
commit
0c6ad0a740
|
|
@ -1130,7 +1130,7 @@ void FlexFormattingContext::determine_hypothetical_cross_size_of_item(FlexItem&
|
|||
}
|
||||
|
||||
// "... treating auto as fit-content"
|
||||
auto fit_content_cross_size = calculate_fit_content_cross_size(item);
|
||||
CSSPixels fit_content_cross_size;
|
||||
if (is_row_layout()) {
|
||||
auto available_width = item.main_size.has_value() ? AvailableSize::make_definite(item.main_size.value()) : AvailableSize::make_indefinite();
|
||||
auto available_height = AvailableSize::make_indefinite();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user