diff options
author | Andreas Kling <kling@serenityos.org> | 2022-10-26 11:32:25 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-10-27 13:02:27 +0200 |
commit | 4580e054f5c99df9030b4e45b33279d464253de7 (patch) | |
tree | 55c7fd75b09b4c8adf4f6dbb77822b47d0710cc7 /Userland/Libraries | |
parent | 3e1029304795c435250722d975f672e31869c133 (diff) | |
download | serenity-4580e054f5c99df9030b4e45b33279d464253de7.zip |
LibWeb: Place block-level boxes in both axes before doing inside layout
This ensures that static position calculations has access to final
box offsets.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp index 0728311c1e..fd7fa26c44 100644 --- a/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp @@ -369,8 +369,8 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain compute_width(box, available_space, layout_mode); - if (is<ReplacedBox>(box) || is<BlockContainer>(box)) - place_block_level_element_in_normal_flow_vertically(box); + place_block_level_element_in_normal_flow_vertically(box); + place_block_level_element_in_normal_flow_horizontally(box, available_space); if (box_state.has_definite_height()) { compute_height(box, available_space); @@ -393,9 +393,6 @@ void BlockFormattingContext::layout_block_level_box(Box const& box, BlockContain compute_inset(box); - if (is<ReplacedBox>(box) || is<BlockContainer>(box)) - place_block_level_element_in_normal_flow_horizontally(box, available_space); - if (is<ListItemBox>(box)) { layout_list_item_marker(static_cast<ListItemBox const&>(box)); } |