mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 23:57:25 +00:00
LibWeb: Make BFC always drive IFC
Instead of allowing FormattingContext to instantiate an IFC for anything that has inline children, move this logic to BFC. This is fine, since only BFC deals with blocks having inline children anyway.
This commit is contained in:
@@ -432,11 +432,15 @@ void BlockFormattingContext::layout_block_level_children(BlockContainer const& b
|
||||
|
||||
OwnPtr<FormattingContext> independent_formatting_context;
|
||||
if (child_box.can_have_children()) {
|
||||
independent_formatting_context = create_independent_formatting_context_if_needed(m_state, child_box);
|
||||
if (independent_formatting_context)
|
||||
independent_formatting_context->run(child_box, layout_mode);
|
||||
else
|
||||
layout_block_level_children(verify_cast<BlockContainer>(child_box), layout_mode);
|
||||
if (child_box.children_are_inline()) {
|
||||
layout_inline_children(verify_cast<BlockContainer>(child_box), layout_mode);
|
||||
} else {
|
||||
independent_formatting_context = create_independent_formatting_context_if_needed(m_state, child_box);
|
||||
if (independent_formatting_context)
|
||||
independent_formatting_context->run(child_box, layout_mode);
|
||||
else
|
||||
layout_block_level_children(verify_cast<BlockContainer>(child_box), layout_mode);
|
||||
}
|
||||
}
|
||||
|
||||
compute_height(child_box, m_state);
|
||||
|
||||
Reference in New Issue
Block a user