mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Add sizeof for AuthorStyles.
This commit is contained in:
parent
d423e54d58
commit
f518e55c28
6 changed files with 97 additions and 88 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue