Stop slicing selectors when noting dependencies, and match with an offset instead.

MozReview-Commit-ID: KLqmdRKygO0
This commit is contained in:
Bobby Holley 2017-06-01 16:47:41 -07:00
parent 5ddabef636
commit 1281fd9353
6 changed files with 76 additions and 55 deletions

View file

@ -1134,6 +1134,7 @@ impl Stylist {
let mut results = BitVec::new();
self.selectors_for_cache_revalidation.lookup(*element, &mut |selector_and_hashes| {
results.push(matches_selector(&selector_and_hashes.selector,
0,
&selector_and_hashes.hashes,
element,
&mut matching_context,
@ -1424,8 +1425,8 @@ pub struct Rule {
}
impl SelectorMapEntry for Rule {
fn selector(&self) -> &Selector<SelectorImpl> {
&self.selector
fn selector(&self) -> SelectorIter<SelectorImpl> {
self.selector.iter()
}
fn hashes(&self) -> &AncestorHashes {