summaryrefslogtreecommitdiffstats
path: root/servo/components/style/properties/longhands/position.mako.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /servo/components/style/properties/longhands/position.mako.rs
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'servo/components/style/properties/longhands/position.mako.rs')
-rw-r--r--servo/components/style/properties/longhands/position.mako.rs68
1 files changed, 34 insertions, 34 deletions
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",