style: Introduce AuthorStyleSheetSet.
draft
--- a/servo/components/style/stylesheet_set.rs
+++ b/servo/components/style/stylesheet_set.rs
@@ -582,8 +582,34 @@ where
for origin in origins.iter() {
// We don't know what happened, assume the worse.
self.collections
.borrow_mut_for_origin(&origin)
.set_data_validity_at_least(DataValidity::FullyInvalid);
}
}
}
+
+/// 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");
+}