diff --git a/components/style/gecko/arc_types.rs b/components/style/gecko/arc_types.rs index 41301b8af15..704369e225c 100644 --- a/components/style/gecko/arc_types.rs +++ b/components/style/gecko/arc_types.rs @@ -10,8 +10,7 @@ use gecko_bindings::bindings::{RawServoImportRule, RawServoSupportsRule}; use gecko_bindings::bindings::{RawServoKeyframe, RawServoKeyframesRule}; -use gecko_bindings::bindings::RawServoMediaRule; -use gecko_bindings::bindings::{RawServoNamespaceRule, RawServoPageRule}; +use gecko_bindings::bindings::{RawServoMediaRule, RawServoNamespaceRule, RawServoPageRule}; use gecko_bindings::bindings::{RawServoRuleNode, RawServoRuleNodeStrong, RawServoDocumentRule}; use gecko_bindings::bindings::ServoCssRules; use gecko_bindings::structs::{RawServoAnimationValue, RawServoDeclarationBlock, RawServoStyleRule, RawServoMediaList}; diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 6d50a0e83f2..c6744249a44 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -866,8 +866,8 @@ impl<'le> TElement for GeckoElement<'le> { } let declarations = unsafe { Gecko_GetStyleAttrDeclarationBlock(self.0) }; - let declarations: Option<&RawOffsetArc>> - = declarations.and_then(|s| s.as_arc_opt()); + let declarations: Option<&RawOffsetArc>> = + declarations.and_then(|s| s.as_arc_opt()); declarations.map(|s| s.borrow_arc()) } @@ -881,8 +881,8 @@ impl<'le> TElement for GeckoElement<'le> { fn get_smil_override(&self) -> Option>> { let declarations = unsafe { Gecko_GetSMILOverrideDeclarationBlock(self.0) }; - let declarations: Option<&RawOffsetArc>> - = declarations.and_then(|s| s.as_arc_opt()); + let declarations: Option<&RawOffsetArc>> = + declarations.and_then(|s| s.as_arc_opt()); declarations.map(|s| s.borrow_arc()) } @@ -1431,16 +1431,16 @@ impl<'le> PresentationalHintsSynthesizer for GeckoElement<'le> { } } let declarations = unsafe { Gecko_GetHTMLPresentationAttrDeclarationBlock(self.0) }; - let declarations: Option<&RawOffsetArc>> - = declarations.and_then(|s| s.as_arc_opt()); + let declarations: Option<&RawOffsetArc>> = + declarations.and_then(|s| s.as_arc_opt()); if let Some(decl) = declarations { hints.push( ApplicableDeclarationBlock::from_declarations(decl.clone_arc(), ServoCascadeLevel::PresHints) ); } let declarations = unsafe { Gecko_GetExtraContentStyleDeclarations(self.0) }; - let declarations: Option<&RawOffsetArc>> - = declarations.and_then(|s| s.as_arc_opt()); + let declarations: Option<&RawOffsetArc>> = + declarations.and_then(|s| s.as_arc_opt()); if let Some(decl) = declarations { hints.push( ApplicableDeclarationBlock::from_declarations(decl.clone_arc(), ServoCascadeLevel::PresHints) @@ -1474,8 +1474,8 @@ impl<'le> PresentationalHintsSynthesizer for GeckoElement<'le> { let active = self.get_state().intersects(NonTSPseudoClass::Active.state_flag()); if active { let declarations = unsafe { Gecko_GetActiveLinkAttrDeclarationBlock(self.0) }; - let declarations: Option<&RawOffsetArc>> - = declarations.and_then(|s| s.as_arc_opt()); + let declarations: Option<&RawOffsetArc>> = + declarations.and_then(|s| s.as_arc_opt()); if let Some(decl) = declarations { hints.push( ApplicableDeclarationBlock::from_declarations(decl.clone_arc(), ServoCascadeLevel::PresHints) diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index d6024e4a55a..346d4b38853 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -148,7 +148,9 @@ impl ComputedValuesInner { visited_style: None, flags: ComputedValueFlags::empty(), % for style_struct in data.style_structs: - ${style_struct.gecko_name}: Arc::into_raw_offset(style_structs::${style_struct.name}::default(pres_context)), + ${style_struct.gecko_name}: Arc::into_raw_offset( + style_structs::${style_struct.name}::default(pres_context) + ), % endfor } } diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs index 198f285e8d8..e2dfc46f74d 100644 --- a/components/style/servo/selector_parser.rs +++ b/components/style/servo/selector_parser.rs @@ -168,7 +168,7 @@ impl PseudoElement { } /// Stub, only Gecko needs this - pub fn pseudo_info(&self) -> () { () } + pub fn pseudo_info(&self) { () } } /// The type used for storing pseudo-class string arguments. diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 045c37c1acd..be2cf878d80 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -3358,7 +3358,6 @@ pub extern "C" fn Servo_StyleSet_HasStateDependency( pub extern "C" fn Servo_GetCustomPropertyValue(computed_values: ServoComputedValuesBorrowed, name: *const nsAString, value: *mut nsAString) -> bool { - let custom_properties = match computed_values.custom_properties() { Some(p) => p, None => return false, diff --git a/tests/unit/style/parsing/mod.rs b/tests/unit/style/parsing/mod.rs index 13998022ed5..a896e6f9aa3 100644 --- a/tests/unit/style/parsing/mod.rs +++ b/tests/unit/style/parsing/mod.rs @@ -11,7 +11,7 @@ use style::context::QuirksMode; use style::font_metrics::ServoMetricsProvider; use style::media_queries::{Device, MediaType}; use style::parser::ParserContext; -use style::properties::{ComputedValues, StyleBuilder}; +use style::properties::{ComputedValues, ComputedValuesInner, StyleBuilder}; use style::stylesheets::{CssRuleType, Origin}; use style::values::computed::{Context, ToComputedValue}; use style_traits::{PARSING_MODE_DEFAULT, ToCss, ParseError}; @@ -49,7 +49,7 @@ fn assert_computed_serialization(f: F, input: &'static str, output: &st T: ToComputedValue, C: ToCss { let viewport_size = TypedSize2D::new(0., 0.); - let initial_style = ComputedValues::initial_values(); + let initial_style = ComputedValuesInner::initial_values(); let device = Device::new(MediaType::Screen, viewport_size); let context = Context {