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:
Emilio Cobos Álvarez 2018-08-07 10:36:18 +00:00
parent bbcd7e414a
commit 0ae47b2659
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 12 additions and 21 deletions

View file

@ -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,