mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
style: avoid selector refcount churn during invalidation.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
258efb70df
commit
1b32709d95
7 changed files with 103 additions and 79 deletions
|
@ -17,6 +17,7 @@ use selector_parser::{EAGER_PSEUDO_COUNT, PseudoElement, RestyleDamage};
|
|||
use selectors::NthIndexCache;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::StylesheetGuards;
|
||||
use smallvec::SmallVec;
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
@ -259,8 +260,14 @@ impl ElementData {
|
|||
return InvalidationResult::empty();
|
||||
}
|
||||
|
||||
let mut xbl_stylists = SmallVec::<[_; 3]>::new();
|
||||
let cut_off_inheritance =
|
||||
element.each_xbl_stylist(|s| xbl_stylists.push(s));
|
||||
|
||||
let mut processor = StateAndAttrInvalidationProcessor::new(
|
||||
shared_context,
|
||||
&xbl_stylists,
|
||||
cut_off_inheritance,
|
||||
element,
|
||||
self,
|
||||
nth_index_cache,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue