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

LibWeb: Allow IFC to size inline-flex boxes midway through flex layout

The part in FFC where we ask the parent formatting context to size the
flex container midway through layout is really weird, but let's at least
be consistently weird for BFC and IFC. Since IFC always works within its
parent BFC, it can simply forward these requests to the BFC.

This fixes an issue where inline-flex containers incorrectly had main
axis margins subtracted from their content size.
This commit is contained in:
Andreas Kling 2023-06-19 15:19:25 +02:00
parent 1737a0d1d9
commit e99a6fede4
4 changed files with 46 additions and 0 deletions

View file

@ -348,4 +348,19 @@ bool InlineFormattingContext::can_fit_new_line_at_y(CSSPixels y) const
return true;
}
bool InlineFormattingContext::can_determine_size_of_child() const
{
return parent().can_determine_size_of_child();
}
void InlineFormattingContext::determine_width_of_child(Box const& box, AvailableSpace const& available_space)
{
return parent().determine_width_of_child(box, available_space);
}
void InlineFormattingContext::determine_height_of_child(Box const& box, AvailableSpace const& available_space)
{
return parent().determine_height_of_child(box, available_space);
}
}