Bug 1521392 - Make tidy happy.
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 20 Jan 2019 17:50:18 +0100
changeset 511728 666abafd77b1
parent 511727 fccd92c0fb3d
child 511729 4b6549b8a601
child 511736 824c36902a37
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)
bugs1521392
milestone66.0a1
first release with
nightly linux32
666abafd77b1 / 66.0a1 / 20190120213632 / files
nightly linux64
666abafd77b1 / 66.0a1 / 20190120213632 / files
nightly mac
666abafd77b1 / 66.0a1 / 20190120213632 / files
nightly win32
666abafd77b1 / 66.0a1 / 20190120213632 / files
nightly win64
666abafd77b1 / 66.0a1 / 20190120213632 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1521392 - Make tidy happy.
servo/components/style/properties/data.py
servo/components/style/properties/helpers.mako.rs
servo/components/style/properties/shorthands/border.mako.rs
servo/components/style/properties/shorthands/margin.mako.rs
servo/components/style/properties/shorthands/padding.mako.rs
servo/components/style/properties/shorthands/position.mako.rs
--- a/servo/components/style/properties/data.py
+++ b/servo/components/style/properties/data.py
@@ -242,19 +242,19 @@ class Longhand(object):
     def all_physical_mapped_properties(self):
         assert self.logical
         logical_side = None
         for s in LOGICAL_SIDES + LOGICAL_SIZES + LOGICAL_CORNERS:
             if s in self.name:
                 assert not logical_side
                 logical_side = s
         assert logical_side
-        physical = PHYSICAL_SIDES if logical_side in LOGICAL_SIDES else \
-                   PHYSICAL_SIZES if logical_side in LOGICAL_SIZES else \
-                   LOGICAL_CORNERS
+        physical = PHYSICAL_SIDES if logical_side in LOGICAL_SIDES \
+            else PHYSICAL_SIZES if logical_side in LOGICAL_SIZES \
+            else LOGICAL_CORNERS
         return [self.name.replace(logical_side, physical_side).replace("inset-", "")
                 for physical_side in physical]
 
     def experimental(self, product):
         if product == "gecko":
             return bool(self.gecko_pref)
         return bool(self.servo_pref)
 
--- a/servo/components/style/properties/helpers.mako.rs
+++ b/servo/components/style/properties/helpers.mako.rs
@@ -1,15 +1,15 @@
 /* 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/. */
 
 <%!
-    from data import Keyword, to_rust_ident, to_camel_case
-    from data import LOGICAL_CORNERS, PHYSICAL_CORNERS, LOGICAL_SIDES, PHYSICAL_SIDES, LOGICAL_SIZES, SYSTEM_FONT_LONGHANDS
+    from data import Keyword, to_rust_ident, to_camel_case, SYSTEM_FONT_LONGHANDS
+    from data import LOGICAL_CORNERS, PHYSICAL_CORNERS, LOGICAL_SIDES, PHYSICAL_SIDES, LOGICAL_SIZES
 %>
 
 <%def name="predefined_type(name, type, initial_value, parse_method='parse',
             needs_context=True, vector=False,
             computed_type=None, initial_specified_value=None,
             allow_quirks=False, allow_empty=False, **kwargs)">
     <%def name="predefined_type_inner(name, type, initial_value, parse_method)">
         #[allow(unused_imports)]
--- a/servo/components/style/properties/shorthands/border.mako.rs
+++ b/servo/components/style/properties/shorthands/border.mako.rs
@@ -371,17 +371,18 @@ pub fn parse_border<'i, 't>(
 
             use crate::properties::longhands::border_${axis}_start_${prop};
             pub fn parse_value<'i, 't>(
                 context: &ParserContext,
                 input: &mut Parser<'i, 't>,
             ) -> Result<Longhands, ParseError<'i>> {
                 let start_value = border_${axis}_start_${prop}::parse(context, input)?;
                 let end_value =
-                    input.try(|input| border_${axis}_start_${prop}::parse(context, input)).unwrap_or_else(|_| start_value.clone());
+                    input.try(|input| border_${axis}_start_${prop}::parse(context, input))
+                        .unwrap_or_else(|_| start_value.clone());
 
                 Ok(expanded! {
                     border_${axis}_start_${prop}: start_value,
                     border_${axis}_end_${prop}: end_value,
                 })
             }
 
             impl<'a> ToCss for LonghandsToSerialize<'a>  {
--- a/servo/components/style/properties/shorthands/margin.mako.rs
+++ b/servo/components/style/properties/shorthands/margin.mako.rs
@@ -24,17 +24,18 @@
         use crate::parser::Parse;
         use crate::values::specified::length::LengthPercentageOrAuto;
         pub fn parse_value<'i, 't>(
             context: &ParserContext,
             input: &mut Parser<'i, 't>,
         ) -> Result<Longhands, ParseError<'i>> {
             let start_value = LengthPercentageOrAuto::parse(context, input)?;
             let end_value =
-                input.try(|input| LengthPercentageOrAuto::parse(context, input)).unwrap_or_else(|_| start_value.clone());
+                input.try(|input| LengthPercentageOrAuto::parse(context, input))
+                    .unwrap_or_else(|_| start_value.clone());
 
             Ok(expanded! {
                 margin_${axis}_start: start_value,
                 margin_${axis}_end: end_value,
             })
         }
 
         impl<'a> ToCss for LonghandsToSerialize<'a>  {
--- a/servo/components/style/properties/shorthands/padding.mako.rs
+++ b/servo/components/style/properties/shorthands/padding.mako.rs
@@ -23,17 +23,18 @@
         use crate::parser::Parse;
         use crate::values::specified::length::NonNegativeLengthPercentage;
         pub fn parse_value<'i, 't>(
             context: &ParserContext,
             input: &mut Parser<'i, 't>,
         ) -> Result<Longhands, ParseError<'i>> {
             let start_value = NonNegativeLengthPercentage::parse(context, input)?;
             let end_value =
-                input.try(|input| NonNegativeLengthPercentage::parse(context, input)).unwrap_or_else(|_| start_value.clone());
+                input.try(|input| NonNegativeLengthPercentage::parse(context, input))
+                    .unwrap_or_else(|_| start_value.clone());
 
             Ok(expanded! {
                 padding_${axis}_start: start_value,
                 padding_${axis}_end: end_value,
             })
         }
 
         impl<'a> ToCss for LonghandsToSerialize<'a>  {
--- a/servo/components/style/properties/shorthands/position.mako.rs
+++ b/servo/components/style/properties/shorthands/position.mako.rs
@@ -778,17 +778,18 @@
         use crate::parser::Parse;
         use crate::values::specified::length::LengthPercentageOrAuto;
         pub fn parse_value<'i, 't>(
             context: &ParserContext,
             input: &mut Parser<'i, 't>,
         ) -> Result<Longhands, ParseError<'i>> {
             let start_value = LengthPercentageOrAuto::parse(context, input)?;
             let end_value =
-                input.try(|input| LengthPercentageOrAuto::parse(context, input)).unwrap_or_else(|_| start_value.clone());
+                input.try(|input| LengthPercentageOrAuto::parse(context, input))
+                    .unwrap_or_else(|_| start_value.clone());
 
             Ok(expanded! {
                 inset_${axis}_start: start_value,
                 inset_${axis}_end: end_value,
             })
         }
 
         impl<'a> ToCss for LonghandsToSerialize<'a>  {