mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Change lazily_compute_pseudo_element_style to take an &Arc for the parent style.
This makes it easier to do later changes that want to pass an Arc here. Part 1 of the fix for Gecko bug 1364242: https://bugzilla.mozilla.org/show_bug.cgi?id=1364242
This commit is contained in:
parent
8f37de05b2
commit
351c7f7859
2 changed files with 5 additions and 5 deletions
|
@ -679,7 +679,7 @@ impl Stylist {
|
|||
element: &E,
|
||||
pseudo: &PseudoElement,
|
||||
rule_inclusion: RuleInclusion,
|
||||
parent_style: &ComputedValues,
|
||||
parent_style: &Arc<ComputedValues>,
|
||||
font_metrics: &FontMetricsProvider)
|
||||
-> Option<Arc<ComputedValues>>
|
||||
where E: TElement,
|
||||
|
|
|
@ -1479,7 +1479,7 @@ pub extern "C" fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed,
|
|||
&pseudo,
|
||||
RuleInclusion::All,
|
||||
&data.styles,
|
||||
ComputedValues::arc_from_borrowed(&inherited_style).map(|v| v.as_ref()),
|
||||
ComputedValues::arc_from_borrowed(&inherited_style),
|
||||
&*doc_data,
|
||||
is_probe
|
||||
);
|
||||
|
@ -1533,7 +1533,7 @@ fn get_pseudo_style(
|
|||
pseudo: &PseudoElement,
|
||||
rule_inclusion: RuleInclusion,
|
||||
styles: &ElementStyles,
|
||||
inherited_styles: Option<&ComputedValues>,
|
||||
inherited_styles: Option<&Arc<ComputedValues>>,
|
||||
doc_data: &PerDocumentStyleDataImpl,
|
||||
is_probe: bool,
|
||||
) -> Option<Arc<ComputedValues>> {
|
||||
|
@ -1563,7 +1563,7 @@ fn get_pseudo_style(
|
|||
},
|
||||
_ => {
|
||||
debug_assert!(inherited_styles.is_none() ||
|
||||
ptr::eq(inherited_styles.unwrap(),
|
||||
ptr::eq(&**inherited_styles.unwrap(),
|
||||
&**styles.primary()));
|
||||
styles.pseudos.get(&pseudo).cloned()
|
||||
},
|
||||
|
@ -1572,7 +1572,7 @@ fn get_pseudo_style(
|
|||
PseudoElementCascadeType::Precomputed => unreachable!("No anonymous boxes"),
|
||||
PseudoElementCascadeType::Lazy => {
|
||||
debug_assert!(inherited_styles.is_none() ||
|
||||
ptr::eq(inherited_styles.unwrap(),
|
||||
ptr::eq(&**inherited_styles.unwrap(),
|
||||
&**styles.primary()));
|
||||
let base = if pseudo.inherits_from_default_values() {
|
||||
doc_data.default_computed_values()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue