style: Separate the XBL and shadow dom styling bits.

Bug: 1441022
Reviewed-by: xidorn
MozReview-Commit-ID: 2W0BmZ8wWXg
This commit is contained in:
Emilio Cobos Álvarez 2018-03-05 12:50:04 +01:00
parent 3b96fb2cbe
commit ef4ea7cc49
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 107 additions and 57 deletions

View file

@ -260,18 +260,16 @@ impl ElementData {
return InvalidationResult::empty();
}
let mut xbl_stylists = SmallVec::<[_; 3]>::new();
// FIXME(emilio): This is wrong, needs to account for ::slotted rules
// that may apply to elements down the tree.
let cut_off_inheritance =
let mut non_document_styles = SmallVec::<[_; 3]>::new();
let matches_doc_author_rules =
element.each_applicable_non_document_style_rule_data(|data, quirks_mode| {
xbl_stylists.push((data, quirks_mode))
non_document_styles.push((data, quirks_mode))
});
let mut processor = StateAndAttrInvalidationProcessor::new(
shared_context,
&xbl_stylists,
cut_off_inheritance,
&non_document_styles,
matches_doc_author_rules,
element,
self,
nth_index_cache,