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:
parent
41896ff521
commit
5e29238a49
4 changed files with 11 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue