mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Cleanup invalidation processor constructor.
It used to be this way because of lifetime issues (plus the shadow datas were in RwLocks at some point IIRC). Now we guarantee that as long as the element is away the cascade data is as well, so we don't need to thread it around. Differential Revision: https://phabricator.services.mozilla.com/D2768
This commit is contained in:
parent
bbcd7e414a
commit
0ae47b2659
2 changed files with 12 additions and 21 deletions
|
@ -16,7 +16,6 @@ use selector_parser::{PseudoElement, RestyleDamage, EAGER_PSEUDO_COUNT};
|
|||
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};
|
||||
|
@ -273,16 +272,8 @@ impl ElementData {
|
|||
return InvalidationResult::empty();
|
||||
}
|
||||
|
||||
let mut non_document_styles = SmallVec::<[_; 3]>::new();
|
||||
let matches_doc_author_rules =
|
||||
element.each_applicable_non_document_style_rule_data(|data, quirks_mode, host| {
|
||||
non_document_styles.push((data, quirks_mode, host.map(|h| h.opaque())))
|
||||
});
|
||||
|
||||
let mut processor = StateAndAttrInvalidationProcessor::new(
|
||||
shared_context,
|
||||
&non_document_styles,
|
||||
matches_doc_author_rules,
|
||||
element,
|
||||
self,
|
||||
nth_index_cache,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue