mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Split the invalidation collection from the invalidator step.
This is the first step in reusing the invalidation machinery for other stuff, potentially including QuerySelector / QuerySelectorAll.
This commit is contained in:
parent
ec00c660f0
commit
b9b3e592dd
4 changed files with 462 additions and 384 deletions
|
@ -244,6 +244,7 @@ impl ElementData {
|
|||
return InvalidationResult::empty();
|
||||
}
|
||||
|
||||
use invalidation::element::collector::StateAndAttrInvalidationCollector;
|
||||
use invalidation::element::invalidator::TreeStyleInvalidator;
|
||||
|
||||
debug!("invalidate_style_if_needed: {:?}, flags: {:?}, has_snapshot: {}, \
|
||||
|
@ -266,7 +267,8 @@ impl ElementData {
|
|||
nth_index_cache,
|
||||
);
|
||||
|
||||
let result = invalidator.invalidate();
|
||||
let result =
|
||||
invalidator.invalidate::<StateAndAttrInvalidationCollector>();
|
||||
unsafe { element.set_handled_snapshot() }
|
||||
debug_assert!(element.handled_snapshot());
|
||||
result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue