1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

LibWeb: Move should_treat_{width,height}_as_auto() to FormattingContext

These are not specific to BFC, so let's move them up to the super class
so that other layout classes can use them.
This commit is contained in:
Andreas Kling 2022-11-03 18:44:40 +01:00
parent 5fbe245406
commit db318aece0
4 changed files with 15 additions and 15 deletions

View file

@ -82,6 +82,9 @@ public:
protected:
FormattingContext(Type, LayoutState&, Box const&, FormattingContext* parent = nullptr);
static bool should_treat_width_as_auto(Box const&, AvailableSpace const&);
static bool should_treat_height_as_auto(Box const&, AvailableSpace const&);
float calculate_fit_content_size(float min_content_size, float max_content_size, AvailableSize const&) const;
OwnPtr<FormattingContext> layout_inside(Box const&, LayoutMode, AvailableSpace const&);