mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Separate the XBL and shadow dom styling bits.
Bug: 1441022 Reviewed-by: xidorn MozReview-Commit-ID: 2W0BmZ8wWXg
This commit is contained in:
parent
3b96fb2cbe
commit
ef4ea7cc49
7 changed files with 107 additions and 57 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue