diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-12-11 15:40:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-11 14:40:34 +0000 |
commit | 9d11d584f63a5bc10df40bf7d7ef5811c7eb47ba (patch) | |
tree | d7e6936df3a775c1eb53710a31bc330d65a31df9 /components/layout_2020/dom.rs | |
parent | f1b8d49e7721053d5cc65780ad2521bec59d77ce (diff) | |
download | servo-9d11d584f63a5bc10df40bf7d7ef5811c7eb47ba.tar.gz servo-9d11d584f63a5bc10df40bf7d7ef5811c7eb47ba.zip |
layout: Clean up inline layout data types a bit (#34563)
- Remove the `LayoutBox::InlineBox` variant that was only used for
inline level boxes. Now they are stored in `LayoutBox::InlineLevel`
along with other kinds of out-of-flow and atomic inline items.
- Reduce the size of `InlineItem` by 260 bytes per item by using atomic
indirection / pointers. This adds a bit of overhead to access items in
exchange for a lot of memory saved.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Diffstat (limited to 'components/layout_2020/dom.rs')
-rw-r--r-- | components/layout_2020/dom.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/components/layout_2020/dom.rs b/components/layout_2020/dom.rs index 1b561969121..570226c88bd 100644 --- a/components/layout_2020/dom.rs +++ b/components/layout_2020/dom.rs @@ -22,7 +22,6 @@ use crate::cell::ArcRefCell; use crate::context::LayoutContext; use crate::dom_traversal::WhichPseudoElement; use crate::flexbox::FlexLevelBox; -use crate::flow::inline::inline_box::InlineBox; use crate::flow::inline::InlineItem; use crate::flow::BlockLevelBox; use crate::geom::PhysicalSize; @@ -41,8 +40,6 @@ pub struct InnerDOMLayoutData { pub(super) enum LayoutBox { DisplayContents, BlockLevel(ArcRefCell<BlockLevelBox>), - #[allow(dead_code)] - InlineBox(ArcRefCell<InlineBox>), InlineLevel(ArcRefCell<InlineItem>), FlexLevel(ArcRefCell<FlexLevelBox>), TaffyItemBox(ArcRefCell<TaffyItemBox>), |