mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09: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
Notes:
github-actions[bot]
2025-03-31 07:12:04 +00:00
Author: https://github.com/gmta
Commit: 86b831750d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4151
1 changed files with 5 additions and 10 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue