Add sizeof for AuthorStyles.

This commit is contained in:
Xidorn Quan 2018-02-19 15:12:13 +11:00
parent d423e54d58
commit f518e55c28
6 changed files with 97 additions and 88 deletions

View file

@ -13,7 +13,7 @@ use std::{mem, slice};
use stylesheets::{Origin, OriginSet, OriginSetIterator, PerOrigin, StylesheetInDocument};
/// Entry for a StylesheetSet.
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
#[derive(MallocSizeOf)]
struct StylesheetSetEntry<S>
where
S: StylesheetInDocument + PartialEq + 'static,
@ -103,8 +103,7 @@ where
}
/// The validity of the data in a given cascade origin.
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Ord, PartialEq, PartialOrd)]
pub enum DataValidity {
/// The origin is clean, all the data already there is valid, though we may
/// have new sheets at the end.
@ -231,7 +230,7 @@ where
}
}
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
#[derive(MallocSizeOf)]
struct SheetCollection<S>
where
S: StylesheetInDocument + PartialEq + 'static,
@ -558,6 +557,7 @@ where
}
/// The set of stylesheets effective for a given XBL binding or Shadow Root.
#[derive(MallocSizeOf)]
pub struct AuthorStylesheetSet<S>
where
S: StylesheetInDocument + PartialEq + 'static,