LibWeb: Move available_space_for_line() from IFC to BFC

This is preparation for allowing blocks with their own internal BFC to
flow around floating boxes in the parent BFC.

Note that IFC still has the available_space_for_line() API, which
returns space available within the IFC's own containing block, while the
BFC available_space_for_line() returns space available within its root.
This commit is contained in:
Andreas Kling 2022-03-17 12:30:30 +01:00
commit ef8a72ff3f
Notes: sideshowbarker 2024-07-17 17:11:33 +09:00
5 changed files with 36 additions and 32 deletions

View file

@ -65,6 +65,11 @@ protected:
OwnPtr<FormattingContext> layout_inside(Box const&, LayoutMode);
void compute_position(Box const&);
struct AvailableSpaceForLineInfo {
float left { 0 };
float right { 0 };
};
struct ShrinkToFitResult {
float preferred_width { 0 };
float preferred_minimum_width { 0 };