mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
style: Avoid generic soup and extra reference count bumps
This makes me a bit happier about the previous patch :) Differential Revision: https://phabricator.services.mozilla.com/D165236
This commit is contained in:
parent
cceb538eb0
commit
92742f7f90
7 changed files with 32 additions and 24 deletions
|
@ -967,7 +967,7 @@ impl Stylist {
|
|||
element: E,
|
||||
pseudo: &PseudoElement,
|
||||
rule_inclusion: RuleInclusion,
|
||||
originating_element_style: &Arc<ComputedValues>,
|
||||
originating_element_style: &ComputedValues,
|
||||
parent_style: &Arc<ComputedValues>,
|
||||
is_probe: bool,
|
||||
matching_fn: Option<&dyn Fn(&PseudoElement) -> bool>,
|
||||
|
@ -1113,7 +1113,7 @@ impl Stylist {
|
|||
&self,
|
||||
guards: &StylesheetGuards,
|
||||
element: E,
|
||||
originating_element_style: &Arc<ComputedValues>,
|
||||
originating_element_style: &ComputedValues,
|
||||
parent_style: &Arc<ComputedValues>,
|
||||
pseudo: &PseudoElement,
|
||||
is_probe: bool,
|
||||
|
@ -1144,7 +1144,7 @@ impl Stylist {
|
|||
|
||||
matching_context.pseudo_element_matching_fn = matching_fn;
|
||||
matching_context.extra_data.originating_element_style =
|
||||
Some(originating_element_style.clone());
|
||||
Some(originating_element_style);
|
||||
|
||||
self.push_applicable_declarations(
|
||||
element,
|
||||
|
@ -1176,7 +1176,7 @@ impl Stylist {
|
|||
);
|
||||
matching_context.pseudo_element_matching_fn = matching_fn;
|
||||
matching_context.extra_data.originating_element_style =
|
||||
Some(originating_element_style.clone());
|
||||
Some(originating_element_style);
|
||||
|
||||
self.push_applicable_declarations(
|
||||
element,
|
||||
|
@ -2398,7 +2398,7 @@ impl CascadeData {
|
|||
.matches(
|
||||
stylist.device(),
|
||||
element,
|
||||
context.extra_data.originating_element_style.as_ref(),
|
||||
context.extra_data.originating_element_style,
|
||||
&mut context.extra_data.cascade_input_flags,
|
||||
)
|
||||
.to_bool(/* unknown = */ false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue