Bug 1593642 - servo: 2020: enable CSS parsing of properties that are (somewhat) implemented
authorSimon Sapin <simon.sapin@exyr.org>
Mon, 04 Nov 2019 12:53:01 +0000
changeset 500350 f42af586cb9b1e10c60c0888a49a45441f66cbcb
parent 500349 05767a01cd42b5b04b5dafab4bface35480f3f4b
child 500351 4d83623517236c10c3b7eb30c2bc2ac98871ea37
push id36763
push userrmaries@mozilla.com
push dateMon, 04 Nov 2019 21:44:06 +0000
treeherdermozilla-central@75a7a3400888 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1593642
milestone72.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 1593642 - servo: 2020: enable CSS parsing of properties that are (somewhat) implemented Differential Revision: https://phabricator.services.mozilla.com/D51591
servo/components/style/properties/longhands/border.mako.rs
servo/components/style/properties/longhands/box.mako.rs
servo/components/style/properties/longhands/inherited_box.mako.rs
servo/components/style/properties/longhands/margin.mako.rs
servo/components/style/properties/longhands/padding.mako.rs
servo/components/style/properties/longhands/position.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
--- a/servo/components/style/properties/longhands/border.mako.rs
+++ b/servo/components/style/properties/longhands/border.mako.rs
@@ -19,17 +19,16 @@
     <%
         side_name = side[0]
         is_logical = side[1]
     %>
     ${helpers.predefined_type(
         "border-%s-color" % side_name, "Color",
         "computed_value::T::currentcolor()",
         engines="gecko servo-2013 servo-2020",
-        servo_2020_pref="layout.2020.unimplemented",
         alias=maybe_moz_logical_alias(engine, side, "-moz-border-%s-color"),
         spec=maybe_logical_spec(side, "color"),
         animation_value_type="AnimatedColor",
         logical=is_logical,
         logical_group="border-color",
         allow_quirks="No" if is_logical else "Yes",
         ignored_when_colors_disabled=True,
     )}
@@ -46,17 +45,16 @@
         needs_context=False,
     )}
 
     ${helpers.predefined_type(
         "border-%s-width" % side_name,
         "BorderSideWidth",
         "crate::values::computed::NonNegativeLength::new(3.)",
         engines="gecko servo-2013 servo-2020",
-        servo_2020_pref="layout.2020.unimplemented",
         computed_type="crate::values::computed::NonNegativeLength",
         alias=maybe_moz_logical_alias(engine, side, "-moz-border-%s-width"),
         spec=maybe_logical_spec(side, "width"),
         animation_value_type="NonNegativeLength",
         logical=is_logical,
         logical_group="border-width",
         allow_quirks="No" if is_logical else "Yes",
         servo_restyle_damage="reflow rebuild_and_reflow_inline"
--- a/servo/components/style/properties/longhands/box.mako.rs
+++ b/servo/components/style/properties/longhands/box.mako.rs
@@ -58,17 +58,16 @@ impl computed_value::T {
 }
 </%helpers:single_keyword>
 
 ${helpers.predefined_type(
     "float",
     "Float",
     "computed::Float::None",
     engines="gecko servo-2013 servo-2020",
-    servo_2020_pref="layout.2020.unimplemented",
     initial_specified_value="specified::Float::None",
     spec="https://drafts.csswg.org/css-box/#propdef-float",
     animation_value_type="discrete",
     needs_context=False,
     servo_restyle_damage="rebuild_and_reflow",
     gecko_ffi_name="mFloat",
 )}
 
--- a/servo/components/style/properties/longhands/inherited_box.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_box.mako.rs
@@ -24,25 +24,27 @@
     "writing-mode",
     "horizontal-tb vertical-rl vertical-lr",
     engines="gecko servo-2013 servo-2020",
     extra_gecko_values="sideways-rl sideways-lr",
     gecko_aliases="lr=horizontal-tb lr-tb=horizontal-tb \
                          rl=horizontal-tb rl-tb=horizontal-tb \
                          tb=vertical-rl   tb-rl=vertical-rl",
     servo_2013_pref="layout.writing-mode.enabled",
+    servo_2020_pref="layout.writing-mode.enabled",
     animation_value_type="none",
     spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode",
     servo_restyle_damage="rebuild_and_reflow",
 )}
 
 ${helpers.single_keyword(
     "direction",
     "ltr rtl",
     engines="gecko servo-2013 servo-2020",
+    servo_2020_pref="layout.2020.unimplemented",
     animation_value_type="none",
     spec="https://drafts.csswg.org/css-writing-modes/#propdef-direction",
     needs_conversion=True,
     servo_restyle_damage="rebuild_and_reflow",
 )}
 
 ${helpers.single_keyword(
     "text-orientation",
--- a/servo/components/style/properties/longhands/margin.mako.rs
+++ b/servo/components/style/properties/longhands/margin.mako.rs
@@ -12,17 +12,16 @@
         if side[1]:
             spec = "https://drafts.csswg.org/css-logical-props/#propdef-margin-%s" % side[1]
     %>
     ${helpers.predefined_type(
         "margin-%s" % side[0],
         "LengthPercentageOrAuto",
         "computed::LengthPercentageOrAuto::zero()",
         engines="gecko servo-2013 servo-2020",
-        servo_2020_pref="layout.2020.unimplemented",
         alias=maybe_moz_logical_alias(engine, side, "-moz-margin-%s"),
         allow_quirks="No" if side[1] else "Yes",
         animation_value_type="ComputedValue",
         logical=side[1],
         logical_group="margin",
         spec=spec,
         allowed_in_page_rule=True,
         servo_restyle_damage="reflow"
--- a/servo/components/style/properties/longhands/padding.mako.rs
+++ b/servo/components/style/properties/longhands/padding.mako.rs
@@ -12,17 +12,16 @@
         if side[1]:
             spec = "https://drafts.csswg.org/css-logical-props/#propdef-padding-%s" % side[1]
     %>
     ${helpers.predefined_type(
         "padding-%s" % side[0],
         "NonNegativeLengthPercentage",
         "computed::NonNegativeLengthPercentage::zero()",
         engines="gecko servo-2013 servo-2020",
-        servo_2020_pref="layout.2020.unimplemented",
         alias=maybe_moz_logical_alias(engine, side, "-moz-padding-%s"),
         animation_value_type="NonNegativeLengthPercentage",
         logical=side[1],
         logical_group="padding",
         spec=spec,
         allow_quirks="No" if side[1] else "Yes",
         servo_restyle_damage="reflow rebuild_and_reflow_inline"
     )}
--- a/servo/components/style/properties/longhands/position.mako.rs
+++ b/servo/components/style/properties/longhands/position.mako.rs
@@ -10,32 +10,30 @@
 
 // "top" / "left" / "bottom" / "right"
 % for side in PHYSICAL_SIDES:
     ${helpers.predefined_type(
         side,
         "LengthPercentageOrAuto",
         "computed::LengthPercentageOrAuto::auto()",
         engines="gecko servo-2013 servo-2020",
-        servo_2020_pref="layout.2020.unimplemented",
         spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side,
         animation_value_type="ComputedValue",
         allow_quirks="Yes",
         servo_restyle_damage="reflow_out_of_flow",
         logical_group="inset",
     )}
 % endfor
 // inset-* logical properties, map to "top" / "left" / "bottom" / "right"
 % for side in LOGICAL_SIDES:
     ${helpers.predefined_type(
         "inset-%s" % side,
         "LengthPercentageOrAuto",
         "computed::LengthPercentageOrAuto::auto()",
         engines="gecko servo-2013 servo-2020",
-        servo_2020_pref="layout.2020.unimplemented",
         spec="https://drafts.csswg.org/css-logical-props/#propdef-inset-%s" % side,
         alias="offset-%s:layout.css.offset-logical-properties.enabled" % side,
         animation_value_type="ComputedValue",
         logical=True,
         logical_group="inset",
     )}
 % endfor
 
@@ -273,17 +271,16 @@ macro_rules! impl_align_conversions {
             spec = "https://drafts.csswg.org/css-logical-props/#propdef-%s"
     %>
     // width, height, block-size, inline-size
     ${helpers.predefined_type(
         size,
         "Size",
         "computed::Size::auto()",
         engines="gecko servo-2013 servo-2020",
-        servo_2020_pref="layout.2020.unimplemented",
         logical=logical,
         logical_group="size",
         allow_quirks="No" if logical else "Yes",
         spec=spec % size,
         animation_value_type="Size",
         servo_restyle_damage="reflow",
     )}
     // min-width, min-height, min-block-size, min-inline-size
--- a/servo/components/style/properties/shorthands/border.mako.rs
+++ b/servo/components/style/properties/shorthands/border.mako.rs
@@ -4,33 +4,33 @@
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 <% from data import to_rust_ident, ALL_SIDES, PHYSICAL_SIDES, maybe_moz_logical_alias %>
 
 ${helpers.four_sides_shorthand(
     "border-color",
     "border-%s-color",
     "specified::Color::parse",
-    engines="gecko servo-2013",
+    engines="gecko servo-2013 servo-2020",
     spec="https://drafts.csswg.org/css-backgrounds/#border-color",
     allow_quirks="Yes",
 )}
 
 ${helpers.four_sides_shorthand(
     "border-style",
     "border-%s-style",
     "specified::BorderStyle::parse",
-    engines="gecko servo-2013",
+    engines="gecko servo-2013 servo-2020",
     needs_context=False,
     spec="https://drafts.csswg.org/css-backgrounds/#border-style",
 )}
 
 <%helpers:shorthand
     name="border-width"
-    engines="gecko servo-2013"
+    engines="gecko servo-2013 servo-2020"
     sub_properties="${
         ' '.join('border-%s-width' % side
                  for side in PHYSICAL_SIDES)}"
     spec="https://drafts.csswg.org/css-backgrounds/#border-width">
     use crate::values::generics::rect::Rect;
     use crate::values::specified::{AllowQuirks, BorderSideWidth};
 
     pub fn parse_value<'i, 't>(
--- a/servo/components/style/properties/shorthands/margin.mako.rs
+++ b/servo/components/style/properties/shorthands/margin.mako.rs
@@ -3,37 +3,37 @@
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 ${helpers.four_sides_shorthand(
     "margin",
     "margin-%s",
     "specified::LengthPercentageOrAuto::parse",
-    engines="gecko servo-2013",
+    engines="gecko servo-2013 servo-2020",
     spec="https://drafts.csswg.org/css-box/#propdef-margin",
     allowed_in_page_rule=True,
     allow_quirks="Yes",
 )}
 
 ${helpers.two_properties_shorthand(
     "margin-block",
     "margin-block-start",
     "margin-block-end",
     "specified::LengthPercentageOrAuto::parse",
-    engines="gecko servo-2013",
+    engines="gecko servo-2013 servo-2020",
     spec="https://drafts.csswg.org/css-logical/#propdef-margin-block"
 )}
 
 ${helpers.two_properties_shorthand(
     "margin-inline",
     "margin-inline-start",
     "margin-inline-end",
     "specified::LengthPercentageOrAuto::parse",
-    engines="gecko servo-2013",
+    engines="gecko servo-2013 servo-2020",
     spec="https://drafts.csswg.org/css-logical/#propdef-margin-inline"
 )}
 
 ${helpers.four_sides_shorthand(
     "scroll-margin",
     "scroll-margin-%s",
     "specified::Length::parse",
     engines="gecko",
--- a/servo/components/style/properties/shorthands/padding.mako.rs
+++ b/servo/components/style/properties/shorthands/padding.mako.rs
@@ -3,36 +3,36 @@
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 ${helpers.four_sides_shorthand(
     "padding",
     "padding-%s",
     "specified::NonNegativeLengthPercentage::parse",
-    engines="gecko servo-2013",
+    engines="gecko servo-2013 servo-2020",
     spec="https://drafts.csswg.org/css-box-3/#propdef-padding",
     allow_quirks="Yes",
 )}
 
 ${helpers.two_properties_shorthand(
     "padding-block",
     "padding-block-start",
     "padding-block-end",
     "specified::NonNegativeLengthPercentage::parse",
-    engines="gecko servo-2013",
+    engines="gecko servo-2013 servo-2020",
     spec="https://drafts.csswg.org/css-logical/#propdef-padding-block"
 )}
 
 ${helpers.two_properties_shorthand(
     "padding-inline",
     "padding-inline-start",
     "padding-inline-end",
     "specified::NonNegativeLengthPercentage::parse",
-    engines="gecko servo-2013",
+    engines="gecko servo-2013 servo-2020",
     spec="https://drafts.csswg.org/css-logical/#propdef-padding-inline"
 )}
 
 ${helpers.four_sides_shorthand(
     "scroll-padding",
     "scroll-padding-%s",
     "specified::NonNegativeLengthPercentageOrAuto::parse",
     engines="gecko",