mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add sizeof for AuthorStyles.
This commit is contained in:
parent
d423e54d58
commit
f518e55c28
6 changed files with 97 additions and 88 deletions
|
@ -25,8 +25,7 @@ use stylesheets::{CssRule, StylesheetInDocument};
|
|||
/// need to be restyled. Whether it represents a whole subtree or just a single
|
||||
/// element is determined by whether the invalidation is stored in the
|
||||
/// StylesheetInvalidationSet's invalid_scopes or invalid_elements table.
|
||||
#[derive(Debug, Eq, Hash, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
|
||||
#[derive(Debug, Eq, Hash, MallocSizeOf, PartialEq)]
|
||||
enum Invalidation {
|
||||
/// An element with a given id.
|
||||
ID(Atom),
|
||||
|
@ -98,7 +97,7 @@ impl Invalidation {
|
|||
///
|
||||
/// TODO(emilio): We might be able to do the same analysis for media query
|
||||
/// changes too (or even selector changes?).
|
||||
#[cfg_attr(feature = "servo", derive(MallocSizeOf))]
|
||||
#[derive(MallocSizeOf)]
|
||||
pub struct StylesheetInvalidationSet {
|
||||
/// The subtrees we know we have to restyle so far.
|
||||
invalid_scopes: FnvHashSet<Invalidation>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue