servo: Merge #18384 - style: Don't waste a whole selector map for each class / id in the document (from emilio:invalidation-map-bloat); r=bholley

On top of #18375, only last commit needs review.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4721ef81fd7fb6ee15546a6abe140a66ce0280e8
This commit is contained in:
Emilio Cobos Álvarez
2017-09-05 12:51:17 -05:00
parent 947b1215ad
commit b70bbee2fd
15 changed files with 383 additions and 50 deletions

View File

@@ -188,4 +188,9 @@ impl<T> PerPseudoElementMap<T> {
}
Ok(self.entries[index].as_mut().unwrap())
}
/// Get an iterator for the entries.
pub fn iter(&self) -> ::std::slice::Iter<Option<T>> {
self.entries.iter()
}
}