style: Properly handle ::backdrop

Depends on D164807

Differential Revision: https://phabricator.services.mozilla.com/D164908
This commit is contained in:
Oriol Brufau 2022-12-17 02:04:02 +00:00 committed by Martin Robinson
parent b9e38017e7
commit 9a862da88f

View file

@ -966,6 +966,7 @@ impl Stylist {
element: E, element: E,
pseudo: &PseudoElement, pseudo: &PseudoElement,
rule_inclusion: RuleInclusion, rule_inclusion: RuleInclusion,
originating_element_style: &Arc<ComputedValues>,
parent_style: &Arc<ComputedValues>, parent_style: &Arc<ComputedValues>,
is_probe: bool, is_probe: bool,
matching_fn: Option<&dyn Fn(&PseudoElement) -> bool>, matching_fn: Option<&dyn Fn(&PseudoElement) -> bool>,
@ -976,6 +977,7 @@ impl Stylist {
let cascade_inputs = self.lazy_pseudo_rules( let cascade_inputs = self.lazy_pseudo_rules(
guards, guards,
element, element,
originating_element_style,
parent_style, parent_style,
pseudo, pseudo,
is_probe, is_probe,
@ -1105,6 +1107,7 @@ impl Stylist {
&self, &self,
guards: &StylesheetGuards, guards: &StylesheetGuards,
element: E, element: E,
originating_element_style: &Arc<ComputedValues>,
parent_style: &Arc<ComputedValues>, parent_style: &Arc<ComputedValues>,
pseudo: &PseudoElement, pseudo: &PseudoElement,
is_probe: bool, is_probe: bool,
@ -1134,7 +1137,8 @@ impl Stylist {
); );
matching_context.pseudo_element_matching_fn = matching_fn; matching_context.pseudo_element_matching_fn = matching_fn;
matching_context.extra_data.originating_element_style = Some(parent_style.clone()); matching_context.extra_data.originating_element_style =
Some(originating_element_style.clone());
self.push_applicable_declarations( self.push_applicable_declarations(
element, element,
@ -1165,7 +1169,8 @@ impl Stylist {
needs_selector_flags, needs_selector_flags,
); );
matching_context.pseudo_element_matching_fn = matching_fn; matching_context.pseudo_element_matching_fn = matching_fn;
matching_context.extra_data.originating_element_style = Some(parent_style.clone()); matching_context.extra_data.originating_element_style =
Some(originating_element_style.clone());
self.push_applicable_declarations( self.push_applicable_declarations(
element, element,