Bug 1454591 part 3 - Consistently use top-right-bottom-left order for physical sides. r=heycam
authorXidorn Quan <me@upsuper.org>
Fri, 04 May 2018 15:15:56 +1000
changeset 417110 eff6d5eb51ceeb5b98c96cdbf08fdb43b7fb1f52
parent 417109 c07763d44a66fcd6719b60453703fe87b6d194b7
child 417111 d8252b50ec6c19fbf077db94763396ce7aa107dc
push id63638
push userxquan@mozilla.com
push dateMon, 07 May 2018 00:39:22 +0000
treeherderautoland@881670154df0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1454591
milestone61.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 1454591 part 3 - Consistently use top-right-bottom-left order for physical sides. r=heycam MozReview-Commit-ID: 6pLRSO8YNDI
servo/components/style/properties/data.py
servo/components/style/properties/helpers.mako.rs
--- a/servo/components/style/properties/data.py
+++ b/servo/components/style/properties/data.py
@@ -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 http://mozilla.org/MPL/2.0/.
 
 import re
 
-PHYSICAL_SIDES = ["top", "left", "bottom", "right"]
+PHYSICAL_SIDES = ["top", "right", "bottom", "left"]
 LOGICAL_SIDES = ["block-start", "block-end", "inline-start", "inline-end"]
 PHYSICAL_SIZES = ["width", "height"]
 LOGICAL_SIZES = ["block-size", "inline-size"]
 
 # bool is True when logical
 ALL_SIDES = [(side, False) for side in PHYSICAL_SIDES] + [(side, True) for side in LOGICAL_SIDES]
 ALL_SIZES = [(size, False) for size in PHYSICAL_SIZES] + [(size, True) for size in LOGICAL_SIZES]
 
--- a/servo/components/style/properties/helpers.mako.rs
+++ b/servo/components/style/properties/helpers.mako.rs
@@ -754,17 +754,17 @@
 
         ${caller.body()}
     }
     % endif
 </%def>
 
 <%def name="four_sides_shorthand(name, sub_property_pattern, parser_function,
                                  needs_context=True, allow_quirks=False, **kwargs)">
-    <% sub_properties=' '.join(sub_property_pattern % side for side in ['top', 'right', 'bottom', 'left']) %>
+    <% sub_properties=' '.join(sub_property_pattern % side for side in PHYSICAL_SIDES) %>
     <%call expr="self.shorthand(name, sub_properties=sub_properties, **kwargs)">
         #[allow(unused_imports)]
         use parser::Parse;
         use values::generics::rect::Rect;
         use values::specified;
 
         pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                    -> Result<Longhands, ParseError<'i>> {