mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Introduce an NthIndexCache type and pipe it from ThreadLocalStyleContext to MatchingContext.
Some future refactoring here to pass fewer things as parameters would be nice.
This commit is contained in:
parent
05c03d5104
commit
48466bf876
11 changed files with 83 additions and 24 deletions
|
@ -413,10 +413,12 @@ where
|
|||
|
||||
let map = &mut self.context.thread_local.selector_flags;
|
||||
let bloom_filter = self.context.thread_local.bloom_filter.filter();
|
||||
let nth_index_cache = &mut self.context.thread_local.nth_index_cache;
|
||||
let mut matching_context =
|
||||
MatchingContext::new_for_visited(
|
||||
MatchingMode::Normal,
|
||||
Some(bloom_filter),
|
||||
Some(nth_index_cache),
|
||||
visited_handling,
|
||||
self.context.shared.quirks_mode(),
|
||||
);
|
||||
|
@ -486,11 +488,13 @@ where
|
|||
}
|
||||
|
||||
let bloom_filter = self.context.thread_local.bloom_filter.filter();
|
||||
let nth_index_cache = &mut self.context.thread_local.nth_index_cache;
|
||||
|
||||
let mut matching_context =
|
||||
MatchingContext::new_for_visited(
|
||||
MatchingMode::ForStatelessPseudoElement,
|
||||
Some(bloom_filter),
|
||||
Some(nth_index_cache),
|
||||
visited_handling,
|
||||
self.context.shared.quirks_mode(),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue