mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -633,10 +633,12 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator<'a, 'b, E>
|
|||
debug!("TreeStyleInvalidator::process_invalidation({:?}, {:?}, {:?})",
|
||||
self.element, invalidation, invalidation_kind);
|
||||
|
||||
// FIXME(bholley): Consider passing an nth-index cache here.
|
||||
let mut context =
|
||||
MatchingContext::new_for_visited(
|
||||
MatchingMode::Normal,
|
||||
None,
|
||||
None,
|
||||
VisitedHandlingMode::AllLinksVisitedAndUnvisited,
|
||||
self.shared_context.quirks_mode(),
|
||||
);
|
||||
|
@ -946,12 +948,14 @@ impl<'a, 'b: 'a, E> InvalidationCollector<'a, 'b, E>
|
|||
// whether any parent had a snapshot, and whether those snapshots were
|
||||
// taken due to an element class/id change, but it's not clear it'd be
|
||||
// worth it.
|
||||
//
|
||||
// FIXME(bholley): Consider passing an nth-index cache here.
|
||||
let mut now_context =
|
||||
MatchingContext::new_for_visited(MatchingMode::Normal, None,
|
||||
MatchingContext::new_for_visited(MatchingMode::Normal, None, None,
|
||||
VisitedHandlingMode::AllLinksUnvisited,
|
||||
self.shared_context.quirks_mode());
|
||||
let mut then_context =
|
||||
MatchingContext::new_for_visited(MatchingMode::Normal, None,
|
||||
MatchingContext::new_for_visited(MatchingMode::Normal, None, None,
|
||||
VisitedHandlingMode::AllLinksUnvisited,
|
||||
self.shared_context.quirks_mode());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue