LibWeb: Allow block children of inlines

Hey, why not. We did all the hard work for display:inline-block already
and now we can just allow this.

This makes <a><h1>Hello friends!</h1></a> work :^)
This commit is contained in:
Andreas Kling 2020-06-15 17:38:44 +02:00
parent 96da15a8a4
commit 308c3ccc44
Notes: sideshowbarker 2024-07-19 05:38:29 +09:00
2 changed files with 1 additions and 7 deletions

View file

@ -587,8 +587,6 @@ LineBox& LayoutBlock::add_line_box()
void LayoutBlock::split_into_lines(LayoutBlock& container, LayoutMode layout_mode)
{
ASSERT(is_inline());
layout(layout_mode);
auto* line_box = &container.ensure_last_line_box();

View file

@ -154,11 +154,7 @@ LayoutDocument& LayoutNode::root()
void LayoutNode::split_into_lines(LayoutBlock& container, LayoutMode layout_mode)
{
for_each_child([&](auto& child) {
if (child.is_inline()) {
child.split_into_lines(container, layout_mode);
} else {
// FIXME: Support block children of inlines.
}
child.split_into_lines(container, layout_mode);
});
}