diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-02-08 16:03:47 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-02-09 19:45:03 +0100 |
commit | 7edd25890d6346e4337448b3aecd232bff31d88f (patch) | |
tree | 5b566fc0e599096ea965eb9231ddd0118f7e4de0 /components/style/stylesheet_set.rs | |
parent | 5e8dd8a2d4011e0767159d70f6f9858eec18dbe4 (diff) | |
download | servo-7edd25890d6346e4337448b3aecd232bff31d88f.tar.gz servo-7edd25890d6346e4337448b3aecd232bff31d88f.zip |
style: Introduce AuthorStyleSheetSet.
MozReview-Commit-ID: K3ciocPJuz3
Diffstat (limited to 'components/style/stylesheet_set.rs')
-rw-r--r-- | components/style/stylesheet_set.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs index fcaebe5b7c6..6f41be45fe7 100644 --- a/components/style/stylesheet_set.rs +++ b/components/style/stylesheet_set.rs @@ -587,3 +587,29 @@ where } } } + +/// The set of stylesheets effective for a given XBL binding or Shadow Root. +pub struct AuthorStylesheetSet<S> +where + S: StylesheetInDocument + PartialEq + 'static, +{ + /// The actual style sheets. + collection: SheetCollection<S>, + /// The set of invalidations scheduled for this collection. + invalidations: StylesheetInvalidationSet, +} + +impl<S> AuthorStylesheetSet<S> +where + S: StylesheetInDocument + PartialEq + 'static, +{ + fn collection_for( + &mut self, + _sheet: &S, + _guard: &SharedRwLockReadGuard, + ) -> &mut SheetCollection<S> { + &mut self.collection + } + + sheet_set_methods!("AuthorStylesheetSet"); +} |