Revert "layout: Add incremental box tree construction for inline floats and abspos" (#37888)

This reverts commit 19ceccc8eb due to a
significant increase in resident memory usage (See
https://github.com/servo/servo/issues/37887).

Testing: This is a revert due to a regression

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-07-05 11:45:58 +08:00 committed by GitHub
parent e1a891ea96
commit c65cd1eadd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 66 deletions

View file

@ -604,17 +604,13 @@ impl<'dom> BlockContainerBuilder<'dom, '_> {
) {
if let Some(builder) = self.inline_formatting_context_builder.as_mut() {
if !builder.is_empty() {
let constructor = || {
ArcRefCell::new(AbsolutelyPositionedBox::construct(
let inline_level_box =
builder.push_absolutely_positioned_box(AbsolutelyPositionedBox::construct(
self.context,
info,
display_inside,
contents,
))
};
let old_layout_box = box_slot.take_layout_box_if_undamaged(info.damage);
let inline_level_box =
builder.push_absolutely_positioned_box(constructor, old_layout_box);
));
box_slot.set(LayoutBox::InlineLevel(vec![inline_level_box]));
return;
}
@ -641,17 +637,13 @@ impl<'dom> BlockContainerBuilder<'dom, '_> {
) {
if let Some(builder) = self.inline_formatting_context_builder.as_mut() {
if !builder.is_empty() {
let constructor = || {
ArcRefCell::new(FloatBox::construct(
self.context,
info,
display_inside,
contents,
self.propagated_data,
))
};
let old_layout_box = box_slot.take_layout_box_if_undamaged(info.damage);
let inline_level_box = builder.push_float_box(constructor, old_layout_box);
let inline_level_box = builder.push_float_box(FloatBox::construct(
self.context,
info,
display_inside,
contents,
self.propagated_data,
));
box_slot.set(LayoutBox::InlineLevel(vec![inline_level_box]));
return;
}