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
This commit is contained in:
Emilio Cobos Álvarez 2017-06-02 17:38:41 +02:00
parent b5232c940d
commit 5c66d3c77a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 242 additions and 87 deletions

View file

@ -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())
}