Bug 1357583: style: Make effective_rules return an iterator, stop refcounting the Device. r=heycam

This makes the code cleaner, and also documents the fact that effective_rules
recurses into imports.

No we're not adding the imported stylesheets twice, and we share code with the
invalidation analysis.

MozReview-Commit-ID: DOF2AViTlmR
This commit is contained in:
Emilio Cobos Álvarez 2017-05-27 00:02:35 +02:00
parent ebd6f47be3
commit ac5872b48c
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 446 additions and 308 deletions

View file

@ -74,7 +74,7 @@ impl PerDocumentStyleDataImpl {
///
/// Implies also a stylesheet flush.
pub fn reset_device(&mut self, guard: &SharedRwLockReadGuard) {
Arc::get_mut(self.stylist.device_mut()).unwrap().reset();
self.stylist.device_mut().reset();
self.stylesheets.force_dirty();
self.flush_stylesheets::<GeckoElement>(guard, None);
}