diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 3980700407f..c262af439ca 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -83,7 +83,6 @@ pub struct ComputedValues(::gecko_bindings::structs::mozilla::ComputedStyle); impl ComputedValues { pub fn new( device: &Device, - parent: Option<<&ComputedValues>, pseudo: Option<<&PseudoElement>, custom_properties: Option>, writing_mode: WritingMode, @@ -105,7 +104,6 @@ impl ComputedValues { % endfor ).to_outer( device.pres_context(), - parent, pseudo.map(|p| p.pseudo_info()) ) } @@ -120,7 +118,7 @@ impl ComputedValues { % for style_struct in data.style_structs: style_structs::${style_struct.name}::default(pres_context), % endfor - ).to_outer(pres_context, None, None) + ).to_outer(pres_context, None) } pub fn pseudo(&self) -> Option { @@ -195,7 +193,6 @@ impl Clone for ComputedValuesInner { } type PseudoInfo = (*mut structs::nsAtom, structs::CSSPseudoElementType); -type ParentComputedStyleInfo<'a> = Option< &'a ComputedValues>; impl ComputedValuesInner { pub fn new(custom_properties: Option>, @@ -222,7 +219,6 @@ impl ComputedValuesInner { fn to_outer( self, pres_context: RawGeckoPresContextBorrowed, - parent: ParentComputedStyleInfo, info: Option ) -> Arc { let (tag, ty) = if let Some(info) = info { @@ -231,21 +227,24 @@ impl ComputedValuesInner { (ptr::null_mut(), structs::CSSPseudoElementType::NotPseudo) }; - unsafe { self.to_outer_helper(pres_context, parent, ty, tag) } + unsafe { self.to_outer_helper(pres_context, ty, tag) } } unsafe fn to_outer_helper( self, pres_context: bindings::RawGeckoPresContextBorrowed, - parent: ParentComputedStyleInfo, pseudo_ty: structs::CSSPseudoElementType, pseudo_tag: *mut structs::nsAtom ) -> Arc { let arc = { let arc: Arc = Arc::new(uninitialized()); - bindings::Gecko_ComputedStyle_Init(&arc.0 as *const _ as *mut _, - parent, pres_context, - &self, pseudo_ty, pseudo_tag); + bindings::Gecko_ComputedStyle_Init( + &arc.0 as *const _ as *mut _, + pres_context, + &self, + pseudo_ty, + pseudo_tag + ); // We're simulating a move by having C++ do a memcpy and then forgetting // it on this end. forget(self); diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 9372068b052..a4396d0b4fd 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -2720,7 +2720,6 @@ impl ComputedValues { /// Create a new refcounted `ComputedValues` pub fn new( _: &Device, - _: Option<<&ComputedValues>, _: Option<<&PseudoElement>, custom_properties: Option>, writing_mode: WritingMode, @@ -3128,10 +3127,6 @@ pub struct StyleBuilder<'a> { /// The style we're getting reset structs from. reset_style: &'a ComputedValues, - /// The style we're inheriting from explicitly, or none if we're the root of - /// a subtree. - parent_style: Option<<&'a ComputedValues>, - /// The rule node representing the ordered list of rules matched for this /// node. pub rules: Option, @@ -3199,7 +3194,6 @@ impl<'a> StyleBuilder<'a> { StyleBuilder { device, - parent_style, inherited_style, inherited_style_ignoring_first_line, reset_style, @@ -3243,7 +3237,6 @@ impl<'a> StyleBuilder<'a> { parent_style.unwrap().pseudo() != Some(PseudoElement::FirstLine)); StyleBuilder { device, - parent_style, inherited_style, // None of our callers pass in ::first-line parent styles. inherited_style_ignoring_first_line: inherited_style, @@ -3485,7 +3478,6 @@ impl<'a> StyleBuilder<'a> { pub fn build(self) -> Arc { ComputedValues::new( self.device, - self.parent_style, self.pseudo, self.custom_properties, self.writing_mode,