Bug 1541913 - Trivially remove some dead code. r=boris
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 04 Apr 2019 17:39:15 +0000
changeset 468050 9c7e806cf361adbea6ca2d9d82641c1bca0ed5e1
parent 468049 5f27889c846104ee081e324423efefbc4828e23f
child 468051 ddcd214baefac1efcec62fa50d163677de01869b
push id82354
push userealvarez@mozilla.com
push dateThu, 04 Apr 2019 18:38:43 +0000
treeherderautoland@a0bf0da499b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersboris
bugs1541913
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 1541913 - Trivially remove some dead code. r=boris Differential Revision: https://phabricator.services.mozilla.com/D26154
servo/components/style/properties/gecko.mako.rs
servo/components/style/values/computed/length.rs
servo/components/style/values/specified/length.rs
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -1199,23 +1199,19 @@ impl Clone for ${style_struct.gecko_stru
 <%def name="impl_trait(style_struct_name, skip_longhands='')">
 <%
     style_struct = next(x for x in data.style_structs if x.name == style_struct_name)
     longhands = [x for x in style_struct.longhands
                 if not (skip_longhands == "*" or x.name in skip_longhands.split())]
 
     # Types used with predefined_type()-defined properties that we can auto-generate.
     predefined_types = {
-        "length::LengthOrAuto": impl_style_coord,
-        "length::LengthOrNormal": impl_style_coord,
         "length::NonNegativeLengthOrAuto": impl_style_coord,
         "length::NonNegativeLengthPercentageOrNormal": impl_style_coord,
         "Length": impl_absolute_length,
-        "LengthOrNormal": impl_style_coord,
-        "LengthPercentageOrAuto": impl_style_coord,
         "MozScriptMinSize": impl_absolute_length,
         "RGBAColor": impl_rgba_color,
         "SVGLength": impl_svg_length,
         "SVGOpacity": impl_svg_opacity,
         "SVGPaint": impl_svg_paint,
         "SVGWidth": impl_svg_length,
         "Transform": impl_transform,
         "url::UrlOrNone": impl_css_url,
--- a/servo/components/style/values/computed/length.rs
+++ b/servo/components/style/values/computed/length.rs
@@ -705,19 +705,16 @@ pub type Length = CSSPixelLength;
 pub type LengthOrAuto = generics::GenericLengthPercentageOrAuto<Length>;
 
 /// Either a non-negative `<length>` or the `auto` keyword.
 pub type NonNegativeLengthOrAuto = generics::GenericLengthPercentageOrAuto<NonNegativeLength>;
 
 /// Either a computed `<length>` or a `<number>` value.
 pub type LengthOrNumber = GenericLengthOrNumber<Length, Number>;
 
-/// Either a computed `<length>` or the `normal` keyword.
-pub type LengthOrNormal = Either<Length, Normal>;
-
 /// A wrapper of Length, whose value must be >= 0.
 pub type NonNegativeLength = NonNegative<Length>;
 
 impl ToAnimatedValue for NonNegativeLength {
     type AnimatedValue = Length;
 
     #[inline]
     fn to_animated_value(self) -> Self::AnimatedValue {
@@ -778,19 +775,16 @@ 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 NonNegativeLength or the `normal` keyword.
-pub type NonNegativeLengthOrNormal = Either<NonNegativeLength, Normal>;
-
 /// Either a computed NonNegativeLengthPercentage or the `normal` keyword.
 pub type NonNegativeLengthPercentageOrNormal = Either<NonNegativeLengthPercentage, Normal>;
 
 /// 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.
--- a/servo/components/style/values/specified/length.rs
+++ b/servo/components/style/values/specified/length.rs
@@ -951,19 +951,16 @@ impl NonNegativeLengthPercentageOrAuto {
             NonNegativeLengthPercentage::parse_quirky(context, input, allow_quirks)
         })
     }
 }
 
 /// A wrapper of LengthPercentage, whose value must be >= 0.
 pub type NonNegativeLengthPercentage = NonNegative<LengthPercentage>;
 
-/// Either a computed NonNegativeLength or the `normal` keyword.
-pub type NonNegativeLengthOrNormal = Either<NonNegativeLength, Normal>;
-
 /// Either a NonNegativeLengthPercentage or the `normal` keyword.
 pub type NonNegativeLengthPercentageOrNormal = Either<NonNegativeLengthPercentage, Normal>;
 
 impl From<NoCalcLength> for NonNegativeLengthPercentage {
     #[inline]
     fn from(len: NoCalcLength) -> Self {
         NonNegative(LengthPercentage::from(len))
     }
@@ -993,19 +990,16 @@ impl NonNegativeLengthPercentage {
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
         allow_quirks: AllowQuirks,
     ) -> Result<Self, ParseError<'i>> {
         LengthPercentage::parse_non_negative_quirky(context, input, allow_quirks).map(NonNegative)
     }
 }
 
-/// Either a `<length>` or the `normal` keyword.
-pub type LengthOrNormal = Either<Length, Normal>;
-
 /// Either a `<length>` or the `auto` keyword.
 ///
 /// Note that we use LengthPercentage just for convenience, since it pretty much
 /// is everything we care about, but we could just add a similar LengthOrAuto
 /// instead if we think getting rid of this weirdness is worth it.
 pub type LengthOrAuto = generics::LengthPercentageOrAuto<Length>;
 
 impl LengthOrAuto {