aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/stylesheet_set.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-06-02 17:38:41 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-06-03 14:43:44 +0200
commit5c66d3c77a88281c295c20d0f1edda05186acedc (patch)
tree434bf4d83c359eb1901cc3f351aae8d630a99485 /components/style/stylesheet_set.rs
parentb5232c940dfcb911ba3741106017bc0a962cc45f (diff)
downloadservo-5c66d3c77a88281c295c20d0f1edda05186acedc.tar.gz
servo-5c66d3c77a88281c295c20d0f1edda05186acedc.zip
Cache effective media query results.
This patch also makes RulesIterator not iterate over rules for which we don't process nested rules. There's nothing depending on this behavior right now afaik, and this will make us duplicate less code in following patches. Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461 MozReview-Commit-ID: CaMFQtAVnJF
Diffstat (limited to 'components/style/stylesheet_set.rs')
-rw-r--r--components/style/stylesheet_set.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs
index 5746446d2cf..15bbf285a69 100644
--- a/components/style/stylesheet_set.rs
+++ b/components/style/stylesheet_set.rs
@@ -175,6 +175,11 @@ impl StylesheetSet {
self.dirty = false;
self.invalidations.flush(document_element);
+ self.iter()
+ }
+
+ /// Returns an iterator over the current list of stylesheets.
+ pub fn iter(&self) -> StylesheetIterator {
StylesheetIterator(self.entries.iter())
}