Bug 1543837 - Reformat recent changes.
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 11 Apr 2019 22:12:41 +0200
changeset 469115 ee6cfdd22388644a6e49baf1a47de29b8ef651e7
parent 469114 fccfea2bfef3e02847bf897e7cb25fd7d51a6a8d
child 469116 6873807a36e8200a7b545d63d6fbfb37316a8dad
push id35856
push usercsabou@mozilla.com
push dateFri, 12 Apr 2019 03:19:48 +0000
treeherdermozilla-central@940684cd1065 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1543837
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1543837 - Reformat recent changes.
servo/components/selectors/parser.rs
servo/components/style/error_reporting.rs
servo/components/style/font_metrics.rs
servo/components/style/gecko/wrapper.rs
servo/components/style/gecko_string_cache/mod.rs
servo/components/style/stylesheets/rule_parser.rs
servo/components/style/values/computed/angle.rs
servo/components/style/values/computed/box.rs
servo/components/style/values/computed/font.rs
servo/components/style/values/computed/length.rs
servo/components/style/values/computed/mod.rs
servo/components/style/values/generics/border.rs
servo/components/style/values/generics/color.rs
servo/components/style/values/generics/counters.rs
servo/components/style/values/generics/grid.rs
servo/components/style/values/generics/image.rs
servo/components/style/values/generics/mod.rs
servo/components/style/values/generics/text.rs
servo/components/style/values/generics/transform.rs
servo/components/style/values/generics/ui.rs
servo/components/style/values/mod.rs
servo/components/style/values/resolved/mod.rs
servo/components/style/values/specified/align.rs
servo/components/style/values/specified/background.rs
servo/components/style/values/specified/border.rs
servo/components/style/values/specified/box.rs
servo/components/style/values/specified/color.rs
servo/components/style/values/specified/font.rs
servo/components/style/values/specified/length.rs
servo/components/style/values/specified/list.rs
servo/components/style/values/specified/mod.rs
servo/components/style/values/specified/position.rs
servo/components/style/values/specified/svg.rs
servo/components/style/values/specified/text.rs
servo/components/style/values/specified/ui.rs
servo/components/style_derive/to_animated_value.rs
servo/components/style_derive/to_computed_value.rs
servo/components/style_derive/to_resolved_value.rs
servo/components/to_shmem/lib.rs
servo/components/to_shmem_derive/to_shmem.rs
--- a/servo/components/selectors/parser.rs
+++ b/servo/components/selectors/parser.rs
@@ -218,17 +218,19 @@ pub trait Parser<'i> {
         _prefix: &<Self::Impl as SelectorImpl>::NamespacePrefix,
     ) -> Option<<Self::Impl as SelectorImpl>::NamespaceUrl> {
         None
     }
 }
 
 #[derive(Clone, Debug, Eq, PartialEq, ToShmem)]
 #[shmem(no_bounds)]
-pub struct SelectorList<Impl: SelectorImpl>(#[shmem(field_bound)] pub SmallVec<[Selector<Impl>; 1]>);
+pub struct SelectorList<Impl: SelectorImpl>(
+    #[shmem(field_bound)] pub SmallVec<[Selector<Impl>; 1]>,
+);
 
 impl<Impl: SelectorImpl> SelectorList<Impl> {
     /// Parse a comma-separated list of Selectors.
     /// <https://drafts.csswg.org/selectors/#grouping>
     ///
     /// Return the Selectors or Err if there is an invalid selector.
     pub fn parse<'i, 't, P>(
         parser: &P,
@@ -505,17 +507,19 @@ pub fn namespace_empty_string<Impl: Sele
 /// id, and class are all relatively cheap, whereas matching pseudo-classes might
 /// be expensive (depending on the pseudo-class). Since authors tend to put the
 /// pseudo-classes on the right, it's faster to start matching on the left.
 ///
 /// This reordering doesn't change the semantics of selector matching, and we
 /// handle it in to_css to make it invisible to serialization.
 #[derive(Clone, Eq, PartialEq, ToShmem)]
 #[shmem(no_bounds)]
-pub struct Selector<Impl: SelectorImpl>(#[shmem(field_bound)] ThinArc<SpecificityAndFlags, Component<Impl>>);
+pub struct Selector<Impl: SelectorImpl>(
+    #[shmem(field_bound)] ThinArc<SpecificityAndFlags, Component<Impl>>,
+);
 
 impl<Impl: SelectorImpl> Selector<Impl> {
     #[inline]
     pub fn specificity(&self) -> u32 {
         self.0.header.header.specificity()
     }
 
     #[inline]
@@ -829,17 +833,20 @@ impl Combinator {
 #[derive(Clone, Eq, PartialEq, ToShmem)]
 #[shmem(no_bounds)]
 pub enum Component<Impl: SelectorImpl> {
     Combinator(Combinator),
 
     ExplicitAnyNamespace,
     ExplicitNoNamespace,
     DefaultNamespace(#[shmem(field_bound)] Impl::NamespaceUrl),
-    Namespace(#[shmem(field_bound)] Impl::NamespacePrefix, #[shmem(field_bound)] Impl::NamespaceUrl),
+    Namespace(
+        #[shmem(field_bound)] Impl::NamespacePrefix,
+        #[shmem(field_bound)] Impl::NamespaceUrl,
+    ),
 
     ExplicitUniversalType,
     LocalName(LocalName<Impl>),
 
     ID(#[shmem(field_bound)] Impl::Identifier),
     Class(#[shmem(field_bound)] Impl::ClassName),
 
     AttributeInNoNamespaceExists {
--- a/servo/components/style/error_reporting.rs
+++ b/servo/components/style/error_reporting.rs
@@ -1,28 +1,32 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 //! Types used to report parsing errors.
 
 #![deny(missing_docs)]
 
+use crate::selector_parser::SelectorImpl;
 use crate::stylesheets::UrlExtraData;
 use cssparser::{BasicParseErrorKind, ParseErrorKind, SourceLocation, Token};
+use selectors::SelectorList;
 use std::fmt;
 use style_traits::ParseError;
-use crate::selector_parser::{SelectorImpl};
-use selectors::SelectorList;
 
 /// Errors that can be encountered while parsing CSS.
 #[derive(Debug)]
 pub enum ContextualParseError<'a> {
     /// A property declaration was not recognized.
-    UnsupportedPropertyDeclaration(&'a str, ParseError<'a>, Option<&'a SelectorList<SelectorImpl>>),
+    UnsupportedPropertyDeclaration(
+        &'a str,
+        ParseError<'a>,
+        Option<&'a SelectorList<SelectorImpl>>,
+    ),
     /// A font face descriptor was not recognized.
     UnsupportedFontFaceDescriptor(&'a str, ParseError<'a>),
     /// A font feature values descriptor was not recognized.
     UnsupportedFontFeatureValuesDescriptor(&'a str, ParseError<'a>),
     /// A keyframe rule was not valid.
     InvalidKeyframeRule(&'a str, ParseError<'a>),
     /// A font feature values rule was not valid.
     InvalidFontFeatureValuesRule(&'a str, ParseError<'a>),
--- a/servo/components/style/font_metrics.rs
+++ b/servo/components/style/font_metrics.rs
@@ -38,17 +38,21 @@ pub trait FontMetricsProvider {
         _context: &crate::values::computed::Context,
         _base_size: crate::values::specified::length::FontBaseSize,
         _orientation: FontMetricsOrientation,
     ) -> FontMetrics {
         Default::default()
     }
 
     /// Get default size of a given language and generic family.
-    fn get_size(&self, font_name: &Atom, font_family: crate::values::computed::font::GenericFontFamily) -> Au;
+    fn get_size(
+        &self,
+        font_name: &Atom,
+        font_family: crate::values::computed::font::GenericFontFamily,
+    ) -> Au;
 
     /// Construct from a shared style context
     fn create_from(context: &SharedStyleContext) -> Self
     where
         Self: Sized;
 }
 
 // TODO: Servo's font metrics provider will probably not live in this crate, so this will
--- a/servo/components/style/gecko/wrapper.rs
+++ b/servo/components/style/gecko/wrapper.rs
@@ -1103,19 +1103,19 @@ impl structs::FontSizePrefs {
     fn size_for_generic(&self, font_family: GenericFontFamily) -> Au {
         Au(match font_family {
             GenericFontFamily::None => self.mDefaultVariableSize,
             GenericFontFamily::Serif => self.mDefaultSerifSize,
             GenericFontFamily::SansSerif => self.mDefaultSansSerifSize,
             GenericFontFamily::Monospace => self.mDefaultMonospaceSize,
             GenericFontFamily::Cursive => self.mDefaultCursiveSize,
             GenericFontFamily::Fantasy => self.mDefaultFantasySize,
-            GenericFontFamily::MozEmoji => {
-                unreachable!("Should never get here, since this doesn't (yet) appear on font family")
-            },
+            GenericFontFamily::MozEmoji => unreachable!(
+                "Should never get here, since this doesn't (yet) appear on font family"
+            ),
         })
     }
 }
 
 impl<'le> TElement for GeckoElement<'le> {
     type ConcreteNode = GeckoNode<'le>;
     type FontMetricsProvider = GeckoFontMetricsProvider;
     type TraversalChildrenIterator = GeckoChildrenIterator<'le>;
--- a/servo/components/style/gecko_string_cache/mod.rs
+++ b/servo/components/style/gecko_string_cache/mod.rs
@@ -121,17 +121,21 @@ impl Borrow<WeakAtom> for Atom {
     #[inline]
     fn borrow(&self) -> &WeakAtom {
         self
     }
 }
 
 impl ToShmem for Atom {
     fn to_shmem(&self, _builder: &mut SharedMemoryBuilder) -> ManuallyDrop<Self> {
-        assert!(self.is_static(), "ToShmem failed for Atom: must be a static atom: {}", self);
+        assert!(
+            self.is_static(),
+            "ToShmem failed for Atom: must be a static atom: {}",
+            self
+        );
 
         ManuallyDrop::new(Atom(self.0))
     }
 }
 
 impl Eq for WeakAtom {}
 impl PartialEq for WeakAtom {
     #[inline]
--- a/servo/components/style/stylesheets/rule_parser.rs
+++ b/servo/components/style/stylesheets/rule_parser.rs
@@ -4,17 +4,17 @@
 
 //! Parsing of the stylesheet contents.
 
 use crate::counter_style::{parse_counter_style_body, parse_counter_style_name_definition};
 use crate::error_reporting::ContextualParseError;
 use crate::font_face::parse_font_face_block;
 use crate::media_queries::MediaList;
 use crate::parser::{Parse, ParserContext};
-use crate::properties::{parse_property_declaration_list};
+use crate::properties::parse_property_declaration_list;
 use crate::selector_parser::{SelectorImpl, SelectorParser};
 use crate::shared_lock::{Locked, SharedRwLock};
 use crate::str::starts_with_ignore_ascii_case;
 use crate::stylesheets::document_rule::DocumentCondition;
 use crate::stylesheets::font_feature_values_rule::parse_family_name_list;
 use crate::stylesheets::keyframes_rule::parse_keyframe_list;
 use crate::stylesheets::stylesheet::Namespaces;
 use crate::stylesheets::supports_rule::SupportsCondition;
--- a/servo/components/style/values/computed/angle.rs
+++ b/servo/components/style/values/computed/angle.rs
@@ -9,17 +9,28 @@ use crate::values::CSSFloat;
 use crate::Zero;
 use std::f64::consts::PI;
 use std::fmt::{self, Write};
 use std::{f32, f64};
 use style_traits::{CssWriter, ToCss};
 
 /// A computed angle in degrees.
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-#[derive(Add, Animate, Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd, ToAnimatedZero, ToResolvedValue)]
+#[derive(
+    Add,
+    Animate,
+    Clone,
+    Copy,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    PartialOrd,
+    ToAnimatedZero,
+    ToResolvedValue,
+)]
 pub struct Angle(CSSFloat);
 
 impl ToCss for Angle {
     fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
     where
         W: Write,
     {
         self.degrees().to_css(dest)?;
--- a/servo/components/style/values/computed/box.rs
+++ b/servo/components/style/values/computed/box.rs
@@ -10,17 +10,19 @@ use crate::values::generics::box_::Anima
 use crate::values::generics::box_::Perspective as GenericPerspective;
 use crate::values::generics::box_::VerticalAlign as GenericVerticalAlign;
 use crate::values::specified::box_ as specified;
 
 pub use crate::values::specified::box_::{AnimationName, Appearance, BreakBetween, BreakWithin};
 pub use crate::values::specified::box_::{Clear as SpecifiedClear, Float as SpecifiedFloat};
 pub use crate::values::specified::box_::{Contain, Display, Overflow};
 pub use crate::values::specified::box_::{OverflowAnchor, OverflowClipBox, OverscrollBehavior};
-pub use crate::values::specified::box_::{ScrollSnapAlign, ScrollSnapAxis, ScrollSnapStrictness, ScrollSnapType};
+pub use crate::values::specified::box_::{
+    ScrollSnapAlign, ScrollSnapAxis, ScrollSnapStrictness, ScrollSnapType,
+};
 pub use crate::values::specified::box_::{TouchAction, TransitionProperty, WillChange};
 
 /// A computed value for the `vertical-align` property.
 pub type VerticalAlign = GenericVerticalAlign<LengthPercentage>;
 
 /// A computed value for the `animation-iteration-count` property.
 pub type AnimationIterationCount = GenericAnimationIterationCount<Number>;
 
--- a/servo/components/style/values/computed/font.rs
+++ b/servo/components/style/values/computed/font.rs
@@ -35,17 +35,19 @@ pub use crate::values::computed::Length 
 pub use crate::values::specified::font::{FontSynthesis, MozScriptSizeMultiplier};
 pub use crate::values::specified::font::{XLang, XTextZoom};
 
 /// A value for the font-weight property per:
 ///
 /// https://drafts.csswg.org/css-fonts-4/#propdef-font-weight
 ///
 /// This is effectively just a `Number`.
-#[derive(Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq, ToCss, ToResolvedValue)]
+#[derive(
+    Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq, ToCss, ToResolvedValue,
+)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
 pub struct FontWeight(pub Number);
 
 impl Hash for FontWeight {
     fn hash<H: Hasher>(&self, hasher: &mut H) {
         hasher.write_u64((self.0 * 10000.).trunc() as u64);
     }
 }
@@ -185,17 +187,19 @@ pub struct FontFamily {
     pub is_system_font: bool,
 }
 
 impl FontFamily {
     #[inline]
     /// Get default font family as `serif` which is a generic font-family
     pub fn serif() -> Self {
         FontFamily {
-            families: FontFamilyList::new(Box::new([SingleFontFamily::Generic(GenericFontFamily::Serif)])),
+            families: FontFamilyList::new(Box::new([SingleFontFamily::Generic(
+                GenericFontFamily::Serif,
+            )])),
             is_system_font: false,
         }
     }
 }
 
 #[cfg(feature = "gecko")]
 impl MallocSizeOf for FontFamily {
     fn size_of(&self, _ops: &mut MallocSizeOfOps) -> usize {
@@ -422,18 +426,20 @@ impl PartialEq for FontFamilyList {
     fn eq(&self, other: &FontFamilyList) -> bool {
         let self_list = self.shared_font_list();
         let other_list = other.shared_font_list();
 
         if self_list.mNames.len() != other_list.mNames.len() {
             return false;
         }
         for (a, b) in self_list.mNames.iter().zip(other_list.mNames.iter()) {
-            if a.mSyntax != b.mSyntax || a.mName.mRawPtr != b.mName.mRawPtr ||
-                a.mGeneric != b.mGeneric {
+            if a.mSyntax != b.mSyntax ||
+                a.mName.mRawPtr != b.mName.mRawPtr ||
+                a.mGeneric != b.mGeneric
+            {
                 return false;
             }
         }
         true
     }
 }
 
 #[cfg(feature = "gecko")]
@@ -454,29 +460,25 @@ impl FontFamilyList {
         unsafe {
             fontlist = bindings::Gecko_SharedFontList_Create();
             names = &mut (*fontlist).mNames;
             names.ensure_capacity(families.len());
         };
 
         for family in families.iter() {
             match *family {
-                SingleFontFamily::FamilyName(ref f) => {
-                    unsafe {
-                        bindings::Gecko_nsTArray_FontFamilyName_AppendNamed(
-                            names,
-                            f.name.as_ptr(),
-                            f.syntax,
-                        );
-                    }
+                SingleFontFamily::FamilyName(ref f) => unsafe {
+                    bindings::Gecko_nsTArray_FontFamilyName_AppendNamed(
+                        names,
+                        f.name.as_ptr(),
+                        f.syntax,
+                    );
                 },
-                SingleFontFamily::Generic(family) => {
-                    unsafe {
-                        bindings::Gecko_nsTArray_FontFamilyName_AppendGeneric(names, family);
-                    }
+                SingleFontFamily::Generic(family) => unsafe {
+                    bindings::Gecko_nsTArray_FontFamilyName_AppendGeneric(names, family);
                 },
             }
         }
 
         FontFamilyList::SharedFontList(unsafe { RefPtr::from_addrefed(fontlist) })
     }
 
     /// Return iterator of SingleFontFamily
@@ -542,17 +544,27 @@ impl<'a> Iterator for FontFamilyNameIter
             Some(item)
         } else {
             None
         }
     }
 }
 
 /// Preserve the readability of text when font fallback occurs
-#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq, ToCss, ToResolvedValue)]
+#[derive(
+    Animate,
+    Clone,
+    ComputeSquaredDistance,
+    Copy,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    ToCss,
+    ToResolvedValue,
+)]
 pub enum FontSizeAdjust {
     #[animation(error)]
     /// None variant
     None,
     /// Number variant
     Number(CSSFloat),
 }
 
@@ -826,17 +838,19 @@ impl ToCss for FontStyle {
             },
         }
     }
 }
 
 /// A value for the font-stretch property per:
 ///
 /// https://drafts.csswg.org/css-fonts-4/#propdef-font-stretch
-#[derive(Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq, ToCss, ToResolvedValue)]
+#[derive(
+    Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq, ToCss, ToResolvedValue,
+)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
 pub struct FontStretch(pub NonNegativePercentage);
 
 impl FontStretch {
     /// 100%
     pub fn hundred() -> Self {
         FontStretch(NonNegativePercentage::hundred())
     }
--- a/servo/components/style/values/computed/length.rs
+++ b/servo/components/style/values/computed/length.rs
@@ -5,18 +5,17 @@
 //! `<length>` computed values, and related ones.
 
 use super::{Context, Number, Percentage, ToComputedValue};
 use crate::values::animated::ToAnimatedValue;
 use crate::values::computed::NonNegativeNumber;
 use crate::values::distance::{ComputeSquaredDistance, SquaredDistance};
 use crate::values::generics::length as generics;
 use crate::values::generics::length::{
-    GenericLengthPercentageOrNormal, GenericLengthOrNumber,
-    GenericMaxSize, GenericSize,
+    GenericLengthOrNumber, GenericLengthPercentageOrNormal, GenericMaxSize, GenericSize,
 };
 use crate::values::generics::NonNegative;
 use crate::values::specified::length::ViewportPercentageLength;
 use crate::values::specified::length::{AbsoluteLength, FontBaseSize, FontRelativeLength};
 use crate::values::{specified, CSSFloat};
 use crate::Zero;
 use app_units::Au;
 use ordered_float::NotNan;
@@ -778,17 +777,18 @@ impl From<Au> for NonNegativeLength {
 impl From<NonNegativeLength> for Au {
     #[inline]
     fn from(non_negative_len: NonNegativeLength) -> Self {
         Au::from(non_negative_len.0)
     }
 }
 
 /// Either a computed NonNegativeLengthPercentage or the `normal` keyword.
-pub type NonNegativeLengthPercentageOrNormal = GenericLengthPercentageOrNormal<NonNegativeLengthPercentage>;
+pub type NonNegativeLengthPercentageOrNormal =
+    GenericLengthPercentageOrNormal<NonNegativeLengthPercentage>;
 
 /// Either a non-negative `<length>` or a `<number>`.
 pub type NonNegativeLengthOrNumber = GenericLengthOrNumber<NonNegativeLength, NonNegativeNumber>;
 
 /// A type for possible values for min- and max- flavors of width, height,
 /// block-size, and inline-size.
 #[allow(missing_docs)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
--- a/servo/components/style/values/computed/mod.rs
+++ b/servo/components/style/values/computed/mod.rs
@@ -530,17 +530,19 @@ impl From<CSSFloat> for GreaterThanOrEqu
 impl From<GreaterThanOrEqualToOneNumber> for CSSFloat {
     #[inline]
     fn from(number: GreaterThanOrEqualToOneNumber) -> CSSFloat {
         number.0
     }
 }
 
 #[allow(missing_docs)]
-#[derive(Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq, ToCss, ToResolvedValue)]
+#[derive(
+    Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq, ToCss, ToResolvedValue,
+)]
 #[repr(C, u8)]
 pub enum NumberOrPercentage {
     Percentage(Percentage),
     Number(Number),
 }
 
 impl NumberOrPercentage {
     fn clamp_to_non_negative(self) -> Self {
--- a/servo/components/style/values/generics/border.rs
+++ b/servo/components/style/values/generics/border.rs
@@ -70,17 +70,21 @@ pub use self::GenericBorderImageSlice as
     ToAnimatedValue,
     ToAnimatedZero,
     ToComputedValue,
     ToCss,
     ToResolvedValue,
     ToShmem,
 )]
 #[repr(C)]
-pub struct GenericBorderCornerRadius<L>(#[css(field_bound)] #[shmem(field_bound)] pub Size2D<L>);
+pub struct GenericBorderCornerRadius<L>(
+    #[css(field_bound)]
+    #[shmem(field_bound)]
+    pub Size2D<L>,
+);
 
 pub use self::GenericBorderCornerRadius as BorderCornerRadius;
 
 impl<L> BorderCornerRadius<L> {
     /// Trivially create a `BorderCornerRadius`.
     pub fn new(w: L, h: L) -> Self {
         BorderCornerRadius(Size2D::new(w, h))
     }
@@ -109,17 +113,21 @@ impl<L: Zero> Zero for BorderCornerRadiu
     ToAnimatedValue,
     ToAnimatedZero,
     ToComputedValue,
     ToCss,
     ToResolvedValue,
     ToShmem,
 )]
 #[repr(transparent)]
-pub struct BorderSpacing<L>(#[css(field_bound)] #[shmem(field_bound)] pub Size2D<L>);
+pub struct BorderSpacing<L>(
+    #[css(field_bound)]
+    #[shmem(field_bound)]
+    pub Size2D<L>,
+);
 
 impl<L> BorderSpacing<L> {
     /// Trivially create a `BorderCornerRadius`.
     pub fn new(w: L, h: L) -> Self {
         BorderSpacing(Size2D::new(w, h))
     }
 }
 
--- a/servo/components/style/values/generics/color.rs
+++ b/servo/components/style/values/generics/color.rs
@@ -35,17 +35,17 @@ pub enum GenericColor<RGBA> {
 
     /// A linear combination of numeric color and currentcolor.
     /// The formula is: `color * ratios.bg + currentcolor * ratios.fg`.
     Complex {
         /// The actual numeric color.
         color: RGBA,
         /// The ratios of mixing between numeric and currentcolor.
         ratios: ComplexColorRatios,
-    }
+    },
 }
 
 pub use self::GenericColor as Color;
 
 impl<RGBA> Color<RGBA> {
     /// Create a color based upon the specified ratios.
     pub fn with_ratios(color: RGBA, ratios: ComplexColorRatios) -> Self {
         if ratios == ComplexColorRatios::NUMERIC {
--- a/servo/components/style/values/generics/counters.rs
+++ b/servo/components/style/values/generics/counters.rs
@@ -10,17 +10,25 @@ use crate::computed_values::list_style_t
 use crate::values::generics::CounterStyleOrNone;
 #[cfg(feature = "gecko")]
 use crate::values::specified::Attr;
 use crate::values::CustomIdent;
 use std::ops::Deref;
 
 /// A name / value pair for counters.
 #[derive(
-    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub struct CounterPair<Integer> {
     /// The name of the counter.
     pub name: CustomIdent,
     /// The value of the counter / increment / etc.
     pub value: Integer,
 }
 
--- a/servo/components/style/values/generics/grid.rs
+++ b/servo/components/style/values/generics/grid.rs
@@ -374,17 +374,19 @@ where
     }
 
     Ok(())
 }
 
 /// The initial argument of the `repeat` function.
 ///
 /// <https://drafts.csswg.org/css-grid/#typedef-track-repeat>
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+)]
 pub enum RepeatCount<Integer> {
     /// A positive integer. This is allowed only for `<track-repeat>` and `<fixed-repeat>`
     Number(Integer),
     /// An `<auto-fill>` keyword allowed only for `<auto-repeat>`
     AutoFill,
     /// An `<auto-fit>` keyword allowed only for `<auto-repeat>`
     AutoFit,
 }
@@ -409,17 +411,26 @@ impl Parse for RepeatCount<specified::In
         }
     }
 }
 
 /// The structure containing `<line-names>` and `<track-size>` values.
 ///
 /// It can also hold `repeat()` function parameters, which expands into the respective
 /// values in its computed form.
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
+)]
 #[css(function = "repeat")]
 pub struct TrackRepeat<L, I> {
     /// The number of times for the value to be repeated (could also be `auto-fit` or `auto-fill`)
     pub count: RepeatCount<I>,
     /// `<line-names>` accompanying `<track_size>` values.
     ///
     /// If there's no `<line-names>`, then it's represented by an empty vector.
     /// For N `<track-size>` values, there will be N+1 `<line-names>`, and so this vector's
--- a/servo/components/style/values/generics/image.rs
+++ b/servo/components/style/values/generics/image.rs
@@ -11,17 +11,19 @@ use crate::values::serialize_atom_identi
 use crate::Atom;
 use servo_arc::Arc;
 use std::fmt::{self, Write};
 use style_traits::{CssWriter, ToCss};
 
 /// An [image].
 ///
 /// [image]: https://drafts.csswg.org/css-images/#image-values
-#[derive(Clone, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem,
+)]
 pub enum Image<Gradient, MozImageRect, ImageUrl> {
     /// A `<url()>` image.
     Url(ImageUrl),
     /// A `<gradient>` image.  Gradients are rather large, and not nearly as
     /// common as urls, so we box them here to keep the size of this enum sane.
     Gradient(Box<Gradient>),
     /// A `-moz-image-rect` image.  Also fairly large and rare.
     Rect(Box<MozImageRect>),
@@ -68,17 +70,19 @@ pub enum GradientKind<LineDirection, Len
     Radial(
         EndingShape<Length, LengthPercentage>,
         Position,
         Option<Angle>,
     ),
 }
 
 /// A radial gradient's ending shape.
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+)]
 pub enum EndingShape<Length, LengthPercentage> {
     /// A circular gradient.
     Circle(Circle<Length>),
     /// An elliptic gradient.
     Ellipse(Ellipse<LengthPercentage>),
 }
 
 /// A circle shape.
@@ -86,52 +90,68 @@ pub enum EndingShape<Length, LengthPerce
 pub enum Circle<Length> {
     /// A circle radius.
     Radius(Length),
     /// A circle extent.
     Extent(ShapeExtent),
 }
 
 /// An ellipse shape.
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+)]
 pub enum Ellipse<LengthPercentage> {
     /// An ellipse pair of radii.
     Radii(LengthPercentage, LengthPercentage),
     /// An ellipse extent.
     Extent(ShapeExtent),
 }
 
 /// <https://drafts.csswg.org/css-images/#typedef-extent-keyword>
 #[allow(missing_docs)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
 #[derive(
-    Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    Parse,
+    PartialEq,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub enum ShapeExtent {
     ClosestSide,
     FarthestSide,
     ClosestCorner,
     FarthestCorner,
     Contain,
     Cover,
 }
 
 /// A gradient item.
 /// <https://drafts.csswg.org/css-images-4/#color-stop-syntax>
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+)]
 pub enum GradientItem<Color, LengthPercentage> {
     /// A color stop.
     ColorStop(ColorStop<Color, LengthPercentage>),
     /// An interpolation hint.
     InterpolationHint(LengthPercentage),
 }
 
 /// A color stop.
 /// <https://drafts.csswg.org/css-images/#typedef-color-stop-list>
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+)]
 pub struct ColorStop<Color, LengthPercentage> {
     /// The color of this stop.
     pub color: Color,
     /// The position of this stop.
     pub position: Option<LengthPercentage>,
 }
 
 /// Specified values for a paint worklet.
@@ -165,17 +185,25 @@ impl ToCss for PaintWorklet {
 }
 
 /// Values for `moz-image-rect`.
 ///
 /// `-moz-image-rect(<uri>, top, right, bottom, left);`
 #[allow(missing_docs)]
 #[css(comma, function)]
 #[derive(
-    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub struct MozImageRect<NumberOrPercentage, MozImageRectUrl> {
     pub url: MozImageRectUrl,
     pub top: NumberOrPercentage,
     pub right: NumberOrPercentage,
     pub bottom: NumberOrPercentage,
     pub left: NumberOrPercentage,
 }
--- a/servo/components/style/values/generics/mod.rs
+++ b/servo/components/style/values/generics/mod.rs
@@ -39,17 +39,27 @@ pub mod text;
 pub mod transform;
 pub mod ui;
 pub mod url;
 
 // https://drafts.csswg.org/css-counter-styles/#typedef-symbols-type
 #[allow(missing_docs)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
 #[derive(
-    Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    Parse,
+    PartialEq,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub enum SymbolsType {
     Cyclic,
     Numeric,
     Alphabetic,
     Symbolic,
     Fixed,
 }
--- a/servo/components/style/values/generics/text.rs
+++ b/servo/components/style/values/generics/text.rs
@@ -33,19 +33,17 @@ impl<N, I> InitialLetter<N, I> {
     /// Returns `normal`.
     #[inline]
     pub fn normal() -> Self {
         InitialLetter::Normal
     }
 }
 
 /// A generic spacing value for the `letter-spacing` and `word-spacing` properties.
-#[derive(
-    Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
-)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
 pub enum Spacing<Value> {
     /// `normal`
     Normal,
     /// `<value>`
     Value(Value),
 }
 
 impl<Value> Spacing<Value> {
@@ -70,19 +68,20 @@ impl<Value> Spacing<Value> {
         }
         parse(context, input).map(Spacing::Value)
     }
 }
 
 #[cfg(feature = "gecko")]
 fn line_height_moz_block_height_enabled(context: &ParserContext) -> bool {
     use crate::gecko_bindings::structs;
-    context.in_ua_sheet() || unsafe {
-        structs::StaticPrefs_sVarCache_layout_css_line_height_moz_block_height_content_enabled
-    }
+    context.in_ua_sheet() ||
+        unsafe {
+            structs::StaticPrefs_sVarCache_layout_css_line_height_moz_block_height_content_enabled
+        }
 }
 
 /// A generic value for the `line-height` property.
 #[derive(
     Animate,
     Clone,
     ComputeSquaredDistance,
     Copy,
--- a/servo/components/style/values/generics/transform.rs
+++ b/servo/components/style/values/generics/transform.rs
@@ -127,17 +127,25 @@ impl<H, V, D> TransformOrigin<H, V, D> {
     }
 }
 
 fn is_same<N: PartialEq>(x: &N, y: &N) -> bool {
     x == y
 }
 
 #[derive(
-    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 /// A single operation in the list of a `transform` value
 pub enum TransformOperation<Angle, Number, Length, Integer, LengthPercentage>
 where
     Angle: Zero,
     LengthPercentage: Zero,
     Number: PartialEq,
 {
@@ -234,17 +242,25 @@ where
     AccumulateMatrix {
         from_list: Transform<TransformOperation<Angle, Number, Length, Integer, LengthPercentage>>,
         to_list: Transform<TransformOperation<Angle, Number, Length, Integer, LengthPercentage>>,
         count: Integer,
     },
 }
 
 #[derive(
-    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 /// A value of the `transform` property
 pub struct Transform<T>(#[css(if_empty = "none", iterable)] pub Vec<T>);
 
 impl<Angle, Number, Length, Integer, LengthPercentage>
     TransformOperation<Angle, Number, Length, Integer, LengthPercentage>
 where
     Angle: Zero,
--- a/servo/components/style/values/generics/ui.rs
+++ b/servo/components/style/values/generics/ui.rs
@@ -6,17 +6,26 @@
 
 use std::fmt::{self, Write};
 use style_traits::{CssWriter, ToCss};
 use values::specified::ui::CursorKind;
 
 /// A generic value for the `cursor` property.
 ///
 /// https://drafts.csswg.org/css-ui/#cursor
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
+)]
 pub struct Cursor<Image> {
     /// The parsed images for the cursor.
     pub images: Box<[Image]>,
     /// The kind of the cursor [default | help | ...].
     pub keyword: CursorKind,
 }
 
 impl<Image> Cursor<Image> {
@@ -39,17 +48,26 @@ impl<Image: ToCss> ToCss for Cursor<Imag
             image.to_css(dest)?;
             dest.write_str(", ")?;
         }
         self.keyword.to_css(dest)
     }
 }
 
 /// A generic value for item of `image cursors`.
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
+)]
 pub struct CursorImage<ImageUrl, Number> {
     /// The url to parse images from.
     pub url: ImageUrl,
     /// The <x> and <y> coordinates.
     pub hotspot: Option<(Number, Number)>,
 }
 
 impl<ImageUrl: ToCss, Number: ToCss> ToCss for CursorImage<ImageUrl, Number> {
--- a/servo/components/style/values/mod.rs
+++ b/servo/components/style/values/mod.rs
@@ -91,17 +91,25 @@ where
 {
     (value * 100.).to_css(dest)?;
     dest.write_str("%")
 }
 
 /// Convenience void type to disable some properties and values through types.
 #[cfg_attr(feature = "servo", derive(Deserialize, MallocSizeOf, Serialize))]
 #[derive(
-    Clone, Copy, Debug, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue,
+    Clone,
+    Copy,
+    Debug,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToAnimatedValue,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
 )]
 pub enum Impossible {}
 
 // FIXME(nox): This should be derived but the derive code cannot cope
 // with uninhabited enums.
 impl ComputeSquaredDistance for Impossible {
     #[inline]
     fn compute_squared_distance(&self, _other: &Self) -> Result<SquaredDistance, ()> {
@@ -150,17 +158,26 @@ impl<A: Debug, B: Debug> Debug for Eithe
             Either::First(ref v) => v.fmt(f),
             Either::Second(ref v) => v.fmt(f),
         }
     }
 }
 
 /// <https://drafts.csswg.org/css-values-4/#custom-idents>
 #[derive(
-    Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    Eq,
+    Hash,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub struct CustomIdent(pub Atom);
 
 impl CustomIdent {
     /// Parse an already-tokenizer identifier
     pub fn from_ident<'i>(
         location: SourceLocation,
         ident: &CowRcStr<'i>,
@@ -188,17 +205,19 @@ impl ToCss for CustomIdent {
     where
         W: Write,
     {
         serialize_atom_identifier(&self.0, dest)
     }
 }
 
 /// <https://drafts.csswg.org/css-animations/#typedef-keyframes-name>
-#[derive(Clone, Debug, MallocSizeOf, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone, Debug, MallocSizeOf, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem,
+)]
 pub enum KeyframesName {
     /// <custom-ident>
     Ident(CustomIdent),
     /// <string>
     QuotedString(Atom),
 }
 
 impl KeyframesName {
--- a/servo/components/style/values/resolved/mod.rs
+++ b/servo/components/style/values/resolved/mod.rs
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 //! Resolved values. These are almost always computed values, but in some cases
 //! there are used values.
 
+use crate::properties::ComputedValues;
 use cssparser;
 use smallvec::SmallVec;
-use crate::properties::ComputedValues;
 
 mod color;
 
 use crate::values::computed;
 
 /// Information needed to resolve a given value.
 pub struct Context<'a> {
     /// The style we're resolving for. This is useful to resolve currentColor.
@@ -177,16 +177,18 @@ where
 impl<T> ToResolvedValue for Box<[T]>
 where
     T: ToResolvedValue,
 {
     type ResolvedValue = Box<[<T as ToResolvedValue>::ResolvedValue]>;
 
     #[inline]
     fn to_resolved_value(self, context: &Context) -> Self::ResolvedValue {
-        Vec::from(self).to_resolved_value(context).into_boxed_slice()
+        Vec::from(self)
+            .to_resolved_value(context)
+            .into_boxed_slice()
     }
 
     #[inline]
     fn from_resolved_value(resolved: Self::ResolvedValue) -> Self {
         Vec::from_resolved_value(Vec::from(resolved)).into_boxed_slice()
     }
 }
--- a/servo/components/style/values/specified/align.rs
+++ b/servo/components/style/values/specified/align.rs
@@ -129,17 +129,28 @@ pub enum AxisDirection {
     Block,
     /// Inline direction.
     Inline,
 }
 
 /// Shared value for the `align-content` and `justify-content` properties.
 ///
 /// <https://drafts.csswg.org/css-align/#content-distribution>
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    PartialEq,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
+)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
 pub struct ContentDistribution {
     primary: AlignFlags,
     // FIXME(https://github.com/w3c/csswg-drafts/issues/1002): This will need to
     // accept fallback alignment, eventually.
 }
 
 impl ContentDistribution {
@@ -242,17 +253,28 @@ impl ContentDistribution {
             f(&["left", "right"]);
         }
     }
 }
 
 /// Value for the `align-content` property.
 ///
 /// <https://drafts.csswg.org/css-align/#propdef-align-content>
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    PartialEq,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
+)]
 pub struct AlignContent(pub ContentDistribution);
 
 impl Parse for AlignContent {
     fn parse<'i, 't>(
         _: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
         // NOTE Please also update `impl SpecifiedValueInfo` below when
@@ -282,17 +304,28 @@ impl From<AlignContent> for u16 {
     fn from(v: AlignContent) -> u16 {
         v.0.as_bits()
     }
 }
 
 /// Value for the `justify-content` property.
 ///
 /// <https://drafts.csswg.org/css-align/#propdef-justify-content>
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    PartialEq,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
+)]
 pub struct JustifyContent(pub ContentDistribution);
 
 impl Parse for JustifyContent {
     fn parse<'i, 't>(
         _: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
         // NOTE Please also update `impl SpecifiedValueInfo` below when
@@ -320,17 +353,28 @@ impl From<u16> for JustifyContent {
 #[cfg(feature = "gecko")]
 impl From<JustifyContent> for u16 {
     fn from(v: JustifyContent) -> u16 {
         v.0.as_bits()
     }
 }
 
 /// <https://drafts.csswg.org/css-align/#self-alignment>
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    PartialEq,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
+)]
 pub struct SelfAlignment(pub AlignFlags);
 
 impl SelfAlignment {
     /// The initial value 'auto'
     #[inline]
     pub fn auto() -> Self {
         SelfAlignment(AlignFlags::AUTO)
     }
@@ -380,17 +424,28 @@ impl SelfAlignment {
         list_overflow_position_keywords(f);
         list_self_position_keywords(f, axis);
     }
 }
 
 /// The specified value of the align-self property.
 ///
 /// <https://drafts.csswg.org/css-align/#propdef-align-self>
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    PartialEq,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
+)]
 pub struct AlignSelf(pub SelfAlignment);
 
 impl Parse for AlignSelf {
     fn parse<'i, 't>(
         _: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
         // NOTE Please also update `impl SpecifiedValueInfo` below when
@@ -418,17 +473,28 @@ impl From<AlignSelf> for u8 {
     fn from(align: AlignSelf) -> u8 {
         (align.0).0.bits()
     }
 }
 
 /// The specified value of the justify-self property.
 ///
 /// <https://drafts.csswg.org/css-align/#propdef-justify-self>
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    PartialEq,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
+)]
 pub struct JustifySelf(pub SelfAlignment);
 
 impl Parse for JustifySelf {
     fn parse<'i, 't>(
         _: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
         // NOTE Please also update `impl SpecifiedValueInfo` below when
@@ -456,17 +522,28 @@ impl From<JustifySelf> for u8 {
     fn from(justify: JustifySelf) -> u8 {
         (justify.0).0.bits()
     }
 }
 
 /// Value of the `align-items` property
 ///
 /// <https://drafts.csswg.org/css-align/#propdef-align-items>
-#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    PartialEq,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
+)]
 pub struct AlignItems(pub AlignFlags);
 
 impl AlignItems {
     /// The initial value 'normal'
     #[inline]
     pub fn normal() -> Self {
         AlignItems(AlignFlags::NORMAL)
     }
--- a/servo/components/style/values/specified/background.rs
+++ b/servo/components/style/values/specified/background.rs
@@ -59,17 +59,26 @@ pub enum BackgroundRepeatKeyword {
     NoRepeat,
 }
 
 /// The value of the `background-repeat` property, with `repeat-x` / `repeat-y`
 /// represented as the combination of `no-repeat` and `repeat` in the opposite
 /// axes.
 ///
 /// https://drafts.csswg.org/css-backgrounds/#the-background-repeat
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
+)]
 pub struct BackgroundRepeat(pub BackgroundRepeatKeyword, pub BackgroundRepeatKeyword);
 
 impl BackgroundRepeat {
     /// Returns the `repeat repeat` value.
     pub fn repeat() -> Self {
         BackgroundRepeat(
             BackgroundRepeatKeyword::Repeat,
             BackgroundRepeatKeyword::Repeat,
--- a/servo/components/style/values/specified/border.rs
+++ b/servo/components/style/values/specified/border.rs
@@ -260,17 +260,25 @@ pub enum BorderImageRepeatKeyword {
     Round,
     Space,
 }
 
 /// The specified value for the `border-image-repeat` property.
 ///
 /// https://drafts.csswg.org/css-backgrounds/#the-border-image-repeat
 #[derive(
-    Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem,
+    Clone,
+    Copy,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub struct BorderImageRepeat(pub BorderImageRepeatKeyword, pub BorderImageRepeatKeyword);
 
 impl ToCss for BorderImageRepeat {
     fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
     where
         W: Write,
     {
--- a/servo/components/style/values/specified/box.rs
+++ b/servo/components/style/values/specified/box.rs
@@ -463,22 +463,27 @@ impl ScrollSnapType {
 }
 
 impl Parse for ScrollSnapType {
     /// none | [ x | y | block | inline | both ] [ mandatory | proximity ]?
     fn parse<'i, 't>(
         _context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
-        if input.try(|input| input.expect_ident_matching("none")).is_ok() {
+        if input
+            .try(|input| input.expect_ident_matching("none"))
+            .is_ok()
+        {
             return Ok(ScrollSnapType::none());
         }
 
         let axis = ScrollSnapAxis::parse(input)?;
-        let strictness = input.try(ScrollSnapStrictness::parse).unwrap_or(ScrollSnapStrictness::Proximity);
+        let strictness = input
+            .try(ScrollSnapStrictness::parse)
+            .unwrap_or(ScrollSnapStrictness::Proximity);
         Ok(Self { axis, strictness })
     }
 }
 
 impl ToCss for ScrollSnapType {
     fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
     where
         W: Write,
@@ -519,17 +524,26 @@ pub enum ScrollSnapAlignKeyword {
     Start,
     End,
     Center,
 }
 
 /// https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align
 #[allow(missing_docs)]
 #[derive(
-    Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem,
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
 )]
 #[repr(C)]
 pub struct ScrollSnapAlign {
     block: ScrollSnapAlignKeyword,
     inline: ScrollSnapAlignKeyword,
 }
 
 impl ScrollSnapAlign {
@@ -632,17 +646,25 @@ pub enum OverflowAnchor {
 )]
 #[repr(u8)]
 pub enum OverflowClipBox {
     PaddingBox,
     ContentBox,
 }
 
 #[derive(
-    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 /// Provides a rendering hint to the user agent,
 /// stating what kinds of changes the author expects
 /// to perform on the element
 ///
 /// <https://drafts.csswg.org/css-will-change/#will-change>
 pub enum WillChange {
     /// Expresses no particular intent
@@ -935,17 +957,19 @@ impl Parse for Contain {
     }
 }
 
 /// A specified value for the `perspective` property.
 pub type Perspective = GenericPerspective<NonNegativeLength>;
 
 /// A given transition property, that is either `All`, a longhand or shorthand
 /// property, or an unsupported or custom property.
-#[derive(Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem,
+)]
 pub enum TransitionProperty {
     /// A shorthand.
     Shorthand(ShorthandId),
     /// A longhand transitionable property.
     Longhand(LonghandId),
     /// A custom property.
     Custom(CustomPropertyName),
     /// Unrecognized property which could be any non-transitionable, custom property, or
@@ -1030,79 +1054,49 @@ impl TransitionProperty {
             TransitionProperty::Custom(..) | TransitionProperty::Unsupported(..) => return Err(()),
         })
     }
 }
 
 #[allow(missing_docs)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
 #[derive(
-    Clone,
-    Copy,
-    Debug,
-    Eq,
-    Hash,
-    MallocSizeOf,
-    Parse,
-    PartialEq,
-    SpecifiedValueInfo,
-    ToCss,
-    ToShmem,
+    Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
 )]
 /// https://drafts.csswg.org/css-box/#propdef-float
 pub enum Float {
     Left,
     Right,
     None,
     // https://drafts.csswg.org/css-logical-props/#float-clear
     InlineStart,
     InlineEnd,
 }
 
 #[allow(missing_docs)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
 #[derive(
-    Clone,
-    Copy,
-    Debug,
-    Eq,
-    Hash,
-    MallocSizeOf,
-    Parse,
-    PartialEq,
-    SpecifiedValueInfo,
-    ToCss,
-    ToShmem,
+    Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
 )]
 /// https://drafts.csswg.org/css-box/#propdef-clear
 pub enum Clear {
     None,
     Left,
     Right,
     Both,
     // https://drafts.csswg.org/css-logical-props/#float-clear
     InlineStart,
     InlineEnd,
 }
 
 /// https://drafts.csswg.org/css-ui/#propdef-resize
 #[allow(missing_docs)]
 #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
 #[derive(
-    Clone,
-    Copy,
-    Debug,
-    Eq,
-    Hash,
-    MallocSizeOf,
-    Parse,
-    PartialEq,
-    SpecifiedValueInfo,
-    ToCss,
-    ToShmem,
+    Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
 )]
 pub enum Resize {
     None,
     Both,
     Horizontal,
     Vertical,
     // https://drafts.csswg.org/css-logical-1/#resize
     Inline,
--- a/servo/components/style/values/specified/color.rs
+++ b/servo/components/style/values/specified/color.rs
@@ -402,17 +402,19 @@ impl Parse for MozFontSmoothingBackgroun
         Color::parse(context, input).map(MozFontSmoothingBackgroundColor)
     }
 }
 
 impl ToComputedValue for MozFontSmoothingBackgroundColor {
     type ComputedValue = RGBA;
 
     fn to_computed_value(&self, context: &Context) -> RGBA {
-        self.0.to_computed_value(context).to_rgba(RGBA::transparent())
+        self.0
+            .to_computed_value(context)
+            .to_rgba(RGBA::transparent())
     }
 
     fn from_computed_value(computed: &RGBA) -> Self {
         MozFontSmoothingBackgroundColor(Color::rgba(*computed))
     }
 }
 
 impl SpecifiedValueInfo for Color {
--- a/servo/components/style/values/specified/font.rs
+++ b/servo/components/style/values/specified/font.rs
@@ -363,19 +363,17 @@ impl ToComputedValue for FontStyle {
 pub enum FontStretch {
     Stretch(Percentage),
     Keyword(FontStretchKeyword),
     #[css(skip)]
     System(SystemFont),
 }
 
 /// A keyword value for `font-stretch`.
-#[derive(
-    Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
-)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
 #[allow(missing_docs)]
 pub enum FontStretchKeyword {
     Normal,
     Condensed,
     UltraCondensed,
     ExtraCondensed,
     SemiCondensed,
     SemiExpanded,
@@ -527,17 +525,19 @@ pub enum FontFamily {
 }
 
 impl FontFamily {
     system_font_methods!(FontFamily, font_family);
 
     /// Parse a specified font-family value
     pub fn parse_specified<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         let values = input.parse_comma_separated(SingleFontFamily::parse)?;
-        Ok(FontFamily::Values(FontFamilyList::new(values.into_boxed_slice())))
+        Ok(FontFamily::Values(FontFamilyList::new(
+            values.into_boxed_slice(),
+        )))
     }
 }
 
 impl ToComputedValue for FontFamily {
     type ComputedValue = computed::FontFamily;
 
     fn to_computed_value(&self, context: &Context) -> Self::ComputedValue {
         match *self {
@@ -990,17 +990,19 @@ bitflags! {
         const SWASH = 0x10;
         /// Ornaments glyphs
         const ORNAMENTS = 0x20;
         /// Annotation forms
         const ANNOTATION = 0x40;
     }
 }
 
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToResolvedValue, ToShmem,
+)]
 /// Set of variant alternates
 pub enum VariantAlternates {
     /// Enables display of stylistic alternates
     #[css(function)]
     Stylistic(CustomIdent),
     /// Enables display with stylistic sets
     #[css(comma, function)]
     Styleset(#[css(iterable)] Box<[CustomIdent]>),
@@ -1015,17 +1017,19 @@ pub enum VariantAlternates {
     Ornaments(CustomIdent),
     /// Enables display of alternate annotation forms
     #[css(function)]
     Annotation(CustomIdent),
     /// Enables display of historical forms
     HistoricalForms,
 }
 
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToResolvedValue, ToShmem,
+)]
 /// List of Variant Alternates
 pub struct VariantAlternatesList(
     #[css(if_empty = "normal", iterable)] pub Box<[VariantAlternates]>,
 );
 
 impl VariantAlternatesList {
     /// Returns the length of all variant alternates.
     pub fn len(&self) -> usize {
@@ -1853,17 +1857,25 @@ impl Parse for FontFeatureSettings {
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<FontFeatureSettings, ParseError<'i>> {
         SpecifiedFontFeatureSettings::parse(context, input).map(FontFeatureSettings::Value)
     }
 }
 
 #[derive(
-    Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem,
+    Clone,
+    Copy,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
 )]
 /// Whether user agents are allowed to synthesize bold or oblique font faces
 /// when a font family lacks bold or italic faces
 pub struct FontSynthesis {
     /// If a `font-weight` is requested that the font family does not contain,
     /// the user agent may synthesize the requested weight from the weights
     /// that do exist in the font family.
     #[css(represents_keyword)]
@@ -2173,17 +2185,25 @@ impl Parse for XTextZoom {
             false,
             "Should be set directly by presentation attributes only."
         );
         Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
     }
 }
 
 #[derive(
-    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 /// Internal property that reflects the lang attribute
 pub struct XLang(#[css(skip)] pub Atom);
 
 impl XLang {
     #[inline]
     /// Get default value for `-x-lang`
     pub fn get_initial_value() -> XLang {
@@ -2262,17 +2282,27 @@ impl Parse for MozScriptLevel {
             return Ok(MozScriptLevel::Relative(i));
         }
         input.expect_ident_matching("auto")?;
         Ok(MozScriptLevel::Auto)
     }
 }
 
 #[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
-#[derive(Clone, Copy, Debug, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Copy,
+    Debug,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
+)]
 /// Specifies the multiplier to be used to adjust font size
 /// due to changes in scriptlevel.
 ///
 /// Ref: https://www.w3.org/TR/MathML3/chapter3.html#presm.mstyle.attrs
 pub struct MozScriptSizeMultiplier(pub f32);
 
 impl MozScriptSizeMultiplier {
     #[inline]
--- a/servo/components/style/values/specified/length.rs
+++ b/servo/components/style/values/specified/length.rs
@@ -8,18 +8,17 @@
 
 use super::{AllowQuirks, Number, Percentage, ToComputedValue};
 use crate::font_metrics::{FontMetrics, FontMetricsOrientation};
 use crate::parser::{Parse, ParserContext};
 use crate::properties::computed_value_flags::ComputedValueFlags;
 use crate::values::computed::{self, CSSPixelLength, Context};
 use crate::values::generics::length as generics;
 use crate::values::generics::length::{
-    GenericLengthPercentageOrNormal, GenericLengthOrNumber,
-    GenericMaxSize, GenericSize,
+    GenericLengthOrNumber, GenericLengthPercentageOrNormal, GenericMaxSize, GenericSize,
 };
 use crate::values::generics::NonNegative;
 use crate::values::specified::calc::CalcNode;
 use crate::values::specified::NonNegativeNumber;
 use crate::values::CSSFloat;
 use crate::Zero;
 use app_units::Au;
 use cssparser::{Parser, Token};
@@ -953,17 +952,18 @@ impl NonNegativeLengthPercentageOrAuto {
         })
     }
 }
 
 /// A wrapper of LengthPercentage, whose value must be >= 0.
 pub type NonNegativeLengthPercentage = NonNegative<LengthPercentage>;
 
 /// Either a NonNegativeLengthPercentage or the `normal` keyword.
-pub type NonNegativeLengthPercentageOrNormal = GenericLengthPercentageOrNormal<NonNegativeLengthPercentage>;
+pub type NonNegativeLengthPercentageOrNormal =
+    GenericLengthPercentageOrNormal<NonNegativeLengthPercentage>;
 
 impl From<NoCalcLength> for NonNegativeLengthPercentage {
     #[inline]
     fn from(len: NoCalcLength) -> Self {
         NonNegative(LengthPercentage::from(len))
     }
 }
 
--- a/servo/components/style/values/specified/list.rs
+++ b/servo/components/style/values/specified/list.rs
@@ -11,17 +11,26 @@ use crate::values::generics::CounterStyl
 use crate::values::CustomIdent;
 use cssparser::{Parser, Token};
 use servo_arc::Arc;
 use style_traits::{ParseError, StyleParseErrorKind};
 
 /// Specified and computed `list-style-type` property.
 #[cfg(feature = "gecko")]
 #[derive(
-    Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub enum ListStyleType {
     /// <counter-style> | none
     CounterStyle(CounterStyleOrNone),
     /// <string>
     String(String),
 }
 
@@ -72,29 +81,45 @@ impl Parse for ListStyleType {
         Ok(ListStyleType::String(
             input.expect_string()?.as_ref().to_owned(),
         ))
     }
 }
 
 /// A quote pair.
 #[derive(
-    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub struct QuotePair {
     /// The opening quote.
     pub opening: Box<str>,
 
     /// The closing quote.
     pub closing: Box<str>,
 }
 
 /// Specified and computed `quotes` property.
 #[derive(
-    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub struct Quotes(
     #[css(iterable, if_empty = "none")]
     #[ignore_malloc_size_of = "Arc"]
     pub Arc<Box<[QuotePair]>>,
 );
 
 impl Parse for Quotes {
--- a/servo/components/style/values/specified/mod.rs
+++ b/servo/components/style/values/specified/mod.rs
@@ -704,17 +704,25 @@ impl AllowQuirks {
         }
     }
 }
 
 /// An attr(...) rule
 ///
 /// `[namespace? `|`]? ident`
 #[derive(
-    Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
 )]
 #[css(function)]
 pub struct Attr {
     /// Optional namespace prefix and URL.
     pub namespace: Option<(Prefix, Namespace)>,
     /// Attribute name
     pub attribute: Atom,
 }
--- a/servo/components/style/values/specified/position.rs
+++ b/servo/components/style/values/specified/position.rs
@@ -566,17 +566,27 @@ impl From<GridAutoFlow> for u8 {
 
         if v.dense {
             result |= structs::NS_STYLE_GRID_AUTO_FLOW_DENSE as u8;
         }
         result
     }
 }
 
-#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
+#[derive(
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
+)]
 /// https://drafts.csswg.org/css-grid/#named-grid-area
 pub struct TemplateAreas {
     /// `named area` containing for each template area
     #[css(skip)]
     pub areas: Box<[NamedArea]>,
     /// The original CSS string value of each template area
     #[css(iterable)]
     pub strings: Box<[Box<str>]>,
@@ -673,17 +683,25 @@ impl Parse for TemplateAreas {
 
         TemplateAreas::from_vec(strings)
             .map_err(|()| input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
     }
 }
 
 /// Arc type for `Arc<TemplateAreas>`
 #[derive(
-    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub struct TemplateAreasArc(#[ignore_malloc_size_of = "Arc"] pub Arc<TemplateAreas>);
 
 impl Parse for TemplateAreasArc {
     fn parse<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
--- a/servo/components/style/values/specified/svg.rs
+++ b/servo/components/style/values/specified/svg.rs
@@ -124,17 +124,25 @@ const PAINT_ORDER_MASK: u8 = 0b11;
 /// Each pair can be set to FILL, STROKE, or MARKERS
 /// Lowest significant bit pairs are highest priority.
 ///  `normal` is the empty bitfield. The three pairs are
 /// never zero in any case other than `normal`.
 ///
 /// Higher priority values, i.e. the values specified first,
 /// will be painted first (and may be covered by paintings of lower priority)
 #[derive(
-    Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem,
+    Clone,
+    Copy,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub struct SVGPaintOrder(pub u8);
 
 impl SVGPaintOrder {
     /// Get default `paint-order` with `0`
     pub fn normal() -> Self {
         SVGPaintOrder(0)
     }
@@ -233,17 +241,25 @@ impl ToCss for SVGPaintOrder {
         }
         Ok(())
     }
 }
 
 /// Specified MozContextProperties value.
 /// Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-context-properties)
 #[derive(
-    Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem,
+    Clone,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub struct MozContextProperties(pub CustomIdent);
 
 impl Parse for MozContextProperties {
     fn parse<'i, 't>(
         _context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<MozContextProperties, ParseError<'i>> {
--- a/servo/components/style/values/specified/text.rs
+++ b/servo/components/style/values/specified/text.rs
@@ -507,19 +507,17 @@ impl TextEmphasisKeywordValue {
             TextEmphasisKeywordValue::Shape(shape) |
             TextEmphasisKeywordValue::FillAndShape(_, shape) => Some(shape),
             _ => None,
         }
     }
 }
 
 /// Fill mode for the text-emphasis-style property
-#[derive(
-    Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
-)]
+#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
 pub enum TextEmphasisFillMode {
     /// `filled`
     Filled,
     /// `open`
     Open,
 }
 
 /// Shape keyword for the text-emphasis-style property
--- a/servo/components/style/values/specified/ui.rs
+++ b/servo/components/style/values/specified/ui.rs
@@ -52,17 +52,25 @@ impl Parse for CursorImage {
                 Err(_) => None,
             },
         })
     }
 }
 
 /// Specified value of `-moz-force-broken-image-icon`
 #[derive(
-    Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem,
+    Clone,
+    Copy,
+    Debug,
+    MallocSizeOf,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToResolvedValue,
+    ToShmem,
 )]
 pub struct MozForceBrokenImageIcon(pub bool);
 
 impl MozForceBrokenImageIcon {
     /// Return initial value of -moz-force-broken-image-icon which is false.
     #[inline]
     pub fn false_value() -> MozForceBrokenImageIcon {
         MozForceBrokenImageIcon(false)
--- a/servo/components/style_derive/to_animated_value.rs
+++ b/servo/components/style_derive/to_animated_value.rs
@@ -5,30 +5,30 @@
 use proc_macro2::TokenStream;
 use syn::DeriveInput;
 use synstructure::BindStyle;
 use to_computed_value;
 
 pub fn derive(input: DeriveInput) -> TokenStream {
     let trait_impl = |from_body, to_body| {
         quote! {
-            #[inline]
-            fn from_animated_value(animated: Self::AnimatedValue) -> Self {
-                match animated {
-                    #from_body
-                }
-            }
+             #[inline]
+             fn from_animated_value(animated: Self::AnimatedValue) -> Self {
+                 match animated {
+                     #from_body
+                 }
+             }
 
-            #[inline]
-            fn to_animated_value(self) -> Self::AnimatedValue {
-                match self {
-                    #to_body
-                }
-            }
-       }
+             #[inline]
+             fn to_animated_value(self) -> Self::AnimatedValue {
+                 match self {
+                     #to_body
+                 }
+             }
+        }
     };
 
     // TODO(emilio): Consider optimizing away non-generic cases as well?
     let non_generic_implementation = || None;
 
     to_computed_value::derive_to_value(
         input,
         parse_quote!(crate::values::animated::ToAnimatedValue),
--- a/servo/components/style_derive/to_computed_value.rs
+++ b/servo/components/style_derive/to_computed_value.rs
@@ -50,20 +50,17 @@ pub fn derive_to_value(
         &mut where_clause,
         &input.generics,
         &trait_path,
         &output_type_name,
     );
     let (to_body, from_body) = {
         let params = input.generics.type_params().collect::<Vec<_>>();
         for param in &params {
-            cg::add_predicate(
-                &mut where_clause,
-                parse_quote!(#param: #trait_path),
-            );
+            cg::add_predicate(&mut where_clause, parse_quote!(#param: #trait_path));
         }
 
         let to_body = cg::fmap_match(&input, bind_style, |binding| {
             if field_bound(&binding) {
                 let ty = &binding.ast().ty;
 
                 let output_type = cg::map_type_params(
                     ty,
@@ -75,60 +72,54 @@ pub fn derive_to_value(
                     &mut where_clause,
                     parse_quote!(
                         #ty: #trait_path<#output_type_name = #output_type>
                     ),
                 );
             }
             call_to(&binding)
         });
-        let from_body = cg::fmap_match(&input, bind_style, |binding| {
-            call_from(&binding)
-        });
+        let from_body = cg::fmap_match(&input, bind_style, |binding| call_from(&binding));
 
         (to_body, from_body)
     };
 
     input.generics.where_clause = where_clause;
     let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl();
-    let computed_value_type = cg::fmap_trait_output(
-        &input,
-        &trait_path,
-        &output_type_name,
-    );
+    let computed_value_type = cg::fmap_trait_output(&input, &trait_path, &output_type_name);
 
     let impl_ = trait_impl(from_body, to_body);
 
     quote! {
         impl #impl_generics #trait_path for #name #ty_generics #where_clause {
             type #output_type_name = #computed_value_type;
 
             #impl_
         }
     }
 }
 
 pub fn derive(input: DeriveInput) -> TokenStream {
     let trait_impl = |from_body, to_body| {
         quote! {
-            #[inline]
-            fn from_computed_value(computed: &Self::ComputedValue) -> Self {
-                match *computed {
-                    #from_body
-                }
-            }
+             #[inline]
+             fn from_computed_value(computed: &Self::ComputedValue) -> Self {
+                 match *computed {
+                     #from_body
+                 }
+             }
 
-            #[allow(unused_variables)]
-            #[inline]
-            fn to_computed_value(&self, context: &crate::values::computed::Context) -> Self::ComputedValue {
-                match *self {
-                    #to_body
-                }
-            }
-       }
+             #[allow(unused_variables)]
+             #[inline]
+             fn to_computed_value(&self, context: &crate::values::computed::Context) -> Self::ComputedValue {
+                 match *self {
+                     #to_body
+                 }
+             }
+        }
     };
 
     let non_generic_implementation = || {
         Some(quote! {
             type ComputedValue = Self;
 
             #[inline]
             fn to_computed_value(&self, _: &crate::values::computed::Context) -> Self::ComputedValue {
--- a/servo/components/style_derive/to_resolved_value.rs
+++ b/servo/components/style_derive/to_resolved_value.rs
@@ -6,33 +6,33 @@ use derive_common::cg;
 use proc_macro2::TokenStream;
 use syn::DeriveInput;
 use synstructure::BindStyle;
 use to_computed_value;
 
 pub fn derive(input: DeriveInput) -> TokenStream {
     let trait_impl = |from_body, to_body| {
         quote! {
-            #[inline]
-            fn from_resolved_value(resolved: Self::ResolvedValue) -> Self {
-                match resolved {
-                    #from_body
-                }
-            }
+             #[inline]
+             fn from_resolved_value(resolved: Self::ResolvedValue) -> Self {
+                 match resolved {
+                     #from_body
+                 }
+             }
 
-            #[inline]
-            fn to_resolved_value(
-                self,
-                context: &crate::values::resolved::Context,
-            ) -> Self::ResolvedValue {
-                match self {
-                    #to_body
-                }
-            }
-       }
+             #[inline]
+             fn to_resolved_value(
+                 self,
+                 context: &crate::values::resolved::Context,
+             ) -> Self::ResolvedValue {
+                 match self {
+                     #to_body
+                 }
+             }
+        }
     };
 
     let non_generic_implementation = || {
         Some(quote! {
             type ResolvedValue = Self;
 
             #[inline]
             fn from_resolved_value(resolved: Self::ResolvedValue) -> Self {
--- a/servo/components/to_shmem/lib.rs
+++ b/servo/components/to_shmem/lib.rs
@@ -19,27 +19,27 @@ extern crate smallvec;
 extern crate thin_slice;
 
 use servo_arc::{Arc, ThinArc};
 use smallbitvec::{InternalStorage, SmallBitVec};
 use smallvec::{Array, SmallVec};
 use std::alloc::Layout;
 #[cfg(debug_assertions)]
 use std::any::TypeId;
-use std::isize;
 #[cfg(debug_assertions)]
 use std::collections::HashSet;
 use std::ffi::CString;
+use std::isize;
 use std::marker::PhantomData;
 use std::mem::{self, ManuallyDrop};
 use std::num::Wrapping;
 use std::ops::Range;
+use std::os::raw::c_char;
 #[cfg(debug_assertions)]
 use std::os::raw::c_void;
-use std::os::raw::c_char;
 use std::ptr::{self, NonNull};
 use std::slice;
 use std::str;
 use thin_slice::ThinBoxedSlice;
 
 // Various pointer arithmetic functions in this file can be replaced with
 // functions on `Layout` once they have stabilized:
 //
@@ -161,17 +161,17 @@ impl SharedMemoryBuilder {
         //
         // The addition can't overflow, since self.index <= self.capacity, and
         // for us to have successfully allocated the buffer, `buffer + capacity`
         // can't overflow.
         let padding = padding_needed_for(self.buffer as usize + self.index, layout.align());
 
         // Reserve space for the padding.
         let start = self.index.checked_add(padding).unwrap();
-        assert!(start <= std::isize::MAX as usize);  // for the cast below
+        assert!(start <= std::isize::MAX as usize); // for the cast below
 
         // Reserve space for the value.
         let end = start.checked_add(layout.size()).unwrap();
         assert!(end <= self.capacity);
 
         self.index = end;
         unsafe { self.buffer.offset(start as isize) as *mut T }
     }
@@ -200,17 +200,32 @@ macro_rules! impl_trivial_to_shmem {
                 _builder: &mut $crate::SharedMemoryBuilder,
             ) -> ::std::mem::ManuallyDrop<Self> {
                 ::std::mem::ManuallyDrop::new(*self)
             }
         }
     )*};
 }
 
-impl_trivial_to_shmem!((), bool, f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, isize, usize);
+impl_trivial_to_shmem!(
+    (),
+    bool,
+    f32,
+    f64,
+    i8,
+    i16,
+    i32,
+    i64,
+    u8,
+    u16,
+    u32,
+    u64,
+    isize,
+    usize
+);
 
 impl_trivial_to_shmem!(cssparser::RGBA);
 impl_trivial_to_shmem!(cssparser::SourceLocation);
 impl_trivial_to_shmem!(cssparser::TokenSerializationType);
 
 impl<T> ToShmem for PhantomData<T> {
     fn to_shmem(&self, _builder: &mut SharedMemoryBuilder) -> ManuallyDrop<Self> {
         ManuallyDrop::new(*self)
@@ -419,17 +434,19 @@ impl<T: 'static + ToShmem> ToShmem for A
         // add_allowed_duplication_type, and should be types where we're fine
         // with duplicating any shared references in the shared memory buffer.
         //
         // Unfortunately there's no good way to print out the exact type of T
         // in the assertion message.
         #[cfg(debug_assertions)]
         assert!(
             !builder.shared_values.contains(&self.heap_ptr()) ||
-            builder.allowed_duplication_types.contains(&TypeId::of::<T>()),
+                builder
+                    .allowed_duplication_types
+                    .contains(&TypeId::of::<T>()),
             "ToShmem failed for Arc<T>: encountered a value of type T with multiple references \
              and which has not been explicitly allowed with an add_allowed_duplication_type call",
         );
 
         // Make a clone of the Arc-owned value with all of its heap allocations
         // placed in the shared memory buffer.
         let value = (**self).to_shmem(builder);
 
@@ -458,21 +475,17 @@ impl<H: 'static + ToShmem, T: 'static + 
             !builder.shared_values.contains(&self.heap_ptr()),
             "ToShmem failed for ThinArc<T>: encountered a value with multiple references, which \
              is not currently supported",
         );
 
         // Make a clone of the Arc-owned header and slice values with all of
         // their heap allocations placed in the shared memory buffer.
         let header = self.header.header.to_shmem(builder);
-        let values: Vec<ManuallyDrop<T>> = self
-            .slice
-            .iter()
-            .map(|v| v.to_shmem(builder))
-            .collect();
+        let values: Vec<ManuallyDrop<T>> = self.slice.iter().map(|v| v.to_shmem(builder)).collect();
 
         // Create a new ThinArc with the shared value and have it place
         // its ArcInner in the shared memory buffer.
         unsafe {
             let static_arc = ThinArc::static_from_header_and_iter(
                 |layout| builder.alloc(layout),
                 ManuallyDrop::into_inner(header),
                 values.into_iter().map(ManuallyDrop::into_inner),
@@ -494,17 +507,18 @@ impl ToShmem for SmallBitVec {
                 let len = vs.len();
                 let dest: *mut usize = builder.alloc_array(len);
 
                 unsafe {
                     // Copy the value into the buffer.
                     let src = vs.as_ptr() as *const usize;
                     ptr::copy(src, dest, len);
 
-                    let dest_slice = Box::from_raw(slice::from_raw_parts_mut(dest, len) as *mut [usize]);
+                    let dest_slice =
+                        Box::from_raw(slice::from_raw_parts_mut(dest, len) as *mut [usize]);
                     InternalStorage::Spilled(dest_slice)
                 }
-            }
+            },
             InternalStorage::Inline(x) => InternalStorage::Inline(x),
         };
         ManuallyDrop::new(unsafe { SmallBitVec::from_storage(storage) })
     }
 }
--- a/servo/components/to_shmem_derive/to_shmem.rs
+++ b/servo/components/to_shmem_derive/to_shmem.rs
@@ -7,31 +7,25 @@ use proc_macro2::TokenStream;
 use syn;
 use synstructure::{BindStyle, Structure};
 
 pub fn derive(mut input: syn::DeriveInput) -> TokenStream {
     let mut where_clause = input.generics.where_clause.take();
     let attrs = cg::parse_input_attrs::<ShmemInputAttrs>(&input);
     if !attrs.no_bounds {
         for param in input.generics.type_params() {
-            cg::add_predicate(
-                &mut where_clause,
-                parse_quote!(#param: ::to_shmem::ToShmem),
-            );
+            cg::add_predicate(&mut where_clause, parse_quote!(#param: ::to_shmem::ToShmem));
         }
     }
     for variant in Structure::new(&input).variants() {
         for binding in variant.bindings() {
             let attrs = cg::parse_field_attrs::<ShmemFieldAttrs>(&binding.ast());
             if attrs.field_bound {
                 let ty = &binding.ast().ty;
-                cg::add_predicate(
-                    &mut where_clause,
-                    parse_quote!(#ty: ::to_shmem::ToShmem),
-                )
+                cg::add_predicate(&mut where_clause, parse_quote!(#ty: ::to_shmem::ToShmem))
             }
         }
     }
 
     input.generics.where_clause = where_clause;
 
     let match_body = cg::fmap_match(&input, BindStyle::Ref, |binding| {
         quote! {