Browse Source

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.
Andreas Kling 2 years ago
parent
commit
d3069bceeb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp

+ 1 - 1
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)