From 1930d911b26dc6d9f1527ad820dd9d9d6e22c424 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 4 Nov 2019 12:53:01 +0000 Subject: [PATCH] Bug 1593642 - servo: 2020: enable CSS parsing of properties that are (somewhat) implemented Differential Revision: https://phabricator.services.mozilla.com/D51591 --HG-- extra : moz-landing-system : lando --- servo/components/style/properties/longhands/border.mako.rs | 2 -- servo/components/style/properties/longhands/box.mako.rs | 1 - .../style/properties/longhands/inherited_box.mako.rs | 2 ++ servo/components/style/properties/longhands/margin.mako.rs | 1 - servo/components/style/properties/longhands/padding.mako.rs | 1 - .../components/style/properties/longhands/position.mako.rs | 3 --- servo/components/style/properties/shorthands/border.mako.rs | 6 +++--- servo/components/style/properties/shorthands/margin.mako.rs | 6 +++--- .../components/style/properties/shorthands/padding.mako.rs | 6 +++--- 9 files changed, 11 insertions(+), 17 deletions(-) diff --git a/servo/components/style/properties/longhands/border.mako.rs b/servo/components/style/properties/longhands/border.mako.rs index 4b9ec84ecb53..4d68c8bfc937 100644 --- a/servo/components/style/properties/longhands/border.mako.rs +++ b/servo/components/style/properties/longhands/border.mako.rs @@ -24,7 +24,6 @@ "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", @@ -51,7 +50,6 @@ "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"), diff --git a/servo/components/style/properties/longhands/box.mako.rs b/servo/components/style/properties/longhands/box.mako.rs index b8b6cbc8c340..a68b179c4c0f 100644 --- a/servo/components/style/properties/longhands/box.mako.rs +++ b/servo/components/style/properties/longhands/box.mako.rs @@ -63,7 +63,6 @@ ${helpers.predefined_type( "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", diff --git a/servo/components/style/properties/longhands/inherited_box.mako.rs b/servo/components/style/properties/longhands/inherited_box.mako.rs index 77ee11bdd4c3..8db62bf56d64 100644 --- a/servo/components/style/properties/longhands/inherited_box.mako.rs +++ b/servo/components/style/properties/longhands/inherited_box.mako.rs @@ -29,6 +29,7 @@ ${helpers.single_keyword( 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", @@ -38,6 +39,7 @@ ${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, diff --git a/servo/components/style/properties/longhands/margin.mako.rs b/servo/components/style/properties/longhands/margin.mako.rs index d3598f5ab314..80c765faab73 100644 --- a/servo/components/style/properties/longhands/margin.mako.rs +++ b/servo/components/style/properties/longhands/margin.mako.rs @@ -17,7 +17,6 @@ "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", diff --git a/servo/components/style/properties/longhands/padding.mako.rs b/servo/components/style/properties/longhands/padding.mako.rs index 38534f5fa2fe..79668df7bbfa 100644 --- a/servo/components/style/properties/longhands/padding.mako.rs +++ b/servo/components/style/properties/longhands/padding.mako.rs @@ -17,7 +17,6 @@ "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], diff --git a/servo/components/style/properties/longhands/position.mako.rs b/servo/components/style/properties/longhands/position.mako.rs index 680b6117c426..1c2f5cc2e4ac 100644 --- a/servo/components/style/properties/longhands/position.mako.rs +++ b/servo/components/style/properties/longhands/position.mako.rs @@ -15,7 +15,6 @@ "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", @@ -30,7 +29,6 @@ "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", @@ -278,7 +276,6 @@ ${helpers.predefined_type( "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", diff --git a/servo/components/style/properties/shorthands/border.mako.rs b/servo/components/style/properties/shorthands/border.mako.rs index 4e8cc90e0a23..c1bf200fe456 100644 --- a/servo/components/style/properties/shorthands/border.mako.rs +++ b/servo/components/style/properties/shorthands/border.mako.rs @@ -9,7 +9,7 @@ ${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", )} @@ -18,14 +18,14 @@ ${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)}" diff --git a/servo/components/style/properties/shorthands/margin.mako.rs b/servo/components/style/properties/shorthands/margin.mako.rs index 00e64da02b17..128fc5fb3039 100644 --- a/servo/components/style/properties/shorthands/margin.mako.rs +++ b/servo/components/style/properties/shorthands/margin.mako.rs @@ -8,7 +8,7 @@ ${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", @@ -19,7 +19,7 @@ ${helpers.two_properties_shorthand( "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" )} @@ -28,7 +28,7 @@ ${helpers.two_properties_shorthand( "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" )} diff --git a/servo/components/style/properties/shorthands/padding.mako.rs b/servo/components/style/properties/shorthands/padding.mako.rs index 9ec885c5a3f0..4d2ea361e153 100644 --- a/servo/components/style/properties/shorthands/padding.mako.rs +++ b/servo/components/style/properties/shorthands/padding.mako.rs @@ -8,7 +8,7 @@ ${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", )} @@ -18,7 +18,7 @@ ${helpers.two_properties_shorthand( "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" )} @@ -27,7 +27,7 @@ ${helpers.two_properties_shorthand( "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" )}