Bug 1464782: Rename offset-* properties to inset-*. r?xidorn draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 26 Jun 2018 20:37:00 +0200
changeset 811245 2d9158809847177145bdc9006e43ce7c33f56f08
parent 811244 65df1f8bb3cb7c95cadc91b542c1a8b9c11309ac
child 811246 1d63a49db17cae2240bcf0bf51e4b9af3e40759f
push id114244
push userbmo:emilio@crisal.io
push dateWed, 27 Jun 2018 09:27:25 +0000
reviewersxidorn
bugs1464782
milestone63.0a1
Bug 1464782: Rename offset-* properties to inset-*. r?xidorn MozReview-Commit-ID: BW44sru99RF
servo/components/style/properties/helpers.mako.rs
servo/components/style/properties/longhands/position.mako.rs
--- a/servo/components/style/properties/helpers.mako.rs
+++ b/servo/components/style/properties/helpers.mako.rs
@@ -851,17 +851,17 @@
         size = None
         maybe_side = [s for s in LOGICAL_SIDES if s in name]
         maybe_size = [s for s in LOGICAL_SIZES if s in name]
         if len(maybe_side) == 1:
             side = maybe_side[0]
         elif len(maybe_size) == 1:
             size = maybe_size[0]
         def phys_ident(side, phy_side):
-            return to_rust_ident(name.replace(side, phy_side).replace("offset-", ""))
+            return to_rust_ident(name.replace(side, phy_side).replace("inset-", ""))
     %>
     % if side is not None:
         use logical_geometry::PhysicalSide;
         match wm.${to_rust_ident(side)}_physical_side() {
             % for phy_side in PHYSICAL_SIDES:
                 PhysicalSide::${phy_side.title()} => {
                     ${caller.inner(physical_ident=phys_ident(side, phy_side))}
                 }
--- a/servo/components/style/properties/longhands/position.mako.rs
+++ b/servo/components/style/properties/longhands/position.mako.rs
@@ -16,24 +16,25 @@
         "computed::LengthOrPercentageOrAuto::Auto",
         spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side,
         flags="GETCS_NEEDS_LAYOUT_FLUSH",
         animation_value_type="ComputedValue",
         allow_quirks=True,
         servo_restyle_damage="reflow_out_of_flow"
     )}
 % endfor
-// offset-* logical properties, map to "top" / "left" / "bottom" / "right"
+// inset-* logical properties, map to "top" / "left" / "bottom" / "right"
 % for side in LOGICAL_SIDES:
     ${helpers.predefined_type(
-        "offset-%s" % side,
+        "inset-%s" % side,
         "LengthOrPercentageOrAuto",
         "computed::LengthOrPercentageOrAuto::Auto",
-        spec="https://drafts.csswg.org/css-logical-props/#propdef-offset-%s" % side,
+        spec="https://drafts.csswg.org/css-logical-props/#propdef-inset-%s" % side,
         flags="GETCS_NEEDS_LAYOUT_FLUSH",
+        alias="offset-%s" % side,
         animation_value_type="ComputedValue",
         logical=True,
     )}
 % endfor
 
 #[cfg(feature = "gecko")]
 macro_rules! impl_align_conversions {
     ($name: path) => {