1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

LibWeb: Move layout box rect helpers into FormattingContext

These are only used during layout, and always within formatting context
code, so we might as well put them in FormattingContext and avoid having
to pass the LayoutState around all the time.
This commit is contained in:
Andreas Kling 2023-05-31 10:18:34 +02:00
parent 4f08fcde29
commit 42470d837e
10 changed files with 155 additions and 152 deletions

View file

@ -173,13 +173,4 @@ struct LayoutState {
LayoutState const& m_root;
};
CSSPixelRect absolute_content_rect(Box const&, LayoutState const&);
CSSPixelRect margin_box_rect(Box const&, LayoutState const&);
CSSPixelRect margin_box_rect_in_ancestor_coordinate_space(Box const& box, Box const& ancestor_box, LayoutState const&);
CSSPixelRect border_box_rect(Box const&, LayoutState const&);
CSSPixelRect border_box_rect_in_ancestor_coordinate_space(Box const& box, Box const& ancestor_box, LayoutState const&);
CSSPixelRect content_box_rect(Box const&, LayoutState const&);
CSSPixelRect content_box_rect_in_ancestor_coordinate_space(Box const& box, Box const& ancestor_box, LayoutState const&);
CSSPixels box_baseline(LayoutState const& state, Box const& box);
}