diff options
author | Andreas Kling <kling@serenityos.org> | 2022-10-06 20:34:55 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-10-06 21:08:50 +0200 |
commit | c7d592dd011797eaed5f23b9dc9c511c7bb3863e (patch) | |
tree | 0702c59119d0f04c8c4da031ec885642417c3417 /Userland/Libraries | |
parent | 97bbb630c88d12d92533636f7d04415b12f11053 (diff) | |
download | serenity-c7d592dd011797eaed5f23b9dc9c511c7bb3863e.zip |
LibWeb: Generate a BlockContainer box for display:inline-flex
We were previously generating an InlineNode, which is not a Box. We need
some type of Box to do flex layout, so let's just make a BlockContainer.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Element.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index 3d3f90b91b..000e750013 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -308,7 +308,8 @@ RefPtr<Layout::Node> Element::create_layout_node_for_display_type(DOM::Document& return adopt_ref(*new Layout::BlockContainer(document, element, move(style))); if (display.is_flow_inside()) return adopt_ref(*new Layout::InlineNode(document, element, move(style))); - + if (display.is_flex_inside()) + return adopt_ref(*new Layout::BlockContainer(document, element, move(style))); dbgln_if(LIBWEB_CSS_DEBUG, "FIXME: Support display: {}", display.to_string()); return adopt_ref(*new Layout::InlineNode(document, element, move(style))); } |