mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
LibWeb: Use automatic_content_height() in flex item internal layouts
This commit is contained in:
parent
5656173e00
commit
a8e1599ae1
1 changed files with 2 additions and 2 deletions
|
@ -619,7 +619,7 @@ float FlexFormattingContext::calculate_indefinite_main_size(FlexItem const& item
|
||||||
box_state.set_content_width(fit_content_cross_size);
|
box_state.set_content_width(fit_content_cross_size);
|
||||||
independent_formatting_context->run(item.box, LayoutMode::Normal);
|
independent_formatting_context->run(item.box, LayoutMode::Normal);
|
||||||
|
|
||||||
return BlockFormattingContext::compute_theoretical_height(throwaway_state, item.box);
|
return independent_formatting_context->automatic_content_height();
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://drafts.csswg.org/css-flexbox-1/#propdef-flex-basis
|
// https://drafts.csswg.org/css-flexbox-1/#propdef-flex-basis
|
||||||
|
@ -1073,7 +1073,7 @@ void FlexFormattingContext::determine_hypothetical_cross_size_of_item(FlexItem&
|
||||||
|
|
||||||
independent_formatting_context->run(item.box, LayoutMode::Normal);
|
independent_formatting_context->run(item.box, LayoutMode::Normal);
|
||||||
|
|
||||||
auto automatic_cross_size = is_row_layout() ? BlockFormattingContext::compute_theoretical_height(throwaway_state, item.box)
|
auto automatic_cross_size = is_row_layout() ? independent_formatting_context->automatic_content_height()
|
||||||
: box_state.content_width();
|
: box_state.content_width();
|
||||||
|
|
||||||
item.hypothetical_cross_size = css_clamp(automatic_cross_size, clamp_min, clamp_max);
|
item.hypothetical_cross_size = css_clamp(automatic_cross_size, clamp_min, clamp_max);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue