summaryrefslogtreecommitdiffstats
path: root/servo/components/style/properties/longhands
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--servo/components/style/properties/longhands/background.mako.rs20
-rw-r--r--servo/components/style/properties/longhands/border.mako.rs25
-rw-r--r--servo/components/style/properties/longhands/box.mako.rs53
-rw-r--r--servo/components/style/properties/longhands/column.mako.rs15
-rw-r--r--servo/components/style/properties/longhands/counters.mako.rs10
-rw-r--r--servo/components/style/properties/longhands/effects.mako.rs15
-rw-r--r--servo/components/style/properties/longhands/font.mako.rs18
-rw-r--r--servo/components/style/properties/longhands/inherited_box.mako.rs15
-rw-r--r--servo/components/style/properties/longhands/inherited_svg.mako.rs4
-rw-r--r--servo/components/style/properties/longhands/inherited_table.mako.rs14
-rw-r--r--servo/components/style/properties/longhands/inherited_text.mako.rs34
-rw-r--r--servo/components/style/properties/longhands/inherited_ui.mako.rs6
-rw-r--r--servo/components/style/properties/longhands/list.mako.rs19
-rw-r--r--servo/components/style/properties/longhands/margin.mako.rs3
-rw-r--r--servo/components/style/properties/longhands/outline.mako.rs16
-rw-r--r--servo/components/style/properties/longhands/padding.mako.rs3
-rw-r--r--servo/components/style/properties/longhands/page.mako.rs2
-rw-r--r--servo/components/style/properties/longhands/position.mako.rs68
-rw-r--r--servo/components/style/properties/longhands/svg.mako.rs2
-rw-r--r--servo/components/style/properties/longhands/table.mako.rs5
-rw-r--r--servo/components/style/properties/longhands/text.mako.rs15
-rw-r--r--servo/components/style/properties/longhands/ui.mako.rs36
-rw-r--r--servo/components/style/properties/longhands/xul.mako.rs4
23 files changed, 176 insertions, 226 deletions
diff --git a/servo/components/style/properties/longhands/background.mako.rs b/servo/components/style/properties/longhands/background.mako.rs
index 48270f748e..535dd64e20 100644
--- a/servo/components/style/properties/longhands/background.mako.rs
+++ b/servo/components/style/properties/longhands/background.mako.rs
@@ -4,13 +4,11 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% data.new_style_struct("Background", inherited=False) %>
-
${helpers.predefined_type(
"background-color",
"Color",
"computed::Color::TRANSPARENT_BLACK",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="SpecifiedValue::transparent()",
spec="https://drafts.csswg.org/css-backgrounds/#background-color",
animation_value_type="AnimatedColor",
@@ -23,7 +21,7 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"background-image",
"Image",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::Image::None",
initial_specified_value="specified::Image::None",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
@@ -38,7 +36,7 @@ ${helpers.predefined_type(
"background-position-" + axis,
"position::" + direction + "Position",
"computed::LengthPercentage::zero_percent()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="SpecifiedValue::initial_specified_value()",
spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-" + axis,
animation_value_type="ComputedValue",
@@ -52,7 +50,7 @@ ${helpers.predefined_type(
"background-repeat",
"BackgroundRepeat",
"computed::BackgroundRepeat::repeat()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::BackgroundRepeat::repeat()",
animation_value_type="discrete",
vector=True,
@@ -62,8 +60,8 @@ ${helpers.predefined_type(
${helpers.single_keyword(
"background-attachment",
- "scroll" + (" fixed" if engine in ["gecko", "servo-2013"] else "") + (" local" if engine == "gecko" else ""),
- engines="gecko servo-2013 servo-2020",
+ "scroll fixed" + (" local" if engine == "gecko" else ""),
+ engines="gecko servo",
vector=True,
gecko_enum_prefix="StyleImageLayerAttachment",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-attachment",
@@ -74,7 +72,7 @@ ${helpers.single_keyword(
${helpers.single_keyword(
"background-clip",
"border-box padding-box content-box",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
extra_gecko_values="text",
vector=True, extra_prefixes="webkit",
gecko_enum_prefix="StyleGeometryBox",
@@ -87,7 +85,7 @@ ${helpers.single_keyword(
${helpers.single_keyword(
"background-origin",
"padding-box border-box content-box",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
vector=True, extra_prefixes="webkit",
gecko_enum_prefix="StyleGeometryBox",
gecko_inexhaustive=True,
@@ -99,7 +97,7 @@ ${helpers.single_keyword(
${helpers.predefined_type(
"background-size",
"BackgroundSize",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::BackgroundSize::auto()",
initial_specified_value="specified::BackgroundSize::auto()",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-size",
diff --git a/servo/components/style/properties/longhands/border.mako.rs b/servo/components/style/properties/longhands/border.mako.rs
index 4d0676f678..59a0fee94a 100644
--- a/servo/components/style/properties/longhands/border.mako.rs
+++ b/servo/components/style/properties/longhands/border.mako.rs
@@ -3,11 +3,8 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% from data import Keyword, Method, ALL_CORNERS, PHYSICAL_SIDES, ALL_SIDES, maybe_moz_logical_alias %>
+<% from data import ALL_CORNERS, ALL_SIDES, maybe_moz_logical_alias %>
-<% data.new_style_struct("Border", inherited=False,
- additional_methods=[Method("border_" + side + "_has_nonzero_width",
- "bool") for side in ["top", "right", "bottom", "left"]]) %>
<%
def maybe_logical_spec(side, kind):
if side[1]: # if it is logical
@@ -23,7 +20,7 @@
${helpers.predefined_type(
"border-%s-color" % side_name, "Color",
"computed_value::T::currentcolor()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-color"),
spec=maybe_logical_spec(side, "color"),
animation_value_type="AnimatedColor",
@@ -37,7 +34,7 @@
${helpers.predefined_type(
"border-%s-style" % side_name, "BorderStyle",
"specified::BorderStyle::None",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-style"),
spec=maybe_logical_spec(side, "style"),
animation_value_type="discrete" if not is_logical else "none",
@@ -50,7 +47,7 @@
"border-%s-width" % side_name,
"BorderSideWidth",
"app_units::Au::from_px(3)",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
aliases=maybe_moz_logical_alias(engine, side, "-moz-border-%s-width"),
spec=maybe_logical_spec(side, "width"),
animation_value_type="NonNegativeLength",
@@ -76,7 +73,7 @@
"BorderCornerRadius",
"computed::BorderCornerRadius::zero()",
"parse",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
extra_prefixes=prefixes,
spec=maybe_logical_spec(corner, "radius"),
boxed=True,
@@ -111,13 +108,13 @@ ${helpers.single_keyword(
${helpers.predefined_type(
"border-image-source",
"Image",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::Image::None",
initial_specified_value="specified::Image::None",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
vector=False,
animation_value_type="discrete",
- boxed=engine == "servo-2013",
+ boxed=engine == "servo",
ignored_when_colors_disabled=True,
affects="paint",
)}
@@ -125,7 +122,7 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"border-image-outset",
"NonNegativeLengthOrNumberRect",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="generics::rect::Rect::all(computed::NonNegativeLengthOrNumber::zero())",
initial_specified_value="generics::rect::Rect::all(specified::NonNegativeLengthOrNumber::zero())",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-outset",
@@ -138,7 +135,7 @@ ${helpers.predefined_type(
"border-image-repeat",
"BorderImageRepeat",
"computed::BorderImageRepeat::stretch()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::BorderImageRepeat::stretch()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-backgrounds/#the-border-image-repeat",
@@ -148,7 +145,7 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"border-image-width",
"BorderImageWidth",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::BorderImageWidth::all(computed::BorderImageSideWidth::one())",
initial_specified_value="specified::BorderImageWidth::all(specified::BorderImageSideWidth::one())",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-width",
@@ -160,7 +157,7 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"border-image-slice",
"BorderImageSlice",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::BorderImageSlice::hundred_percent()",
initial_specified_value="specified::BorderImageSlice::hundred_percent()",
spec="https://drafts.csswg.org/css-backgrounds/#border-image-slice",
diff --git a/servo/components/style/properties/longhands/box.mako.rs b/servo/components/style/properties/longhands/box.mako.rs
index 017bef38ea..187e8f8169 100644
--- a/servo/components/style/properties/longhands/box.mako.rs
+++ b/servo/components/style/properties/longhands/box.mako.rs
@@ -3,17 +3,13 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% from data import ALL_AXES, Keyword, Method, to_rust_ident, to_camel_case%>
-
-<% data.new_style_struct("Box",
- inherited=False,
- gecko_name="Display") %>
+<% from data import ALL_AXES %>
${helpers.predefined_type(
"display",
"Display",
"computed::Display::inline()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::Display::inline()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-display/#propdef-display",
@@ -38,7 +34,7 @@ ${helpers.single_keyword(
${helpers.single_keyword(
"-servo-top-layer",
"none top",
- engines="servo-2013 servo-2020",
+ engines="servo",
animation_value_type="none",
enabled_in="ua",
spec="Internal (not web-exposed)",
@@ -47,8 +43,8 @@ ${helpers.single_keyword(
<%helpers:single_keyword
name="position"
- values="static absolute relative fixed ${'sticky' if engine in ['gecko', 'servo-2013'] else ''}"
- engines="gecko servo-2013 servo-2020"
+ values="static absolute relative fixed sticky"
+ engines="gecko servo"
animation_value_type="discrete"
gecko_enum_prefix="StylePositionProperty"
spec="https://drafts.csswg.org/css-position/#position-property"
@@ -69,8 +65,7 @@ ${helpers.predefined_type(
"float",
"Float",
"computed::Float::None",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
initial_specified_value="specified::Float::None",
spec="https://drafts.csswg.org/css-box/#propdef-float",
animation_value_type="discrete",
@@ -83,7 +78,7 @@ ${helpers.predefined_type(
"clear",
"Clear",
"computed::Clear::None",
- engines="gecko servo-2013",
+ engines="gecko servo",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css2/#propdef-clear",
servo_restyle_damage="rebuild_and_reflow",
@@ -94,7 +89,7 @@ ${helpers.predefined_type(
"vertical-align",
"VerticalAlign",
"computed::VerticalAlign::baseline()",
- engines="gecko servo-2013",
+ engines="gecko servo",
animation_value_type="ComputedValue",
spec="https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align",
servo_restyle_damage = "reflow",
@@ -105,7 +100,7 @@ ${helpers.predefined_type(
"baseline-source",
"BaselineSource",
"computed::BaselineSource::Auto",
- engines="gecko servo-2013",
+ engines="gecko servo",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-inline-3/#baseline-source",
servo_restyle_damage = "reflow",
@@ -117,7 +112,8 @@ ${helpers.predefined_type(
${helpers.single_keyword(
"-servo-overflow-clip-box",
"padding-box content-box",
- engines="servo-2013",
+ engines="servo",
+ servo_pref="layout.legacy_layout",
animation_value_type="none",
enabled_in="ua",
spec="Internal, not web-exposed, \
@@ -146,7 +142,7 @@ ${helpers.single_keyword(
full_name,
"Overflow",
"computed::Overflow::Visible",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
logical_group="overflow",
logical=logical,
animation_value_type="discrete",
@@ -174,7 +170,7 @@ ${helpers.predefined_type(
"transform",
"Transform",
"generics::transform::Transform::none()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
extra_prefixes=transform_extra_prefixes,
animation_value_type="ComputedValue",
flags="CAN_ANIMATE_ON_COMPOSITOR",
@@ -187,7 +183,7 @@ ${helpers.predefined_type(
"rotate",
"Rotate",
"generics::transform::Rotate::None",
- engines="gecko servo-2013",
+ engines="gecko servo",
animation_value_type="ComputedValue",
boxed=True,
flags="CAN_ANIMATE_ON_COMPOSITOR",
@@ -201,7 +197,7 @@ ${helpers.predefined_type(
"scale",
"Scale",
"generics::transform::Scale::None",
- engines="gecko servo-2013",
+ engines="gecko servo",
animation_value_type="ComputedValue",
boxed=True,
flags="CAN_ANIMATE_ON_COMPOSITOR",
@@ -215,7 +211,7 @@ ${helpers.predefined_type(
"translate",
"Translate",
"generics::transform::Translate::None",
- engines="gecko servo-2013",
+ engines="gecko servo",
animation_value_type="ComputedValue",
boxed=True,
flags="CAN_ANIMATE_ON_COMPOSITOR",
@@ -285,7 +281,6 @@ ${helpers.predefined_type(
"computed::OffsetPosition::normal()",
engines="gecko",
animation_value_type="ComputedValue",
- gecko_pref="layout.css.motion-path-offset-position.enabled",
flags="CAN_ANIMATE_ON_COMPOSITOR",
spec="https://drafts.fxtf.org/motion-1/#offset-position-property",
servo_restyle_damage="reflow_out_of_flow",
@@ -409,7 +404,7 @@ ${helpers.predefined_type(
"perspective",
"Perspective",
"computed::Perspective::none()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
gecko_ffi_name="mChildPerspective",
spec="https://drafts.csswg.org/css-transforms/#perspective",
extra_prefixes=transform_extra_prefixes,
@@ -422,7 +417,7 @@ ${helpers.predefined_type(
"perspective-origin",
"Position",
"computed::position::Position::center()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
boxed=True,
extra_prefixes=transform_extra_prefixes,
spec="https://drafts.csswg.org/css-transforms-2/#perspective-origin-property",
@@ -434,7 +429,7 @@ ${helpers.predefined_type(
${helpers.single_keyword(
"backface-visibility",
"visible hidden",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
gecko_enum_prefix="StyleBackfaceVisibility",
spec="https://drafts.csswg.org/css-transforms/#backface-visibility-property",
extra_prefixes=transform_extra_prefixes,
@@ -456,7 +451,7 @@ ${helpers.predefined_type(
"transform-style",
"TransformStyle",
"computed::TransformStyle::Flat",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
spec="https://drafts.csswg.org/css-transforms-2/#transform-style-property",
extra_prefixes=transform_extra_prefixes,
animation_value_type="discrete",
@@ -468,7 +463,7 @@ ${helpers.predefined_type(
"transform-origin",
"TransformOrigin",
"computed::TransformOrigin::initial_value()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
animation_value_type="ComputedValue",
extra_prefixes=transform_extra_prefixes,
gecko_ffi_name="mTransformOrigin",
@@ -503,10 +498,11 @@ ${helpers.predefined_type(
"container-type",
"ContainerType",
"computed::ContainerType::Normal",
- engines="gecko",
+ engines="gecko servo",
animation_value_type="none",
enabled_in="ua",
gecko_pref="layout.css.container-queries.enabled",
+ servo_pref="layout.container-queries.enabled",
spec="https://drafts.csswg.org/css-contain-3/#container-type",
affects="layout",
)}
@@ -515,10 +511,11 @@ ${helpers.predefined_type(
"container-name",
"ContainerName",
"computed::ContainerName::none()",
- engines="gecko",
+ engines="gecko servo",
animation_value_type="none",
enabled_in="ua",
gecko_pref="layout.css.container-queries.enabled",
+ servo_pref="layout.container-queries.enabled",
spec="https://drafts.csswg.org/css-contain-3/#container-name",
affects="",
)}
diff --git a/servo/components/style/properties/longhands/column.mako.rs b/servo/components/style/properties/longhands/column.mako.rs
index 38c32938c6..ca97f36dba 100644
--- a/servo/components/style/properties/longhands/column.mako.rs
+++ b/servo/components/style/properties/longhands/column.mako.rs
@@ -4,17 +4,14 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% data.new_style_struct("Column", inherited=False) %>
-
${helpers.predefined_type(
"column-width",
"length::NonNegativeLengthOrAuto",
"computed::length::NonNegativeLengthOrAuto::auto()",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
initial_specified_value="specified::length::NonNegativeLengthOrAuto::auto()",
animation_value_type="NonNegativeLengthOrAuto",
- servo_2013_pref="layout.columns.enabled",
+ servo_pref="layout.columns.enabled",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-width",
servo_restyle_damage="rebuild_and_reflow",
affects="layout",
@@ -24,10 +21,9 @@ ${helpers.predefined_type(
"column-count",
"ColumnCount",
"computed::ColumnCount::auto()",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
initial_specified_value="specified::ColumnCount::auto()",
- servo_2013_pref="layout.columns.enabled",
+ servo_pref="layout.columns.enabled",
animation_value_type="AnimatedColumnCount",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-count",
servo_restyle_damage="rebuild_and_reflow",
@@ -71,7 +67,8 @@ ${helpers.predefined_type(
${helpers.single_keyword(
"column-span",
"none all",
- engines="gecko",
+ engines="gecko servo",
+ servo_pref="layout.columns.enabled",
animation_value_type="discrete",
gecko_enum_prefix="StyleColumnSpan",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-span",
diff --git a/servo/components/style/properties/longhands/counters.mako.rs b/servo/components/style/properties/longhands/counters.mako.rs
index 6c844c3567..5991bd416c 100644
--- a/servo/components/style/properties/longhands/counters.mako.rs
+++ b/servo/components/style/properties/longhands/counters.mako.rs
@@ -4,13 +4,11 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% data.new_style_struct("Counters", inherited=False, gecko_name="Content") %>
-
${helpers.predefined_type(
"content",
"Content",
"computed::Content::normal()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::Content::normal()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-content/#propdef-content",
@@ -21,7 +19,8 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"counter-increment",
"CounterIncrement",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
initial_value="Default::default()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-counter-increment",
@@ -32,7 +31,8 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"counter-reset",
"CounterReset",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
initial_value="Default::default()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset",
diff --git a/servo/components/style/properties/longhands/effects.mako.rs b/servo/components/style/properties/longhands/effects.mako.rs
index b301aab5dd..742844a670 100644
--- a/servo/components/style/properties/longhands/effects.mako.rs
+++ b/servo/components/style/properties/longhands/effects.mako.rs
@@ -4,14 +4,11 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-// Box-shadow, etc.
-<% data.new_style_struct("Effects", inherited=False) %>
-
${helpers.predefined_type(
"opacity",
"Opacity",
"1.0",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
animation_value_type="ComputedValue",
flags="CAN_ANIMATE_ON_COMPOSITOR",
spec="https://drafts.csswg.org/css-color/#transparency",
@@ -23,8 +20,8 @@ ${helpers.predefined_type(
"box-shadow",
"BoxShadow",
None,
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
vector=True,
simple_vector_bindings=True,
animation_value_type="AnimatedBoxShadowList",
@@ -39,7 +36,7 @@ ${helpers.predefined_type(
"clip",
"ClipRectOrAuto",
"computed::ClipRectOrAuto::auto()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
animation_value_type="ComputedValue",
boxed=True,
allow_quirks="Yes",
@@ -51,7 +48,7 @@ ${helpers.predefined_type(
"filter",
"Filter",
None,
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
vector=True,
simple_vector_bindings=True,
gecko_ffi_name="mFilters",
@@ -84,7 +81,7 @@ ${helpers.single_keyword(
"""normal multiply screen overlay darken lighten color-dodge
color-burn hard-light soft-light difference exclusion hue
saturation color luminosity plus-lighter""",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
gecko_enum_prefix="StyleBlend",
animation_value_type="discrete",
spec="https://drafts.fxtf.org/compositing/#propdef-mix-blend-mode",
diff --git a/servo/components/style/properties/longhands/font.mako.rs b/servo/components/style/properties/longhands/font.mako.rs
index 4583de0bd7..3f7a2f0657 100644
--- a/servo/components/style/properties/longhands/font.mako.rs
+++ b/servo/components/style/properties/longhands/font.mako.rs
@@ -3,14 +3,12 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% from data import Method, to_camel_case, to_rust_ident, to_camel_case_lower, SYSTEM_FONT_LONGHANDS %>
-
-<% data.new_style_struct("Font", inherited=True) %>
+<% from data import SYSTEM_FONT_LONGHANDS %>
${helpers.predefined_type(
"font-family",
"FontFamily",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::FontFamily::serif()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-fonts/#propdef-font-family",
@@ -21,7 +19,7 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"font-style",
"FontStyle",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::FontStyle::normal()",
initial_specified_value="specified::FontStyle::normal()",
animation_value_type="FontStyle",
@@ -39,7 +37,7 @@ ${helpers.predefined_type(
${helpers.single_keyword(
"font-variant-caps",
"normal small-caps",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
extra_gecko_values="all-small-caps petite-caps all-petite-caps unicase titling-caps",
gecko_constant_prefix="NS_FONT_VARIANT_CAPS",
gecko_ffi_name="mFont.variantCaps",
@@ -53,7 +51,7 @@ ${helpers.single_keyword(
${helpers.predefined_type(
"font-weight",
"FontWeight",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::FontWeight::normal()",
initial_specified_value="specified::FontWeight::normal()",
animation_value_type="Number",
@@ -65,7 +63,7 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"font-size",
"FontSize",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::FontSize::medium()",
initial_specified_value="specified::FontSize::medium()",
animation_value_type="NonNegativeLength",
@@ -137,7 +135,7 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"font-stretch",
"FontStretch",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::FontStretch::hundred()",
initial_specified_value="specified::FontStretch::normal()",
animation_value_type="Percentage",
@@ -354,7 +352,7 @@ ${helpers.predefined_type(
"line-height",
"LineHeight",
"computed::LineHeight::normal()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
animation_value_type="LineHeight",
spec="https://drafts.csswg.org/css2/visudet.html#propdef-line-height",
servo_restyle_damage="reflow",
diff --git a/servo/components/style/properties/longhands/inherited_box.mako.rs b/servo/components/style/properties/longhands/inherited_box.mako.rs
index 7fd94d1a1f..add367798b 100644
--- a/servo/components/style/properties/longhands/inherited_box.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_box.mako.rs
@@ -4,13 +4,11 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% data.new_style_struct("InheritedBox", inherited=True, gecko_name="Visibility") %>
-
// TODO: collapse. Well, do tables first.
${helpers.single_keyword(
"visibility",
"visible hidden collapse",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
gecko_ffi_name="mVisible",
animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-box/#propdef-visibility",
@@ -23,13 +21,12 @@ ${helpers.single_keyword(
${helpers.single_keyword(
"writing-mode",
"horizontal-tb vertical-rl vertical-lr",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
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",
+ servo_pref="layout.writing-mode.enabled",
animation_value_type="none",
spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode",
gecko_enum_prefix="StyleWritingModeProperty",
@@ -40,8 +37,8 @@ ${helpers.single_keyword(
${helpers.single_keyword(
"direction",
"ltr rtl",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
animation_value_type="none",
spec="https://drafts.csswg.org/css-writing-modes/#propdef-direction",
gecko_enum_prefix="StyleDirection",
@@ -88,7 +85,7 @@ ${helpers.predefined_type(
"image-rendering",
"ImageRendering",
"computed::ImageRendering::Auto",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
spec="https://drafts.csswg.org/css-images/#propdef-image-rendering",
animation_value_type="discrete",
affects="paint",
diff --git a/servo/components/style/properties/longhands/inherited_svg.mako.rs b/servo/components/style/properties/longhands/inherited_svg.mako.rs
index 90443f962a..d01d5a4a80 100644
--- a/servo/components/style/properties/longhands/inherited_svg.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_svg.mako.rs
@@ -4,10 +4,6 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-// SVG 2
-// https://svgwg.org/svg2-draft/
-<% data.new_style_struct("InheritedSVG", inherited=True, gecko_name="SVG") %>
-
// Section 10 - Text
${helpers.single_keyword(
diff --git a/servo/components/style/properties/longhands/inherited_table.mako.rs b/servo/components/style/properties/longhands/inherited_table.mako.rs
index 7eb42a6eb2..c7ada525b8 100644
--- a/servo/components/style/properties/longhands/inherited_table.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_table.mako.rs
@@ -4,12 +4,11 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% data.new_style_struct("InheritedTable", inherited=True, gecko_name="TableBorder") %>
-
${helpers.single_keyword(
"border-collapse",
"separate collapse",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
gecko_enum_prefix="StyleBorderCollapse",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-tables/#propdef-border-collapse",
@@ -20,7 +19,8 @@ ${helpers.single_keyword(
${helpers.single_keyword(
"empty-cells",
"show hide",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
gecko_enum_prefix="StyleEmptyCells",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-tables/#propdef-empty-cells",
@@ -32,7 +32,8 @@ ${helpers.predefined_type(
"caption-side",
"table::CaptionSide",
"computed::table::CaptionSide::Top",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-tables/#propdef-caption-side",
servo_restyle_damage="rebuild_and_reflow",
@@ -43,8 +44,7 @@ ${helpers.predefined_type(
"border-spacing",
"BorderSpacing",
"computed::BorderSpacing::zero()",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
animation_value_type="BorderSpacing",
boxed=True,
spec="https://drafts.csswg.org/css-tables/#propdef-border-spacing",
diff --git a/servo/components/style/properties/longhands/inherited_text.mako.rs b/servo/components/style/properties/longhands/inherited_text.mako.rs
index 544ba99bf7..c6ad907b23 100644
--- a/servo/components/style/properties/longhands/inherited_text.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_text.mako.rs
@@ -3,14 +3,12 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% from data import Keyword %>
-<% data.new_style_struct("InheritedText", inherited=True, gecko_name="Text") %>
${helpers.predefined_type(
"color",
"ColorPropertyValue",
"crate::color::AbsoluteColor::BLACK",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
animation_value_type="AbsoluteColor",
ignored_when_colors_disabled="True",
spec="https://drafts.csswg.org/css-color/#color",
@@ -23,7 +21,8 @@ ${helpers.predefined_type(
"text-transform",
"TextTransform",
"computed::TextTransform::none()",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-text-transform",
servo_restyle_damage="rebuild_and_reflow",
@@ -58,8 +57,7 @@ ${helpers.predefined_type(
"text-indent",
"TextIndent",
"computed::TextIndent::zero()",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-text/#propdef-text-indent",
servo_restyle_damage = "reflow",
@@ -72,8 +70,8 @@ ${helpers.predefined_type(
"overflow-wrap",
"OverflowWrap",
"computed::OverflowWrap::Normal",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap",
aliases="word-wrap",
@@ -85,8 +83,8 @@ ${helpers.predefined_type(
"word-break",
"WordBreak",
"computed::WordBreak::Normal",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-word-break",
servo_restyle_damage="rebuild_and_reflow",
@@ -97,8 +95,7 @@ ${helpers.predefined_type(
"text-justify",
"TextJustify",
"computed::TextJustify::Auto",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-text-justify",
servo_restyle_damage="rebuild_and_reflow",
@@ -109,7 +106,7 @@ ${helpers.predefined_type(
"text-align-last",
"TextAlignLast",
"computed::text::TextAlignLast::Auto",
- engines="gecko",
+ engines="gecko servo",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-text-align-last",
affects="layout",
@@ -120,7 +117,7 @@ ${helpers.predefined_type(
"text-align",
"TextAlign",
"computed::TextAlign::Start",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-text-align",
servo_restyle_damage = "reflow",
@@ -131,7 +128,7 @@ ${helpers.predefined_type(
"letter-spacing",
"LetterSpacing",
"computed::LetterSpacing::normal()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-text/#propdef-letter-spacing",
servo_restyle_damage="rebuild_and_reflow",
@@ -142,7 +139,7 @@ ${helpers.predefined_type(
"word-spacing",
"WordSpacing",
"computed::WordSpacing::zero()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-text/#propdef-word-spacing",
servo_restyle_damage="rebuild_and_reflow",
@@ -164,7 +161,8 @@ ${helpers.predefined_type(
"text-shadow",
"SimpleShadow",
None,
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
vector=True,
vector_animation_type="with_zero",
animation_value_type="AnimatedTextShadowList",
@@ -304,7 +302,7 @@ ${helpers.single_keyword(
${helpers.single_keyword(
"text-rendering",
"auto optimizespeed optimizelegibility geometricprecision",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
gecko_enum_prefix="StyleTextRendering",
animation_value_type="discrete",
spec="https://svgwg.org/svg2-draft/painting.html#TextRenderingProperty",
diff --git a/servo/components/style/properties/longhands/inherited_ui.mako.rs b/servo/components/style/properties/longhands/inherited_ui.mako.rs
index 6cdf721336..7ee1adc602 100644
--- a/servo/components/style/properties/longhands/inherited_ui.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_ui.mako.rs
@@ -4,13 +4,11 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% data.new_style_struct("InheritedUI", inherited=True, gecko_name="UI") %>
-
${helpers.predefined_type(
"cursor",
"Cursor",
"computed::Cursor::auto()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::Cursor::auto()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-ui/#cursor",
@@ -23,7 +21,7 @@ ${helpers.predefined_type(
${helpers.single_keyword(
"pointer-events",
"auto none",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
animation_value_type="discrete",
extra_gecko_values="visiblepainted visiblefill visiblestroke visible painted fill stroke all",
spec="https://svgwg.org/svg2-draft/interact.html#PointerEventsProperty",
diff --git a/servo/components/style/properties/longhands/list.mako.rs b/servo/components/style/properties/longhands/list.mako.rs
index 619724bd32..0a3f8e36ec 100644
--- a/servo/components/style/properties/longhands/list.mako.rs
+++ b/servo/components/style/properties/longhands/list.mako.rs
@@ -4,13 +4,11 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% data.new_style_struct("List", inherited=True) %>
-
${helpers.single_keyword(
"list-style-position",
"outside inside",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
gecko_enum_prefix="StyleListStylePosition",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-position",
@@ -24,17 +22,16 @@ ${helpers.single_keyword(
// upper-roman
//
// [1]: http://dev.w3.org/csswg/css-counter-styles/
-% if engine in ["servo-2013", "servo-2020"]:
+% if engine == "servo":
${helpers.single_keyword(
"list-style-type",
- "disc none circle square disclosure-open disclosure-closed",
- extra_servo_2013_values="""
+ """disc none circle square disclosure-open disclosure-closed
decimal lower-alpha upper-alpha arabic-indic bengali cambodian cjk-decimal devanagari
gujarati gurmukhi kannada khmer lao malayalam mongolian myanmar oriya persian telugu
thai tibetan cjk-earthly-branch cjk-heavenly-stem lower-greek hiragana hiragana-iroha
katakana katakana-iroha
""",
- engines="servo-2013 servo-2020",
+ engines="servo",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type",
servo_restyle_damage="rebuild_and_reflow",
@@ -59,11 +56,12 @@ ${helpers.single_keyword(
${helpers.predefined_type(
"list-style-image",
"Image",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_value="computed::Image::None",
initial_specified_value="specified::Image::None",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-image",
+ boxed=engine == "servo",
servo_restyle_damage="rebuild_and_reflow",
affects="layout",
)}
@@ -72,7 +70,8 @@ ${helpers.predefined_type(
"quotes",
"Quotes",
"computed::Quotes::get_initial_value()",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-content/#propdef-quotes",
servo_restyle_damage="rebuild_and_reflow",
diff --git a/servo/components/style/properties/longhands/margin.mako.rs b/servo/components/style/properties/longhands/margin.mako.rs
index b5a87f9683..1000704140 100644
--- a/servo/components/style/properties/longhands/margin.mako.rs
+++ b/servo/components/style/properties/longhands/margin.mako.rs
@@ -4,7 +4,6 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
<% from data import ALL_SIDES, DEFAULT_RULES_AND_PAGE, maybe_moz_logical_alias %>
-<% data.new_style_struct("Margin", inherited=False) %>
% for side in ALL_SIDES:
<%
@@ -16,7 +15,7 @@
"margin-%s" % side[0],
"LengthPercentageOrAuto",
"computed::LengthPercentageOrAuto::zero()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
aliases=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/outline.mako.rs b/servo/components/style/properties/longhands/outline.mako.rs
index 8e7f956bf5..d366cbc996 100644
--- a/servo/components/style/properties/longhands/outline.mako.rs
+++ b/servo/components/style/properties/longhands/outline.mako.rs
@@ -3,18 +3,12 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% from data import Method %>
-<% data.new_style_struct("Outline",
- inherited=False,
- additional_methods=[Method("outline_has_nonzero_width", "bool")]) %>
-
-// TODO(pcwalton): `invert`
${helpers.predefined_type(
"outline-color",
"Color",
"computed_value::T::currentcolor()",
- engines="gecko servo-2013",
+ engines="gecko servo",
initial_specified_value="specified::Color::currentcolor()",
animation_value_type="AnimatedColor",
ignored_when_colors_disabled=True,
@@ -26,8 +20,7 @@ ${helpers.predefined_type(
"outline-style",
"OutlineStyle",
"computed::OutlineStyle::none()",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
initial_specified_value="specified::OutlineStyle::none()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-ui/#propdef-outline-style",
@@ -38,8 +31,7 @@ ${helpers.predefined_type(
"outline-width",
"BorderSideWidth",
"app_units::Au::from_px(3)",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.2020.unimplemented",
+ engines="gecko servo",
initial_specified_value="specified::BorderSideWidth::medium()",
animation_value_type="NonNegativeLength",
spec="https://drafts.csswg.org/css-ui/#propdef-outline-width",
@@ -50,7 +42,7 @@ ${helpers.predefined_type(
"outline-offset",
"Length",
"crate::values::computed::Length::new(0.)",
- engines="gecko servo-2013",
+ engines="gecko servo",
animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset",
affects="overflow",
diff --git a/servo/components/style/properties/longhands/padding.mako.rs b/servo/components/style/properties/longhands/padding.mako.rs
index a165e2cd34..d3984b71d2 100644
--- a/servo/components/style/properties/longhands/padding.mako.rs
+++ b/servo/components/style/properties/longhands/padding.mako.rs
@@ -4,7 +4,6 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
<% from data import ALL_SIDES, maybe_moz_logical_alias %>
-<% data.new_style_struct("Padding", inherited=False) %>
% for side in ALL_SIDES:
<%
@@ -16,7 +15,7 @@
"padding-%s" % side[0],
"NonNegativeLengthPercentage",
"computed::NonNegativeLengthPercentage::zero()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
aliases=maybe_moz_logical_alias(engine, side, "-moz-padding-%s"),
animation_value_type="NonNegativeLengthPercentage",
logical=side[1],
diff --git a/servo/components/style/properties/longhands/page.mako.rs b/servo/components/style/properties/longhands/page.mako.rs
index 86cd284e18..bb7729c722 100644
--- a/servo/components/style/properties/longhands/page.mako.rs
+++ b/servo/components/style/properties/longhands/page.mako.rs
@@ -5,8 +5,6 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
<% from data import PAGE_RULE %>
-<% data.new_style_struct("Page", inherited=False) %>
-
${helpers.predefined_type(
"size",
"PageSize",
diff --git a/servo/components/style/properties/longhands/position.mako.rs b/servo/components/style/properties/longhands/position.mako.rs
index fb68baa6b4..e71803e026 100644
--- a/servo/components/style/properties/longhands/position.mako.rs
+++ b/servo/components/style/properties/longhands/position.mako.rs
@@ -2,19 +2,16 @@
* 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 to_rust_ident %>
<%namespace name="helpers" file="/helpers.mako.rs" />
<% from data import ALL_SIZES, PHYSICAL_SIDES, LOGICAL_SIDES %>
-<% data.new_style_struct("Position", inherited=False) %>
-
// "top" / "left" / "bottom" / "right"
% for side in PHYSICAL_SIDES:
${helpers.predefined_type(
side,
"LengthPercentageOrAuto",
"computed::LengthPercentageOrAuto::auto()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side,
animation_value_type="ComputedValue",
allow_quirks="Yes",
@@ -29,7 +26,7 @@
"inset-%s" % side,
"LengthPercentageOrAuto",
"computed::LengthPercentageOrAuto::auto()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
spec="https://drafts.csswg.org/css-logical-props/#propdef-inset-%s" % side,
animation_value_type="ComputedValue",
logical=True,
@@ -42,7 +39,7 @@ ${helpers.predefined_type(
"z-index",
"ZIndex",
"computed::ZIndex::auto()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
spec="https://www.w3.org/TR/CSS2/visuren.html#z-index",
animation_value_type="ComputedValue",
affects="paint",
@@ -55,8 +52,8 @@ ${helpers.predefined_type(
${helpers.single_keyword(
"flex-direction",
"row row-reverse column column-reverse",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.flexbox.enabled",
+ engines="gecko servo",
+ servo_pref="layout.flexbox.enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-direction-property",
extra_prefixes="webkit",
animation_value_type="discrete",
@@ -68,8 +65,8 @@ ${helpers.single_keyword(
${helpers.single_keyword(
"flex-wrap",
"nowrap wrap wrap-reverse",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.flexbox.enabled",
+ engines="gecko servo",
+ servo_pref="layout.flexbox.enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-wrap-property",
extra_prefixes="webkit",
animation_value_type="discrete",
@@ -78,12 +75,13 @@ ${helpers.single_keyword(
affects="layout",
)}
-% if engine == "servo-2013":
+% if engine in "servo":
// FIXME: Update Servo to support the same Syntax as Gecko.
${helpers.single_keyword(
"justify-content",
"flex-start stretch flex-end center space-between space-around",
- engines="servo-2013",
+ engines="servo",
+ servo_pref="layout.flexbox.enabled",
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-align/#propdef-justify-content",
animation_value_type="discrete",
@@ -117,12 +115,13 @@ ${helpers.single_keyword(
)}
% endif
-% if engine in ["servo-2013", "servo-2020"]:
+% if engine == "servo":
// FIXME: Update Servo to support the same Syntax as Gecko.
${helpers.single_keyword(
"align-content",
"stretch flex-start flex-end center space-between space-around",
- engines="servo-2013",
+ engines="servo",
+ servo_pref="layout.flexbox.enabled",
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-align/#propdef-align-content",
animation_value_type="discrete",
@@ -133,8 +132,8 @@ ${helpers.single_keyword(
${helpers.single_keyword(
"align-items",
"stretch flex-start flex-end center baseline",
- engines="servo-2013 servo-2020",
- servo_2020_pref="layout.flexbox.enabled",
+ engines="servo",
+ servo_pref="layout.flexbox.enabled",
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-flexbox/#align-items-property",
animation_value_type="discrete",
@@ -195,8 +194,8 @@ ${helpers.predefined_type(
"flex-grow",
"NonNegativeNumber",
"From::from(0.0)",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.flexbox.enabled",
+ engines="gecko servo",
+ servo_pref="layout.flexbox.enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property",
extra_prefixes="webkit",
animation_value_type="NonNegativeNumber",
@@ -208,8 +207,8 @@ ${helpers.predefined_type(
"flex-shrink",
"NonNegativeNumber",
"From::from(1.0)",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.flexbox.enabled",
+ engines="gecko servo",
+ servo_pref="layout.flexbox.enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property",
extra_prefixes="webkit",
animation_value_type="NonNegativeNumber",
@@ -218,13 +217,13 @@ ${helpers.predefined_type(
)}
// https://drafts.csswg.org/css-align/#align-self-property
-% if engine in ["servo-2013", "servo-2020"]:
+% if engine == "servo":
// FIXME: Update Servo to support the same syntax as Gecko.
${helpers.single_keyword(
"align-self",
"auto stretch flex-start flex-end center baseline",
- engines="servo-2013 servo-2020",
- servo_2020_pref="layout.flexbox.enabled",
+ engines="servo",
+ servo_pref="layout.flexbox.enabled",
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-flexbox/#propdef-align-self",
animation_value_type="discrete",
@@ -260,8 +259,8 @@ ${helpers.predefined_type(
"order",
"Integer",
"0",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.flexbox.enabled",
+ engines="gecko servo",
+ servo_pref="layout.flexbox.enabled",
extra_prefixes="webkit",
animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-flexbox/#order-property",
@@ -273,8 +272,8 @@ ${helpers.predefined_type(
"flex-basis",
"FlexBasis",
"computed::FlexBasis::auto()",
- engines="gecko servo-2013 servo-2020",
- servo_2020_pref="layout.flexbox.enabled",
+ engines="gecko servo",
+ servo_pref="layout.flexbox.enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property",
extra_prefixes="webkit",
animation_value_type="FlexBasis",
@@ -294,7 +293,7 @@ ${helpers.predefined_type(
size,
"Size",
"computed::Size::auto()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
logical=logical,
logical_group="size",
allow_quirks="No" if logical else "Yes",
@@ -308,7 +307,7 @@ ${helpers.predefined_type(
"min-%s" % size,
"Size",
"computed::Size::auto()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
logical=logical,
logical_group="min-size",
allow_quirks="No" if logical else "Yes",
@@ -321,7 +320,7 @@ ${helpers.predefined_type(
"max-%s" % size,
"MaxSize",
"computed::MaxSize::none()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
logical=logical,
logical_group="max-size",
allow_quirks="No" if logical else "Yes",
@@ -335,7 +334,7 @@ ${helpers.predefined_type(
${helpers.single_keyword(
"box-sizing",
"content-box border-box",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
extra_prefixes="moz:layout.css.prefixes.box-sizing webkit",
spec="https://drafts.csswg.org/css-ui/#propdef-box-sizing",
gecko_enum_prefix="StyleBoxSizing",
@@ -436,9 +435,9 @@ ${helpers.predefined_type(
"column-gap",
"length::NonNegativeLengthPercentageOrNormal",
"computed::length::NonNegativeLengthPercentageOrNormal::normal()",
- engines="gecko servo-2013",
+ engines="gecko servo",
aliases="grid-column-gap" if engine == "gecko" else "",
- servo_2013_pref="layout.columns.enabled",
+ servo_pref="layout.columns.enabled",
spec="https://drafts.csswg.org/css-align-3/#propdef-column-gap",
animation_value_type="NonNegativeLengthPercentageOrNormal",
servo_restyle_damage="reflow",
@@ -462,7 +461,8 @@ ${helpers.predefined_type(
"aspect-ratio",
"AspectRatio",
"computed::AspectRatio::auto()",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-sizing-4/#aspect-ratio",
servo_restyle_damage="reflow",
diff --git a/servo/components/style/properties/longhands/svg.mako.rs b/servo/components/style/properties/longhands/svg.mako.rs
index 10788d4802..12998d553b 100644
--- a/servo/components/style/properties/longhands/svg.mako.rs
+++ b/servo/components/style/properties/longhands/svg.mako.rs
@@ -4,8 +4,6 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% data.new_style_struct("SVG", inherited=False, gecko_name="SVGReset") %>
-
${helpers.single_keyword(
"vector-effect",
"none non-scaling-stroke",
diff --git a/servo/components/style/properties/longhands/table.mako.rs b/servo/components/style/properties/longhands/table.mako.rs
index 3a756636ad..059838bac1 100644
--- a/servo/components/style/properties/longhands/table.mako.rs
+++ b/servo/components/style/properties/longhands/table.mako.rs
@@ -4,12 +4,11 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% data.new_style_struct("Table", inherited=False) %>
-
${helpers.single_keyword(
"table-layout",
"auto fixed",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
gecko_ffi_name="mLayoutStrategy",
animation_value_type="discrete",
gecko_enum_prefix="StyleTableLayout",
diff --git a/servo/components/style/properties/longhands/text.mako.rs b/servo/components/style/properties/longhands/text.mako.rs
index 0ee8ba3168..68b8ff3ceb 100644
--- a/servo/components/style/properties/longhands/text.mako.rs
+++ b/servo/components/style/properties/longhands/text.mako.rs
@@ -3,15 +3,13 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% from data import Method %>
-
-<% data.new_style_struct("Text", inherited=False, gecko_name="TextReset") %>
${helpers.predefined_type(
"text-overflow",
"TextOverflow",
"computed::TextOverflow::get_initial_value()",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
animation_value_type="discrete",
boxed=True,
spec="https://drafts.csswg.org/css-ui/#propdef-text-overflow",
@@ -22,7 +20,8 @@ ${helpers.predefined_type(
${helpers.single_keyword(
"unicode-bidi",
"normal embed isolate bidi-override isolate-override plaintext",
- engines="gecko servo-2013",
+ engines="gecko servo",
+ servo_pref="layout.legacy_layout",
gecko_enum_prefix="StyleUnicodeBidi",
animation_value_type="none",
spec="https://drafts.csswg.org/css-writing-modes/#propdef-unicode-bidi",
@@ -34,7 +33,7 @@ ${helpers.predefined_type(
"text-decoration-line",
"TextDecorationLine",
"specified::TextDecorationLine::none()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::TextDecorationLine::none()",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line",
@@ -45,7 +44,7 @@ ${helpers.predefined_type(
${helpers.single_keyword(
"text-decoration-style",
"solid double dotted dashed wavy -moz-none",
- engines="gecko servo-2020",
+ engines="gecko servo",
gecko_enum_prefix="StyleTextDecorationStyle",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style",
@@ -56,7 +55,7 @@ ${helpers.predefined_type(
"text-decoration-color",
"Color",
"computed_value::T::currentcolor()",
- engines="gecko servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::Color::currentcolor()",
animation_value_type="AnimatedColor",
ignored_when_colors_disabled=True,
diff --git a/servo/components/style/properties/longhands/ui.mako.rs b/servo/components/style/properties/longhands/ui.mako.rs
index 58006e0d65..762cb64e9a 100644
--- a/servo/components/style/properties/longhands/ui.mako.rs
+++ b/servo/components/style/properties/longhands/ui.mako.rs
@@ -3,11 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% from data import DEFAULT_RULES_EXCEPT_KEYFRAME, Method %>
-
-// CSS Basic User Interface Module Level 1
-// https://drafts.csswg.org/css-ui-3/
-<% data.new_style_struct("UI", inherited=False, gecko_name="UIReset") %>
+<% from data import DEFAULT_RULES_EXCEPT_KEYFRAME %>
// TODO spec says that UAs should not support this
// we should probably remove from gecko (https://bugzilla.mozilla.org/show_bug.cgi?id=1328331)
@@ -145,7 +141,7 @@ ${helpers.predefined_type(
"transition-duration",
"Time",
"computed::Time::zero()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::Time::zero()",
parse_method="parse_non_negative",
vector=True,
@@ -160,7 +156,7 @@ ${helpers.predefined_type(
"transition-timing-function",
"TimingFunction",
"computed::TimingFunction::ease()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::TimingFunction::ease()",
vector=True,
need_index=True,
@@ -174,7 +170,7 @@ ${helpers.predefined_type(
"transition-property",
"TransitionProperty",
"computed::TransitionProperty::all()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::TransitionProperty::all()",
vector=True,
none_value="computed::TransitionProperty::none()",
@@ -189,7 +185,7 @@ ${helpers.predefined_type(
"transition-delay",
"Time",
"computed::Time::zero()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::Time::zero()",
vector=True,
need_index=True,
@@ -219,7 +215,7 @@ ${helpers.predefined_type(
"animation-name",
"AnimationName",
"computed::AnimationName::none()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::AnimationName::none()",
vector=True,
need_index=True,
@@ -234,7 +230,7 @@ ${helpers.predefined_type(
"animation-duration",
"Time",
"computed::Time::zero()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::Time::zero()",
parse_method="parse_non_negative",
vector=True,
@@ -251,7 +247,7 @@ ${helpers.predefined_type(
"animation-timing-function",
"TimingFunction",
"computed::TimingFunction::ease()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::TimingFunction::ease()",
vector=True,
need_index=True,
@@ -265,7 +261,7 @@ ${helpers.predefined_type(
"animation-iteration-count",
"AnimationIterationCount",
"computed::AnimationIterationCount::one()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::AnimationIterationCount::one()",
vector=True,
need_index=True,
@@ -280,7 +276,7 @@ ${helpers.predefined_type(
"animation-direction",
"AnimationDirection",
"computed::AnimationDirection::Normal",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::AnimationDirection::Normal",
vector=True,
need_index=True,
@@ -295,7 +291,7 @@ ${helpers.predefined_type(
"animation-play-state",
"AnimationPlayState",
"computed::AnimationPlayState::Running",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="computed::AnimationPlayState::Running",
vector=True,
need_index=True,
@@ -310,7 +306,7 @@ ${helpers.predefined_type(
"animation-fill-mode",
"AnimationFillMode",
"computed::AnimationFillMode::None",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="computed::AnimationFillMode::None",
vector=True,
need_index=True,
@@ -325,12 +321,13 @@ ${helpers.predefined_type(
"animation-composition",
"AnimationComposition",
"computed::AnimationComposition::Replace",
- engines="gecko",
+ engines="gecko servo",
initial_specified_value="computed::AnimationComposition::Replace",
vector=True,
need_index=True,
animation_value_type="none",
gecko_pref="layout.css.animation-composition.enabled",
+ servo_pref="layout.unimplemented",
spec="https://drafts.csswg.org/css-animations-2/#animation-composition",
affects="",
)}
@@ -339,7 +336,7 @@ ${helpers.predefined_type(
"animation-delay",
"Time",
"computed::Time::zero()",
- engines="gecko servo-2013 servo-2020",
+ engines="gecko servo",
initial_specified_value="specified::Time::zero()",
vector=True,
need_index=True,
@@ -354,7 +351,8 @@ ${helpers.predefined_type(
"animation-timeline",
"AnimationTimeline",
"computed::AnimationTimeline::auto()",
- engines="gecko",
+ engines="gecko servo",
+ servo_pref="layout.unimplemented",
initial_specified_value="specified::AnimationTimeline::auto()",
vector=True,
need_index=True,
diff --git a/servo/components/style/properties/longhands/xul.mako.rs b/servo/components/style/properties/longhands/xul.mako.rs
index 8974ac30dc..f9de8eb239 100644
--- a/servo/components/style/properties/longhands/xul.mako.rs
+++ b/servo/components/style/properties/longhands/xul.mako.rs
@@ -3,10 +3,6 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
-<% from data import Method %>
-
-// Non-standard properties that Gecko uses for XUL elements.
-<% data.new_style_struct("XUL", inherited=False) %>
${helpers.single_keyword(
"-moz-box-align",