mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-25 19:02:07 -05:00
LibWeb: Make TreeBuilder treat inline-flex's children correctly
We were skipping over inline flex containers when looking for an insertion parent. This made us not generate flex items in those cases. This commit changes the behavior, so that non-inline-level items can get inserted into an inline-outside parent, as long as the parent isn't just flow-inside.
This commit is contained in:
parent
71f7bb619d
commit
b6ab9a261f
1 changed files with 3 additions and 1 deletions
|
@ -124,7 +124,9 @@ void TreeBuilder::insert_node_into_inline_or_block_ancestor(Layout::Node& node,
|
|||
// Non-inlines can't be inserted into an inline parent, so find the nearest non-inline ancestor.
|
||||
auto& nearest_non_inline_ancestor = [&]() -> Layout::NodeWithStyle& {
|
||||
for (auto& ancestor : m_ancestor_stack.in_reverse()) {
|
||||
if (!ancestor.is_inline() || ancestor.is_inline_block())
|
||||
if (!ancestor.display().is_inline_outside())
|
||||
return ancestor;
|
||||
if (!ancestor.display().is_flow_inside())
|
||||
return ancestor;
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
|
|
Loading…
Add table
Reference in a new issue