diff options
Diffstat (limited to 'components/layout_2020/fragment_tree/box_fragment.rs')
-rw-r--r-- | components/layout_2020/fragment_tree/box_fragment.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/layout_2020/fragment_tree/box_fragment.rs b/components/layout_2020/fragment_tree/box_fragment.rs index d0c96b3ea03..30be154caf1 100644 --- a/components/layout_2020/fragment_tree/box_fragment.rs +++ b/components/layout_2020/fragment_tree/box_fragment.rs @@ -5,6 +5,7 @@ use app_units::Au; use atomic_refcell::AtomicRefCell; use base::print_tree::PrintTree; +use malloc_size_of_derive::MallocSizeOf; use servo_arc::Arc as ServoArc; use style::Zero; use style::computed_values::border_collapse::T as BorderCollapse; @@ -24,6 +25,7 @@ use crate::table::SpecificTableGridInfo; use crate::taffy::SpecificTaffyGridInfo; /// Describes how a [`BoxFragment`] paints its background. +#[derive(MallocSizeOf)] pub(crate) enum BackgroundMode { /// Draw the normal [`BoxFragment`] background as well as the extra backgrounds /// based on the style and positioning rectangles in this data structure. @@ -36,12 +38,14 @@ pub(crate) enum BackgroundMode { Normal, } +#[derive(MallocSizeOf)] pub(crate) struct ExtraBackground { + #[conditional_malloc_size_of] pub style: ServoArc<ComputedValues>, pub rect: PhysicalRect<Au>, } -#[derive(Clone, Debug)] +#[derive(Clone, Debug, MallocSizeOf)] pub(crate) enum SpecificLayoutInfo { Grid(Box<SpecificTaffyGridInfo>), TableCellWithCollapsedBorders, @@ -49,9 +53,11 @@ pub(crate) enum SpecificLayoutInfo { TableWrapper, } +#[derive(MallocSizeOf)] pub(crate) struct BoxFragment { pub base: BaseFragment, + #[conditional_malloc_size_of] pub style: ServoArc<ComputedValues>, pub children: Vec<Fragment>, |