diff options
author | Tobias Christiansen <tobyase@serenityos.org> | 2021-09-29 17:18:49 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-29 17:55:57 +0200 |
commit | 610f14992a93e6902c5282d044c917b28eb868cf (patch) | |
tree | 29b8272d34ddba4745d2ad35fd7a178c4cbcf21e /Userland | |
parent | 881e9d1341a38dc81996a549fd37bd3871078416 (diff) | |
download | serenity-610f14992a93e6902c5282d044c917b28eb868cf.zip |
LibWeb: Flexbox: Wrap inline Nodes if their parent is display: flex
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp index a6b0ef59f2..9dbf3bd2ac 100644 --- a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp +++ b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp @@ -33,6 +33,10 @@ static Layout::Node& insertion_parent_for_inline_node(Layout::NodeWithStyle& lay if (layout_parent.is_inline() && !layout_parent.is_inline_block()) return layout_parent; + if (layout_parent.computed_values().display() == CSS::Display::Flex) { + layout_parent.append_child(layout_parent.create_anonymous_wrapper()); + } + if (!layout_parent.has_children() || layout_parent.children_are_inline()) return layout_parent; |