diff options
author | Tobias Christiansen <tobyase@serenityos.org> | 2021-10-04 18:26:52 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-04 18:54:52 +0200 |
commit | 6283086c2f4db1ebc2643d027fd148b1262b6774 (patch) | |
tree | c8ed819788b62f13d73e026d4c8b4a4962cbaea6 /Userland/Libraries/LibWeb/Layout | |
parent | 6102a486ee5672cdcb31adbc92470e151702623f (diff) | |
download | serenity-6283086c2f4db1ebc2643d027fd148b1262b6774.zip |
LibWeb: Handle inline-block children of a flex-container as block
We don't want to wrap the inline-blocks the same way we want to wrap
pure inline children.
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp index 9dbf3bd2ac..98d3d92f35 100644 --- a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp +++ b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp @@ -97,7 +97,7 @@ void TreeBuilder::create_layout_tree(DOM::Node& dom_node, TreeBuilder::Context& if (!dom_node.parent_or_shadow_host()) { m_layout_root = layout_node; } else { - if (layout_node->is_inline()) { + if (layout_node->is_inline() && !(layout_node->is_inline_block() && m_parent_stack.last()->computed_values().display() == CSS::Display::Flex)) { // Inlines can be inserted into the nearest ancestor. auto& insertion_point = insertion_parent_for_inline_node(*m_parent_stack.last()); insertion_point.append_child(*layout_node); |