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

LibWeb: Resolve vertical margins against containing block width

We were incorrectly resolving them against the available width, which
may or may not be the same as the containing block width.

The specification for these properties says that percentages resolve
against the containing block width, so that's what we should do.
This commit is contained in:
Andreas Kling 2022-10-08 17:09:25 +02:00
parent 47e3daa40f
commit 4b74f36cd0
2 changed files with 9 additions and 9 deletions

View file

@ -67,9 +67,9 @@ private:
void layout_block_level_children(BlockContainer const&, LayoutMode, AvailableSpace const&);
void layout_inline_children(BlockContainer const&, LayoutMode, AvailableSpace const&);
static void resolve_vertical_box_model_metrics(Box const& box, AvailableSpace const&, LayoutState&);
static void resolve_vertical_box_model_metrics(Box const& box, LayoutState&);
void place_block_level_element_in_normal_flow_horizontally(Box const& child_box, AvailableSpace const&);
void place_block_level_element_in_normal_flow_vertically(Box const& child_box, AvailableSpace const&);
void place_block_level_element_in_normal_flow_vertically(Box const&);
void layout_list_item_marker(ListItemBox const&);