From 7edd25890d6346e4337448b3aecd232bff31d88f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 8 Feb 2018 16:03:47 +0100 Subject: [PATCH] style: Introduce AuthorStyleSheetSet. MozReview-Commit-ID: K3ciocPJuz3 --- components/style/stylesheet_set.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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 +where + S: StylesheetInDocument + PartialEq + 'static, +{ + /// The actual style sheets. + collection: SheetCollection, + /// The set of invalidations scheduled for this collection. + invalidations: StylesheetInvalidationSet, +} + +impl AuthorStylesheetSet +where + S: StylesheetInDocument + PartialEq + 'static, +{ + fn collection_for( + &mut self, + _sheet: &S, + _guard: &SharedRwLockReadGuard, + ) -> &mut SheetCollection { + &mut self.collection + } + + sheet_set_methods!("AuthorStylesheetSet"); +}