mirror of
https://github.com/servo/servo.git
synced 2025-07-26 00:30:22 +01:00
style: Introduce AuthorStyleSheetSet.
MozReview-Commit-ID: K3ciocPJuz3
This commit is contained in:
parent
5e8dd8a2d4
commit
7edd25890d
1 changed files with 26 additions and 0 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue