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

@ -57,7 +57,7 @@ where
pub struct StateAndAttrInvalidationProcessor<'a, 'b: 'a, E: TElement> {
shared_context: &'a SharedStyleContext<'b>,
shadow_rule_datas: &'a [(&'b CascadeData, QuirksMode)],
cut_off_inheritance: bool,
matches_document_author_rules: bool,
element: E,
data: &'a mut ElementData,
matching_context: MatchingContext<'a, E::Impl>,
@ -68,7 +68,7 @@ impl<'a, 'b: 'a, E: TElement> StateAndAttrInvalidationProcessor<'a, 'b, E> {
pub fn new(
shared_context: &'a SharedStyleContext<'b>,
shadow_rule_datas: &'a [(&'b CascadeData, QuirksMode)],
cut_off_inheritance: bool,
matches_document_author_rules: bool,
element: E,
data: &'a mut ElementData,
nth_index_cache: &'a mut NthIndexCache,
@ -84,7 +84,7 @@ impl<'a, 'b: 'a, E: TElement> StateAndAttrInvalidationProcessor<'a, 'b, E> {
Self {
shared_context,
shadow_rule_datas,
cut_off_inheritance,
matches_document_author_rules,
element,
data,
matching_context,
@ -248,7 +248,7 @@ where
invalidates_self: false,
};
let document_origins = if self.cut_off_inheritance {
let document_origins = if !self.matches_document_author_rules {
Origin::UserAgent.into()
} else {
OriginSet::all()