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

@ -136,20 +136,6 @@ impl LayoutBox {
.repair_style(context, node, new_style),
}
}
/// If this [`LayoutBox`] represents an unsplit (due to inline-block splits) inline
/// level item, unwrap and return it. If not, return `None`.
pub(crate) fn unsplit_inline_level_layout_box(self) -> Option<ArcRefCell<InlineItem>> {
let LayoutBox::InlineLevel(inline_level_boxes) = self else {
return None;
};
// If this element box has been subject to inline-block splitting, ignore it. It's
// not useful currently for incremental box tree construction.
if inline_level_boxes.len() != 1 {
return None;
}
inline_level_boxes.into_iter().next()
}
}
/// A wrapper for [`InnerDOMLayoutData`]. This is necessary to give the entire data