mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Layout children a bit earlier in BlockFormattingContext
We don't need to duplicate this piece of code. No functional changes.
This commit is contained in:
parent
04ba375cc7
commit
86b831750d
|
|
@ -75,12 +75,12 @@ void BlockFormattingContext::run(AvailableSpace const& available_space)
|
|||
return;
|
||||
}
|
||||
|
||||
if (is<FieldSetBox>(root())) {
|
||||
if (root().children_are_inline())
|
||||
layout_inline_children(root(), available_space);
|
||||
else
|
||||
layout_block_level_children(root(), available_space);
|
||||
if (root().children_are_inline())
|
||||
layout_inline_children(root(), available_space);
|
||||
else
|
||||
layout_block_level_children(root(), available_space);
|
||||
|
||||
if (is<FieldSetBox>(root())) {
|
||||
auto const& fieldset_box = as<FieldSetBox>(root());
|
||||
if (!(fieldset_box.has_rendered_legend())) {
|
||||
return;
|
||||
|
|
@ -107,11 +107,6 @@ void BlockFormattingContext::run(AvailableSpace const& available_space)
|
|||
return;
|
||||
}
|
||||
|
||||
if (root().children_are_inline())
|
||||
layout_inline_children(root(), available_space);
|
||||
else
|
||||
layout_block_level_children(root(), available_space);
|
||||
|
||||
// Assign collapsed margin left after children layout of formatting context to the last child box
|
||||
if (m_margin_state.current_collapsed_margin() != 0) {
|
||||
for (auto* child_box = root().last_child_of_type<Box>(); child_box; child_box = child_box->previous_sibling_of_type<Box>()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user