mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Allow passing an nth-index-cache to the invalidation code.
This commit is contained in:
parent
e13f5a656a
commit
aba1cf8cd5
4 changed files with 114 additions and 73 deletions
|
@ -169,8 +169,11 @@ pub trait DomTraversal<E: TElement> : Sync {
|
|||
if !traversal_flags.for_animation_only() {
|
||||
// Invalidate our style, and that of our siblings and
|
||||
// descendants as needed.
|
||||
//
|
||||
// FIXME(emilio): an nth-index cache could be worth here, even
|
||||
// if temporary?
|
||||
let invalidation_result =
|
||||
data.invalidate_style_if_needed(root, shared_context, None);
|
||||
data.invalidate_style_if_needed(root, shared_context, None, None);
|
||||
|
||||
if invalidation_result.has_invalidated_siblings() {
|
||||
let actual_root =
|
||||
|
@ -895,7 +898,8 @@ where
|
|||
child_data.invalidate_style_if_needed(
|
||||
child,
|
||||
&context.shared,
|
||||
Some(&context.thread_local.stack_limit_checker)
|
||||
Some(&context.thread_local.stack_limit_checker),
|
||||
Some(&mut context.thread_local.nth_index_cache)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue