1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 16:05:07 +00:00

LibHTML: Make "children are inline" flag imperative

Instead of computing whether a block's children are inline based on the
first child, make it an imperatively-set flag.

This gives us some flexibility to ignore things like text nodes inside
a <table>, for example. I'm still unsure what the "correct" way to deal
with those will be. We'll find out sooner or later. :^)
This commit is contained in:
Andreas Kling 2019-10-17 23:32:08 +02:00
parent 41896ff521
commit 5e29238a49
4 changed files with 11 additions and 8 deletions

View file

@ -42,6 +42,9 @@ static RefPtr<LayoutNode> create_layout_tree(Node& node, const StyleProperties*
}
}
if (have_inline_children && !have_block_children)
layout_node->set_children_are_inline(true);
return layout_node;
}