Bug 1518098 - Manually rename some variables. r=jwatt#style
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 07 Jan 2019 12:42:40 +0000
changeset 509804 06c59ba512bafc9e6b4830496026793998151c54
parent 509803 7ca89c98ff5de65d5bef8cb3c05c336737e458ba
child 509805 8828a5a7028605c49e4276fb3cab5c6465ffa033
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1518098
milestone66.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 1518098 - Manually rename some variables. r=jwatt#style lop is not an acceptable variable name for LengthPercentage. Differential Revision: https://phabricator.services.mozilla.com/D15813
servo/components/style/gecko/values.rs
servo/components/style/gecko_bindings/sugar/ns_css_value.rs
servo/components/style/properties/gecko.mako.rs
servo/components/style/values/animated/length.rs
servo/components/style/values/computed/length.rs
servo/components/style/values/generics/grid.rs
servo/components/style/values/generics/svg.rs
servo/components/style/values/specified/basic_shape.rs
servo/components/style/values/specified/box.rs
servo/components/style/values/specified/font.rs
servo/components/style/values/specified/grid.rs
servo/components/style/values/specified/position.rs
servo/components/style/values/specified/text.rs
servo/components/style/values/specified/transform.rs
servo/ports/geckolib/glue.rs
--- a/servo/components/style/gecko/values.rs
+++ b/servo/components/style/gecko/values.rs
@@ -180,48 +180,48 @@ impl GeckoStyleCoordConvertible for Leng
         }
     }
 }
 
 impl GeckoStyleCoordConvertible for LengthPercentageOrAuto {
     fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
         match *self {
             LengthPercentageOrAuto::Auto => coord.set_value(CoordDataValue::Auto),
-            LengthPercentageOrAuto::LengthPercentage(ref lop) => lop.to_gecko_style_coord(coord),
+            LengthPercentageOrAuto::LengthPercentage(ref lp) => lp.to_gecko_style_coord(coord),
         }
     }
 
     fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
         match coord.as_value() {
             CoordDataValue::Auto => Some(LengthPercentageOrAuto::Auto),
             _ => LengthPercentage::from_gecko_style_coord(coord).map(LengthPercentageOrAuto::LengthPercentage),
         }
     }
 }
 
 impl GeckoStyleCoordConvertible for LengthPercentageOrNone {
     fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
         match *self {
             LengthPercentageOrNone::None => coord.set_value(CoordDataValue::None),
-            LengthPercentageOrNone::LengthPercentage(ref lop) => lop.to_gecko_style_coord(coord),
+            LengthPercentageOrNone::LengthPercentage(ref lp) => lp.to_gecko_style_coord(coord),
         }
     }
 
     fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
         match coord.as_value() {
             CoordDataValue::None => Some(LengthPercentageOrNone::None),
             _ => LengthPercentage::from_gecko_style_coord(coord).map(LengthPercentageOrNone::LengthPercentage),
         }
     }
 }
 
 impl<L: GeckoStyleCoordConvertible> GeckoStyleCoordConvertible for TrackBreadth<L> {
     fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
         match *self {
-            TrackBreadth::Breadth(ref lop) => lop.to_gecko_style_coord(coord),
+            TrackBreadth::Breadth(ref lp) => lp.to_gecko_style_coord(coord),
             TrackBreadth::Fr(fr) => coord.set_value(CoordDataValue::FlexFraction(fr)),
             TrackBreadth::Keyword(TrackKeyword::Auto) => coord.set_value(CoordDataValue::Auto),
             TrackBreadth::Keyword(TrackKeyword::MinContent) => coord.set_value(
                 CoordDataValue::Enumerated(StyleGridTrackBreadth::MinContent as u32),
             ),
             TrackBreadth::Keyword(TrackKeyword::MaxContent) => coord.set_value(
                 CoordDataValue::Enumerated(StyleGridTrackBreadth::MaxContent as u32),
             ),
@@ -252,17 +252,17 @@ impl GeckoStyleCoordConvertible for Comp
     fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
         match *self {
             ShapeRadius::ClosestSide => coord.set_value(CoordDataValue::Enumerated(
                 StyleShapeRadius::ClosestSide as u32,
             )),
             ShapeRadius::FarthestSide => coord.set_value(CoordDataValue::Enumerated(
                 StyleShapeRadius::FarthestSide as u32,
             )),
-            ShapeRadius::Length(lop) => lop.to_gecko_style_coord(coord),
+            ShapeRadius::Length(lp) => lp.to_gecko_style_coord(coord),
         }
     }
 
     fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
         match coord.as_value() {
             CoordDataValue::Enumerated(v) => {
                 if v == StyleShapeRadius::ClosestSide as u32 {
                     Some(ShapeRadius::ClosestSide)
@@ -358,34 +358,34 @@ impl GeckoStyleCoordConvertible for Extr
             _ => None,
         }
     }
 }
 
 impl GeckoStyleCoordConvertible for ComputedMozLength {
     fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
         match *self {
-            MozLength::LengthPercentageOrAuto(ref lopoa) => lopoa.to_gecko_style_coord(coord),
+            MozLength::LengthPercentageOrAuto(ref lpoa) => lpoa.to_gecko_style_coord(coord),
             MozLength::ExtremumLength(ref e) => e.to_gecko_style_coord(coord),
         }
     }
 
     fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
         LengthPercentageOrAuto::from_gecko_style_coord(coord)
             .map(MozLength::LengthPercentageOrAuto)
             .or_else(|| {
                 ExtremumLength::from_gecko_style_coord(coord).map(MozLength::ExtremumLength)
             })
     }
 }
 
 impl GeckoStyleCoordConvertible for ComputedMaxLength {
     fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
         match *self {
-            MaxLength::LengthPercentageOrNone(ref lopon) => lopon.to_gecko_style_coord(coord),
+            MaxLength::LengthPercentageOrNone(ref lpon) => lpon.to_gecko_style_coord(coord),
             MaxLength::ExtremumLength(ref e) => e.to_gecko_style_coord(coord),
         }
     }
 
     fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
         LengthPercentageOrNone::from_gecko_style_coord(coord)
             .map(MaxLength::LengthPercentageOrNone)
             .or_else(|| {
--- a/servo/components/style/gecko_bindings/sugar/ns_css_value.rs
+++ b/servo/components/style/gecko_bindings/sugar/ns_css_value.rs
@@ -63,39 +63,39 @@ impl nsCSSValue {
                 self.mUnit as u32 <= nsCSSUnit::eCSSUnit_Calc_Plus as u32
         );
         let array = *self.mValue.mArray.as_ref();
         debug_assert!(!array.is_null());
         &*array
     }
 
     /// Sets LengthPercentage value to this nsCSSValue.
-    pub unsafe fn set_lop(&mut self, lop: LengthPercentage) {
-        if lop.was_calc {
-            return bindings::Gecko_CSSValue_SetCalc(self, lop.into())
+    pub unsafe fn set_length_percentage(&mut self, lp: LengthPercentage) {
+        if lp.was_calc {
+            return bindings::Gecko_CSSValue_SetCalc(self, lp.into())
         }
-        debug_assert!(lop.percentage.is_none() || lop.unclamped_length() == Length::zero());
-        if let Some(p) = lop.percentage {
+        debug_assert!(lp.percentage.is_none() || lp.unclamped_length() == Length::zero());
+        if let Some(p) = lp.percentage {
             return self.set_percentage(p.0);
         }
-        self.set_px(lop.unclamped_length().px());
+        self.set_px(lp.unclamped_length().px());
     }
 
     /// Sets a px value to this nsCSSValue.
     pub unsafe fn set_px(&mut self, px: f32) {
         bindings::Gecko_CSSValue_SetPixelLength(self, px)
     }
 
     /// Sets a percentage value to this nsCSSValue.
     pub unsafe fn set_percentage(&mut self, unit_value: f32) {
         bindings::Gecko_CSSValue_SetPercentage(self, unit_value)
     }
 
     /// Returns LengthPercentage value.
-    pub unsafe fn get_lop(&self) -> LengthPercentage {
+    pub unsafe fn get_length_percentage(&self) -> LengthPercentage {
         match self.mUnit {
             nsCSSUnit::eCSSUnit_Pixel => {
                 LengthPercentage::new(
                     Length::new(bindings::Gecko_CSSValue_GetNumber(self)),
                     None,
                 )
             },
             nsCSSUnit::eCSSUnit_Percent => LengthPercentage::new_percent(Percentage(
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -521,18 +521,18 @@ def set_gecko_property(ffi_name, expr):
                 self.gecko.mContextFlags |= CONTEXT_VALUE;
                 match longhands::${ident}::get_initial_value() {
                     SVGLength::Length(length) => length,
                     _ => unreachable!("Initial value should not be context-value"),
                 }
             }
         };
         match length {
-            SvgLengthPercentageOrNumber::LengthPercentage(lop) =>
-                self.gecko.${gecko_ffi_name}.set(lop),
+            SvgLengthPercentageOrNumber::LengthPercentage(lp) =>
+                self.gecko.${gecko_ffi_name}.set(lp),
             SvgLengthPercentageOrNumber::Number(num) =>
                 self.gecko.${gecko_ffi_name}.set_value(CoordDataValue::Factor(num.into())),
         }
     }
 
     pub fn copy_${ident}_from(&mut self, other: &Self) {
         use crate::gecko_bindings::structs::nsStyleSVG_${ident.upper()}_CONTEXT as CONTEXT_VALUE;
         self.gecko.${gecko_ffi_name}.copy_from(&other.gecko.${gecko_ffi_name});
@@ -934,20 +934,20 @@ def set_gecko_property(ffi_name, expr):
         })
     }
 </%def>
 
 <%
 transform_functions = [
     ("Matrix3D", "matrix3d", ["number"] * 16),
     ("Matrix", "matrix", ["number"] * 6),
-    ("Translate", "translate", ["lop", "optional_lop"]),
-    ("Translate3D", "translate3d", ["lop", "lop", "length"]),
-    ("TranslateX", "translatex", ["lop"]),
-    ("TranslateY", "translatey", ["lop"]),
+    ("Translate", "translate", ["lp", "optional_lp"]),
+    ("Translate3D", "translate3d", ["lp", "lp", "length"]),
+    ("TranslateX", "translatex", ["lp"]),
+    ("TranslateY", "translatey", ["lp"]),
     ("TranslateZ", "translatez", ["length"]),
     ("Scale3D", "scale3d", ["number"] * 3),
     ("Scale", "scale", ["number", "optional_number"]),
     ("ScaleX", "scalex", ["number"]),
     ("ScaleY", "scaley", ["number"]),
     ("ScaleZ", "scalez", ["number"]),
     ("Rotate", "rotate", ["angle"]),
     ("Rotate3D", "rotate3d", ["number"] * 3 + ["angle"]),
@@ -988,17 +988,17 @@ transform_functions = [
         # First %s substituted with the call to GetArrayItem, the second
         # %s substituted with the corresponding variable
         css_value_setters = {
             "length" : "bindings::Gecko_CSSValue_SetPixelLength(%s, %s.px())",
             "percentage" : "bindings::Gecko_CSSValue_SetPercentage(%s, %s.0)",
             # Note: This is an integer type, but we use it as a percentage value in Gecko, so
             #       need to cast it to f32.
             "integer_to_percentage" : "bindings::Gecko_CSSValue_SetPercentage(%s, %s as f32)",
-            "lop" : "%s.set_lop(%s)",
+            "lp" : "%s.set_length_percentage(%s)",
             "angle" : "%s.set_angle(%s)",
             "number" : "bindings::Gecko_CSSValue_SetNumber(%s, %s)",
             # Note: We use nsCSSValueSharedList here, instead of nsCSSValueList_heap
             #       because this function is not called on the main thread and
             #       nsCSSValueList_heap is not thread safe.
             "list" : "%s.set_shared_list(%s.0.iter().map(&convert_to_ns_css_value));",
         }
     %>
@@ -1037,18 +1037,18 @@ transform_functions = [
     }
 </%def>
 
 <%def name="computed_operation_arm(name, keyword, items)">
     <%
         # %s is substituted with the call to GetArrayItem.
         css_value_getters = {
             "length" : "Length::new(bindings::Gecko_CSSValue_GetNumber(%s))",
-            "lop" : "%s.get_lop()",
-            "lopon" : "Either::Second(%s.get_lop())",
+            "lp" : "%s.get_length_percentage()",
+            "lpon" : "Either::Second(%s.get_length_percentage())",
             "lon" : "Either::First(%s.get_length())",
             "angle" : "%s.get_angle()",
             "number" : "bindings::Gecko_CSSValue_GetNumber(%s)",
             "percentage" : "Percentage(bindings::Gecko_CSSValue_GetPercentage(%s))",
             "integer_to_percentage" : "bindings::Gecko_CSSValue_GetPercentage(%s) as i32",
             "list" : "Transform(convert_shared_list_to_operations(%s))",
         }
         pre_symbols = "("
@@ -4563,17 +4563,17 @@ fn static_assert() {
         Length::from_gecko_style_coord(&self.gecko.mLetterSpacing).map_or(Spacing::Normal, Spacing::Value)
     }
 
     <%call expr="impl_coord_copy('letter_spacing', 'mLetterSpacing')"></%call>
 
     pub fn set_word_spacing(&mut self, v: longhands::word_spacing::computed_value::T) {
         use crate::values::generics::text::Spacing;
         match v {
-            Spacing::Value(lop) => self.gecko.mWordSpacing.set(lop),
+            Spacing::Value(lp) => self.gecko.mWordSpacing.set(lp),
             // https://drafts.csswg.org/css-text-3/#valdef-word-spacing-normal
             Spacing::Normal => self.gecko.mWordSpacing.set_value(CoordDataValue::Coord(0)),
         }
     }
 
     pub fn clone_word_spacing(&self) -> longhands::word_spacing::computed_value::T {
         use crate::values::computed::LengthPercentage;
         use crate::values::generics::text::Spacing;
@@ -5022,18 +5022,18 @@ clip-path
             SVGStrokeDashArray::Values(v) => {
                 let v = v.into_iter();
                 self.gecko.mContextFlags &= !CONTEXT_VALUE;
                 unsafe {
                     bindings::Gecko_nsStyleSVG_SetDashArrayLength(&mut self.gecko, v.len() as u32);
                 }
                 for (gecko, servo) in self.gecko.mStrokeDasharray.iter_mut().zip(v) {
                     match servo {
-                        SvgLengthPercentageOrNumber::LengthPercentage(lop) =>
-                            gecko.set(lop),
+                        SvgLengthPercentageOrNumber::LengthPercentage(lp) =>
+                            gecko.set(lp),
                         SvgLengthPercentageOrNumber::Number(num) =>
                             gecko.set_value(CoordDataValue::Factor(num.into())),
                     }
                 }
             }
             SVGStrokeDashArray::ContextValue => {
                 self.gecko.mContextFlags |= CONTEXT_VALUE;
                 unsafe {
--- a/servo/components/style/values/animated/length.rs
+++ b/servo/components/style/values/animated/length.rs
@@ -46,22 +46,22 @@ impl ToAnimatedValue for ComputedMaxLeng
         self
     }
 
     #[inline]
     fn from_animated_value(animated: Self::AnimatedValue) -> Self {
         use crate::values::computed::LengthPercentageOrNone;
         use crate::values::generics::length::MaxLength as GenericMaxLength;
         match animated {
-            GenericMaxLength::LengthPercentageOrNone(lopn) => {
-                let result = match lopn {
+            GenericMaxLength::LengthPercentageOrNone(lpn) => {
+                let result = match lpn {
                     LengthPercentageOrNone::LengthPercentage(len) => {
                         LengthPercentageOrNone::LengthPercentage(len.clamp_to_non_negative())
                     },
-                    LengthPercentageOrNone::None => lopn,
+                    LengthPercentageOrNone::None => lpn,
                 };
                 GenericMaxLength::LengthPercentageOrNone(result)
             },
             _ => animated,
         }
     }
 }
 
@@ -72,15 +72,15 @@ impl ToAnimatedValue for ComputedMozLeng
     fn to_animated_value(self) -> Self {
         self
     }
 
     #[inline]
     fn from_animated_value(animated: Self::AnimatedValue) -> Self {
         use crate::values::generics::length::MozLength as GenericMozLength;
         match animated {
-            GenericMozLength::LengthPercentageOrAuto(lopa) => {
-                GenericMozLength::LengthPercentageOrAuto(lopa.clamp_to_non_negative())
+            GenericMozLength::LengthPercentageOrAuto(lpa) => {
+                GenericMozLength::LengthPercentageOrAuto(lpa.clamp_to_non_negative())
             },
             _ => animated,
         }
     }
 }
--- a/servo/components/style/values/computed/length.rs
+++ b/servo/components/style/values/computed/length.rs
@@ -551,18 +551,18 @@ pub enum LengthPercentageOrNone {
     None,
 }
 
 impl LengthPercentageOrNone {
     /// Returns the used value.
     pub fn to_used_value(&self, containing_length: Au) -> Option<Au> {
         match *self {
             LengthPercentageOrNone::None => None,
-            LengthPercentageOrNone::LengthPercentage(ref lop) => {
-                Some(lop.to_used_value(containing_length))
+            LengthPercentageOrNone::LengthPercentage(ref lp) => {
+                Some(lp.to_used_value(containing_length))
             },
         }
     }
 }
 
 // FIXME(emilio): Derive this.
 impl ToComputedValue for specified::LengthPercentageOrNone {
     type ComputedValue = LengthPercentageOrNone;
@@ -611,25 +611,25 @@ impl From<NonNegativeLength> for NonNega
     #[inline]
     fn from(length: NonNegativeLength) -> Self {
         LengthPercentage::new(length.0, None).into()
     }
 }
 
 impl From<LengthPercentage> for NonNegativeLengthPercentage {
     #[inline]
-    fn from(lop: LengthPercentage) -> Self {
-        NonNegative::<LengthPercentage>(lop)
+    fn from(lp: LengthPercentage) -> Self {
+        NonNegative::<LengthPercentage>(lp)
     }
 }
 
 impl From<NonNegativeLengthPercentage> for LengthPercentage {
     #[inline]
-    fn from(lop: NonNegativeLengthPercentage) -> LengthPercentage {
-        lop.0
+    fn from(lp: NonNegativeLengthPercentage) -> LengthPercentage {
+        lp.0
     }
 }
 
 // TODO(emilio): This is a really generic impl which is only needed to implement
 // Animated and co for Spacing<>. Get rid of this, probably?
 impl From<Au> for LengthPercentage {
     #[inline]
     fn from(length: Au) -> Self {
--- a/servo/components/style/values/generics/grid.rs
+++ b/servo/components/style/values/generics/grid.rs
@@ -185,17 +185,17 @@ pub enum TrackBreadth<L> {
 
 impl<L> TrackBreadth<L> {
     /// Check whether this is a `<fixed-breadth>` (i.e., it only has `<length-percentage>`)
     ///
     /// <https://drafts.csswg.org/css-grid/#typedef-fixed-breadth>
     #[inline]
     pub fn is_fixed(&self) -> bool {
         match *self {
-            TrackBreadth::Breadth(ref _lop) => true,
+            TrackBreadth::Breadth(ref _lp) => true,
             _ => false,
         }
     }
 }
 
 /// A `<track-size>` type for explicit grid track sizing. Like `<track-breadth>`, this is
 /// generic only to avoid code bloat. It only takes `<length-percentage>`
 ///
@@ -273,19 +273,19 @@ impl<L: ToCss> ToCss for TrackSize<L> {
                 }
 
                 dest.write_str("minmax(")?;
                 min.to_css(dest)?;
                 dest.write_str(", ")?;
                 max.to_css(dest)?;
                 dest.write_str(")")
             },
-            TrackSize::FitContent(ref lop) => {
+            TrackSize::FitContent(ref lp) => {
                 dest.write_str("fit-content(")?;
-                lop.to_css(dest)?;
+                lp.to_css(dest)?;
                 dest.write_str(")")
             },
         }
     }
 }
 
 impl<L: ToComputedValue> ToComputedValue for TrackSize<L> {
     type ComputedValue = TrackSize<L::ComputedValue>;
@@ -303,32 +303,32 @@ impl<L: ToComputedValue> ToComputedValue
                     TrackBreadth::Keyword(TrackKeyword::Auto),
                     TrackBreadth::Fr(f.to_computed_value(context)),
                 )
             },
             TrackSize::Breadth(ref b) => TrackSize::Breadth(b.to_computed_value(context)),
             TrackSize::Minmax(ref b1, ref b2) => {
                 TrackSize::Minmax(b1.to_computed_value(context), b2.to_computed_value(context))
             },
-            TrackSize::FitContent(ref lop) => TrackSize::FitContent(lop.to_computed_value(context)),
+            TrackSize::FitContent(ref lp) => TrackSize::FitContent(lp.to_computed_value(context)),
         }
     }
 
     #[inline]
     fn from_computed_value(computed: &Self::ComputedValue) -> Self {
         match *computed {
             TrackSize::Breadth(ref b) => {
                 TrackSize::Breadth(ToComputedValue::from_computed_value(b))
             },
             TrackSize::Minmax(ref b1, ref b2) => TrackSize::Minmax(
                 ToComputedValue::from_computed_value(b1),
                 ToComputedValue::from_computed_value(b2),
             ),
-            TrackSize::FitContent(ref lop) => {
-                TrackSize::FitContent(ToComputedValue::from_computed_value(lop))
+            TrackSize::FitContent(ref lp) => {
+                TrackSize::FitContent(ToComputedValue::from_computed_value(lp))
             },
         }
     }
 }
 
 /// Helper function for serializing identifiers with a prefix and suffix, used
 /// for serializing <line-names> (in grid).
 pub fn concat_serialize_idents<W>(
--- a/servo/components/style/values/generics/svg.rs
+++ b/servo/components/style/values/generics/svg.rs
@@ -157,18 +157,18 @@ impl<LengthPercentageType: Parse, Number
     fn parse<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
         if let Ok(num) = input.try(|i| NumberType::parse(context, i)) {
             return Ok(SvgLengthPercentageOrNumber::Number(num));
         }
 
-        let lop = LengthPercentageType::parse(context, input)?;
-        Ok(SvgLengthPercentageOrNumber::LengthPercentage(lop))
+        let lp = LengthPercentageType::parse(context, input)?;
+        Ok(SvgLengthPercentageOrNumber::LengthPercentage(lp))
     }
 }
 
 /// An SVG length value supports `context-value` in addition to length.
 #[derive(
     Clone,
     ComputeSquaredDistance,
     Copy,
--- a/servo/components/style/values/specified/basic_shape.rs
+++ b/servo/components/style/values/specified/basic_shape.rs
@@ -311,18 +311,18 @@ impl ToCss for Ellipse {
     }
 }
 
 impl Parse for ShapeRadius {
     fn parse<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
-        if let Ok(lop) = input.try(|i| NonNegativeLengthPercentage::parse(context, i)) {
-            return Ok(generic::ShapeRadius::Length(lop));
+        if let Ok(lp) = input.try(|i| NonNegativeLengthPercentage::parse(context, i)) {
+            return Ok(generic::ShapeRadius::Length(lp));
         }
 
         try_match_ident_ignore_ascii_case! { input,
             "closest-side" => Ok(generic::ShapeRadius::ClosestSide),
             "farthest-side" => Ok(generic::ShapeRadius::FarthestSide),
         }
     }
 }
--- a/servo/components/style/values/specified/box.rs
+++ b/servo/components/style/values/specified/box.rs
@@ -273,20 +273,20 @@ impl Display {
 /// A specified value for the `vertical-align` property.
 pub type VerticalAlign = GenericVerticalAlign<LengthPercentage>;
 
 impl Parse for VerticalAlign {
     fn parse<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
-        if let Ok(lop) =
+        if let Ok(lp) =
             input.try(|i| LengthPercentage::parse_quirky(context, i, AllowQuirks::Yes))
         {
-            return Ok(GenericVerticalAlign::Length(lop));
+            return Ok(GenericVerticalAlign::Length(lp));
         }
 
         try_match_ident_ignore_ascii_case! { input,
             "baseline" => Ok(GenericVerticalAlign::Baseline),
             "sub" => Ok(GenericVerticalAlign::Sub),
             "super" => Ok(GenericVerticalAlign::Super),
             "top" => Ok(GenericVerticalAlign::Top),
             "text-top" => Ok(GenericVerticalAlign::TextTop),
--- a/servo/components/style/values/specified/font.rs
+++ b/servo/components/style/values/specified/font.rs
@@ -980,20 +980,20 @@ impl FontSize {
     }
 
     /// Parses a font-size, with quirks.
     pub fn parse_quirky<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
         allow_quirks: AllowQuirks,
     ) -> Result<FontSize, ParseError<'i>> {
-        if let Ok(lop) =
+        if let Ok(lp) =
             input.try(|i| LengthPercentage::parse_non_negative_quirky(context, i, allow_quirks))
         {
-            return Ok(FontSize::Length(lop));
+            return Ok(FontSize::Length(lp));
         }
 
         if let Ok(kw) = input.try(KeywordSize::parse) {
             return Ok(FontSize::Keyword(kw.into()));
         }
 
         try_match_ident_ignore_ascii_case! { input,
             "smaller" => Ok(FontSize::Smaller),
--- a/servo/components/style/values/specified/grid.rs
+++ b/servo/components/style/values/specified/grid.rs
@@ -27,18 +27,18 @@ pub fn parse_flex<'i, 't>(input: &mut Pa
     }
 }
 
 impl Parse for TrackBreadth<LengthPercentage> {
     fn parse<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
-        if let Ok(lop) = input.try(|i| LengthPercentage::parse_non_negative(context, i)) {
-            return Ok(TrackBreadth::Breadth(lop));
+        if let Ok(lp) = input.try(|i| LengthPercentage::parse_non_negative(context, i)) {
+            return Ok(TrackBreadth::Breadth(lp));
         }
 
         if let Ok(f) = input.try(parse_flex) {
             return Ok(TrackBreadth::Fr(f));
         }
 
         TrackKeyword::parse(input).map(TrackBreadth::Keyword)
     }
@@ -52,35 +52,35 @@ impl Parse for TrackSize<LengthPercentag
         if let Ok(b) = input.try(|i| TrackBreadth::parse(context, i)) {
             return Ok(TrackSize::Breadth(b));
         }
 
         if input.try(|i| i.expect_function_matching("minmax")).is_ok() {
             return input.parse_nested_block(|input| {
                 let inflexible_breadth =
                     match input.try(|i| LengthPercentage::parse_non_negative(context, i)) {
-                        Ok(lop) => TrackBreadth::Breadth(lop),
+                        Ok(lp) => TrackBreadth::Breadth(lp),
                         Err(..) => {
                             let keyword = TrackKeyword::parse(input)?;
                             TrackBreadth::Keyword(keyword)
                         },
                     };
 
                 input.expect_comma()?;
                 Ok(TrackSize::Minmax(
                     inflexible_breadth,
                     TrackBreadth::parse(context, input)?,
                 ))
             });
         }
 
         input.expect_function_matching("fit-content")?;
-        let lop =
+        let lp =
             input.parse_nested_block(|i| LengthPercentage::parse_non_negative(context, i))?;
-        Ok(TrackSize::FitContent(lop))
+        Ok(TrackSize::FitContent(lp))
     }
 }
 
 /// Parse the grid line names into a vector of owned strings.
 ///
 /// <https://drafts.csswg.org/css-grid/#typedef-line-names>
 pub fn parse_line_names<'i, 't>(
     input: &mut Parser<'i, 't>,
--- a/servo/components/style/values/specified/position.rs
+++ b/servo/components/style/values/specified/position.rs
@@ -33,19 +33,19 @@ pub type HorizontalPosition = PositionCo
 /// The specified value of a vertical position.
 pub type VerticalPosition = PositionComponent<Y>;
 
 /// The specified value of a component of a CSS `<position>`.
 #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss)]
 pub enum PositionComponent<S> {
     /// `center`
     Center,
-    /// `<lop>`
+    /// `<length-percentage>`
     Length(LengthPercentage),
-    /// `<side> <lop>?`
+    /// `<side> <length-percentage>?`
     Side(S, Option<LengthPercentage>),
 }
 
 /// A keyword for the X direction.
 #[derive(
     Clone,
     Copy,
     Debug,
@@ -108,69 +108,69 @@ impl Position {
                     return Ok(Self::new(x_pos, y_pos));
                 }
                 let x_pos = input
                     .try(|i| PositionComponent::parse_quirky(context, i, allow_quirks))
                     .unwrap_or(x_pos);
                 let y_pos = PositionComponent::Center;
                 return Ok(Self::new(x_pos, y_pos));
             },
-            Ok(PositionComponent::Side(x_keyword, lop)) => {
+            Ok(PositionComponent::Side(x_keyword, lp)) => {
                 if input.try(|i| i.expect_ident_matching("center")).is_ok() {
-                    let x_pos = PositionComponent::Side(x_keyword, lop);
+                    let x_pos = PositionComponent::Side(x_keyword, lp);
                     let y_pos = PositionComponent::Center;
                     return Ok(Self::new(x_pos, y_pos));
                 }
                 if let Ok(y_keyword) = input.try(Y::parse) {
-                    let y_lop = input
+                    let y_lp = input
                         .try(|i| LengthPercentage::parse_quirky(context, i, allow_quirks))
                         .ok();
-                    let x_pos = PositionComponent::Side(x_keyword, lop);
-                    let y_pos = PositionComponent::Side(y_keyword, y_lop);
+                    let x_pos = PositionComponent::Side(x_keyword, lp);
+                    let y_pos = PositionComponent::Side(y_keyword, y_lp);
                     return Ok(Self::new(x_pos, y_pos));
                 }
                 let x_pos = PositionComponent::Side(x_keyword, None);
-                let y_pos = lop.map_or(PositionComponent::Center, PositionComponent::Length);
+                let y_pos = lp.map_or(PositionComponent::Center, PositionComponent::Length);
                 return Ok(Self::new(x_pos, y_pos));
             },
             Ok(x_pos @ PositionComponent::Length(_)) => {
                 if let Ok(y_keyword) = input.try(Y::parse) {
                     let y_pos = PositionComponent::Side(y_keyword, None);
                     return Ok(Self::new(x_pos, y_pos));
                 }
-                if let Ok(y_lop) =
+                if let Ok(y_lp) =
                     input.try(|i| LengthPercentage::parse_quirky(context, i, allow_quirks))
                 {
-                    let y_pos = PositionComponent::Length(y_lop);
+                    let y_pos = PositionComponent::Length(y_lp);
                     return Ok(Self::new(x_pos, y_pos));
                 }
                 let y_pos = PositionComponent::Center;
                 let _ = input.try(|i| i.expect_ident_matching("center"));
                 return Ok(Self::new(x_pos, y_pos));
             },
             Err(_) => {},
         }
         let y_keyword = Y::parse(input)?;
-        let lop_and_x_pos: Result<_, ParseError> = input.try(|i| {
-            let y_lop = i
+        let lp_and_x_pos: Result<_, ParseError> = input.try(|i| {
+            let y_lp = i
                 .try(|i| LengthPercentage::parse_quirky(context, i, allow_quirks))
                 .ok();
             if let Ok(x_keyword) = i.try(X::parse) {
-                let x_lop = i
+                let x_lp = i
                     .try(|i| LengthPercentage::parse_quirky(context, i, allow_quirks))
                     .ok();
-                let x_pos = PositionComponent::Side(x_keyword, x_lop);
-                return Ok((y_lop, x_pos));
+                let x_pos = PositionComponent::Side(x_keyword, x_lp);
+                return Ok((y_lp, x_pos));
             };
             i.expect_ident_matching("center")?;
             let x_pos = PositionComponent::Center;
-            Ok((y_lop, x_pos))
+            Ok((y_lp, x_pos))
         });
-        if let Ok((y_lop, x_pos)) = lop_and_x_pos {
-            let y_pos = PositionComponent::Side(y_keyword, y_lop);
+        if let Ok((y_lp, x_pos)) = lp_and_x_pos {
+            let y_pos = PositionComponent::Side(y_keyword, y_lp);
             return Ok(Self::new(x_pos, y_pos));
         }
         let x_pos = PositionComponent::Center;
         let y_pos = PositionComponent::Side(y_keyword, None);
         Ok(Self::new(x_pos, y_pos))
     }
 
     /// `center center`
@@ -183,28 +183,28 @@ impl Position {
 impl ToCss for Position {
     fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
     where
         W: Write,
     {
         match (&self.horizontal, &self.vertical) {
             (
                 x_pos @ &PositionComponent::Side(_, Some(_)),
-                &PositionComponent::Length(ref y_lop),
+                &PositionComponent::Length(ref y_lp),
             ) => {
                 x_pos.to_css(dest)?;
                 dest.write_str(" top ")?;
-                y_lop.to_css(dest)
+                y_lp.to_css(dest)
             },
             (
-                &PositionComponent::Length(ref x_lop),
+                &PositionComponent::Length(ref x_lp),
                 y_pos @ &PositionComponent::Side(_, Some(_)),
             ) => {
                 dest.write_str("left ")?;
-                x_lop.to_css(dest)?;
+                x_lp.to_css(dest)?;
                 dest.write_str(" ")?;
                 y_pos.to_css(dest)
             },
             (x_pos, y_pos) => {
                 x_pos.to_css(dest)?;
                 dest.write_str(" ")?;
                 y_pos.to_css(dest)
             },
@@ -226,24 +226,24 @@ impl<S: Parse> PositionComponent<S> {
     pub fn parse_quirky<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
         allow_quirks: AllowQuirks,
     ) -> Result<Self, ParseError<'i>> {
         if input.try(|i| i.expect_ident_matching("center")).is_ok() {
             return Ok(PositionComponent::Center);
         }
-        if let Ok(lop) = input.try(|i| LengthPercentage::parse_quirky(context, i, allow_quirks)) {
-            return Ok(PositionComponent::Length(lop));
+        if let Ok(lp) = input.try(|i| LengthPercentage::parse_quirky(context, i, allow_quirks)) {
+            return Ok(PositionComponent::Length(lp));
         }
         let keyword = S::parse(context, input)?;
-        let lop = input
+        let lp = input
             .try(|i| LengthPercentage::parse_quirky(context, i, allow_quirks))
             .ok();
-        Ok(PositionComponent::Side(keyword, lop))
+        Ok(PositionComponent::Side(keyword, lp))
     }
 }
 
 impl<S> PositionComponent<S> {
     /// `0%`
     pub fn zero() -> Self {
         PositionComponent::Length(LengthPercentage::Percentage(Percentage::zero()))
     }
@@ -366,33 +366,33 @@ impl LegacyPosition {
             },
             Ok(OriginComponent::Side(x_keyword)) => {
                 if let Ok(y_keyword) = input.try(Y::parse) {
                     let x_pos = OriginComponent::Side(x_keyword);
                     let y_pos = OriginComponent::Side(y_keyword);
                     return Ok(Self::new(x_pos, y_pos));
                 }
                 let x_pos = OriginComponent::Side(x_keyword);
-                if let Ok(y_lop) =
+                if let Ok(y_lp) =
                     input.try(|i| LengthPercentage::parse_quirky(context, i, allow_quirks))
                 {
-                    return Ok(Self::new(x_pos, OriginComponent::Length(y_lop)));
+                    return Ok(Self::new(x_pos, OriginComponent::Length(y_lp)));
                 }
                 let _ = input.try(|i| i.expect_ident_matching("center"));
                 return Ok(Self::new(x_pos, OriginComponent::Center));
             },
             Ok(x_pos @ OriginComponent::Length(_)) => {
                 if let Ok(y_keyword) = input.try(Y::parse) {
                     let y_pos = OriginComponent::Side(y_keyword);
                     return Ok(Self::new(x_pos, y_pos));
                 }
-                if let Ok(y_lop) =
+                if let Ok(y_lp) =
                     input.try(|i| LengthPercentage::parse_quirky(context, i, allow_quirks))
                 {
-                    let y_pos = OriginComponent::Length(y_lop);
+                    let y_pos = OriginComponent::Length(y_lp);
                     return Ok(Self::new(x_pos, y_pos));
                 }
                 let _ = input.try(|i| i.expect_ident_matching("center"));
                 return Ok(Self::new(x_pos, OriginComponent::Center));
             },
             Err(_) => {},
         }
         let y_keyword = Y::parse(input)?;
--- a/servo/components/style/values/specified/text.rs
+++ b/servo/components/style/values/specified/text.rs
@@ -78,18 +78,18 @@ impl Parse for WordSpacing {
 impl Parse for LineHeight {
     fn parse<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
         if let Ok(number) = input.try(|i| NonNegativeNumber::parse(context, i)) {
             return Ok(GenericLineHeight::Number(number));
         }
-        if let Ok(nlop) = input.try(|i| NonNegativeLengthPercentage::parse(context, i)) {
-            return Ok(GenericLineHeight::Length(nlop));
+        if let Ok(nlp) = input.try(|i| NonNegativeLengthPercentage::parse(context, i)) {
+            return Ok(GenericLineHeight::Length(nlp));
         }
         let location = input.current_source_location();
         let ident = input.expect_ident()?;
         match ident {
             ref ident if ident.eq_ignore_ascii_case("normal") => Ok(GenericLineHeight::Normal),
             #[cfg(feature = "gecko")]
             ref ident if ident.eq_ignore_ascii_case("-moz-block-height") => {
                 Ok(GenericLineHeight::MozBlockHeight)
@@ -111,18 +111,18 @@ impl ToComputedValue for LineHeight {
         use crate::values::specified::length::FontBaseSize;
         match *self {
             GenericLineHeight::Normal => GenericLineHeight::Normal,
             #[cfg(feature = "gecko")]
             GenericLineHeight::MozBlockHeight => GenericLineHeight::MozBlockHeight,
             GenericLineHeight::Number(number) => {
                 GenericLineHeight::Number(number.to_computed_value(context))
             },
-            GenericLineHeight::Length(ref non_negative_lop) => {
-                let result = match non_negative_lop.0 {
+            GenericLineHeight::Length(ref non_negative_lp) => {
+                let result = match non_negative_lp.0 {
                     LengthPercentage::Length(NoCalcLength::Absolute(ref abs)) => {
                         context
                             .maybe_zoom_text(abs.to_computed_value(context).into())
                             .0
                     },
                     LengthPercentage::Length(ref length) => length.to_computed_value(context),
                     LengthPercentage::Percentage(ref p) => FontRelativeLength::Em(p.0)
                         .to_computed_value(context, FontBaseSize::CurrentStyle),
--- a/servo/components/style/values/specified/transform.rs
+++ b/servo/components/style/values/specified/transform.rs
@@ -230,17 +230,17 @@ impl Parse for Transform {
     }
 }
 
 /// The specified value of a component of a CSS `<transform-origin>`.
 #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss)]
 pub enum OriginComponent<S> {
     /// `center`
     Center,
-    /// `<lop>`
+    /// `<length-percentage>`
     Length(LengthPercentage),
     /// `<side>`
     Side(S),
 }
 
 impl Parse for TransformOrigin {
     fn parse<'i, 't>(
         context: &ParserContext,
@@ -301,18 +301,18 @@ where
 {
     fn parse<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
         if input.try(|i| i.expect_ident_matching("center")).is_ok() {
             return Ok(OriginComponent::Center);
         }
-        if let Ok(lop) = input.try(|i| LengthPercentage::parse(context, i)) {
-            return Ok(OriginComponent::Length(lop));
+        if let Ok(lp) = input.try(|i| LengthPercentage::parse(context, i)) {
+            return Ok(OriginComponent::Length(lp));
         }
         let keyword = S::parse(context, input)?;
         Ok(OriginComponent::Side(keyword))
     }
 }
 
 impl<S> ToComputedValue for OriginComponent<S>
 where
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -4466,33 +4466,33 @@ pub extern "C" fn Servo_DeclarationBlock
     use style::values::generics::NonNegative;
     use style::values::generics::length::MozLength;
     use style::values::specified::length::{NoCalcLength, NonNegativeLength, NonNegativeLengthPercentage};
     use style::values::specified::length::{LengthPercentageOrAuto, LengthPercentage};
     use style::values::specified::{BorderCornerRadius, BorderSideWidth};
 
     let long = get_longhand_from_id!(property);
     let nocalc = NoCalcLength::from_px(value);
-    let lop = LengthPercentage::Length(nocalc);
-    let lop_or_auto = LengthPercentageOrAuto::LengthPercentage(lop.clone());
+    let lp = LengthPercentage::Length(nocalc);
+    let lp_or_auto = LengthPercentageOrAuto::LengthPercentage(lp.clone());
     let prop = match_wrap_declared! { long,
-        Height => MozLength::LengthPercentageOrAuto(lop_or_auto),
-        Width => MozLength::LengthPercentageOrAuto(lop_or_auto),
+        Height => MozLength::LengthPercentageOrAuto(lp_or_auto),
+        Width => MozLength::LengthPercentageOrAuto(lp_or_auto),
         BorderTopWidth => BorderSideWidth::Length(nocalc.into()),
         BorderRightWidth => BorderSideWidth::Length(nocalc.into()),
         BorderBottomWidth => BorderSideWidth::Length(nocalc.into()),
         BorderLeftWidth => BorderSideWidth::Length(nocalc.into()),
-        MarginTop => lop_or_auto,
-        MarginRight => lop_or_auto,
-        MarginBottom => lop_or_auto,
-        MarginLeft => lop_or_auto,
-        PaddingTop => NonNegative(lop),
-        PaddingRight => NonNegative(lop),
-        PaddingBottom => NonNegative(lop),
-        PaddingLeft => NonNegative(lop),
+        MarginTop => lp_or_auto,
+        MarginRight => lp_or_auto,
+        MarginBottom => lp_or_auto,
+        MarginLeft => lp_or_auto,
+        PaddingTop => NonNegative(lp),
+        PaddingRight => NonNegative(lp),
+        PaddingBottom => NonNegative(lp),
+        PaddingLeft => NonNegative(lp),
         BorderSpacing => {
             let v = NonNegativeLength::from(nocalc);
             Box::new(BorderSpacing::new(v.clone(), v))
         },
         BorderTopLeftRadius => {
             let length = NonNegativeLengthPercentage::from(nocalc);
             Box::new(BorderCornerRadius::new(length.clone(), length))
         },
@@ -4591,26 +4591,26 @@ pub extern "C" fn Servo_DeclarationBlock
 ) {
     use style::properties::{LonghandId, PropertyDeclaration};
     use style::values::computed::Percentage;
     use style::values::generics::length::MozLength;
     use style::values::specified::length::{LengthPercentageOrAuto, LengthPercentage};
 
     let long = get_longhand_from_id!(property);
     let pc = Percentage(value);
-    let lop_or_auto =
+    let lp_or_auto =
         LengthPercentageOrAuto::LengthPercentage(LengthPercentage::Percentage(pc));
 
     let prop = match_wrap_declared! { long,
-        Height => MozLength::LengthPercentageOrAuto(lop_or_auto),
-        Width => MozLength::LengthPercentageOrAuto(lop_or_auto),
-        MarginTop => lop_or_auto,
-        MarginRight => lop_or_auto,
-        MarginBottom => lop_or_auto,
-        MarginLeft => lop_or_auto,
+        Height => MozLength::LengthPercentageOrAuto(lp_or_auto),
+        Width => MozLength::LengthPercentageOrAuto(lp_or_auto),
+        MarginTop => lp_or_auto,
+        MarginRight => lp_or_auto,
+        MarginBottom => lp_or_auto,
+        MarginLeft => lp_or_auto,
         FontSize => LengthPercentage::from(pc).into(),
     };
     write_locked_arc(declarations, |decls: &mut PropertyDeclarationBlock| {
         decls.push(prop, Importance::Normal);
     })
 }
 
 #[no_mangle]