mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -14,6 +14,7 @@ use properties::ComputedValues;
|
|||
use properties::longhands::display::computed_value as display;
|
||||
use rule_tree::StrongRuleNode;
|
||||
use selector_parser::{EAGER_PSEUDO_COUNT, PseudoElement, RestyleDamage};
|
||||
use selectors::NthIndexCache;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::StylesheetGuards;
|
||||
use std::fmt;
|
||||
|
@ -236,6 +237,7 @@ impl ElementData {
|
|||
element: E,
|
||||
shared_context: &SharedStyleContext,
|
||||
stack_limit_checker: Option<&StackLimitChecker>,
|
||||
nth_index_cache: Option<&mut NthIndexCache>,
|
||||
) -> InvalidationResult {
|
||||
// In animation-only restyle we shouldn't touch snapshot at all.
|
||||
if shared_context.traversal_flags.for_animation_only() {
|
||||
|
@ -261,7 +263,9 @@ impl ElementData {
|
|||
Some(self),
|
||||
shared_context,
|
||||
stack_limit_checker,
|
||||
nth_index_cache,
|
||||
);
|
||||
|
||||
let result = invalidator.invalidate();
|
||||
unsafe { element.set_handled_snapshot() }
|
||||
debug_assert!(element.handled_snapshot());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue