diff options
Diffstat (limited to 'components/style/stylesheet_set.rs')
-rw-r--r-- | components/style/stylesheet_set.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs index 409978c3a9e..d2c3ad0f88e 100644 --- a/components/style/stylesheet_set.rs +++ b/components/style/stylesheet_set.rs @@ -585,6 +585,16 @@ where self.collection.len() == 0 } + /// Returns the `index`th stylesheet in the collection of author styles if present. + pub fn get(&self, index: usize) -> Option<&S> { + self.collection.get(index) + } + + /// Returns the number of author stylesheets. + pub fn len(&self) -> usize { + self.collection.len() + } + fn collection_for( &mut self, _sheet: &S, |