From d3069bceeb5a1d0b807691102e2d1f071af3e69d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 6 Oct 2022 20:57:29 +0200 Subject: [PATCH] LibWeb: Only consider inline-outside flag when choosing insertion type Now that we don't have to deal with the ad-hoc "inline" flag on layout nodes anymore, we're free to simply obey the inline-outside flag from the CSS display value when choosing whether to insert as an inline-level node or not. --- Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp index adfed89f0d..f588bd6f00 100644 --- a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp +++ b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp @@ -112,7 +112,7 @@ static Layout::Node& insertion_parent_for_block_node(Layout::NodeWithStyle& layo void TreeBuilder::insert_node_into_inline_or_block_ancestor(Layout::Node& node, CSS::Display display, AppendOrPrepend mode) { - if (display.is_inline_outside() && !(display.is_flow_root_inside() && m_ancestor_stack.last().display().is_flex_inside())) { + if (display.is_inline_outside()) { // Inlines can be inserted into the nearest ancestor. auto& insertion_point = insertion_parent_for_inline_node(m_ancestor_stack.last()); if (mode == AppendOrPrepend::Prepend)