mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00: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
Notes:
github-actions[bot]
2025-04-22 10:10:42 +00:00
Author: https://github.com/awesomekling
Commit: 0c6ad0a740
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4424
Reviewed-by: https://github.com/gmta
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue