Skip to content

Commit

Permalink
Update all non-static Servo preference names to match new names
Browse files Browse the repository at this point in the history
  • Loading branch information
mrobinson committed Jan 13, 2025
1 parent dfed17b commit 4bf0c2e
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion style/global_style_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl StyleThreadPool {

#[cfg(feature = "servo")]
fn stylo_threads_pref() -> i32 {
style_config::get_i32("layout.threads")
style_config::get_i32("layout_threads")
}

#[cfg(feature = "gecko")]
Expand Down
6 changes: 3 additions & 3 deletions style/properties/longhands/box.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ ${helpers.predefined_type(
"computed::ContainerType::Normal",
engines="gecko servo",
animation_type="none",
servo_pref="layout.container-queries.enabled",
servo_pref="layout_container_queries_enabled",
spec="https://drafts.csswg.org/css-contain-3/#container-type",
affects="layout",
)}
Expand All @@ -516,7 +516,7 @@ ${helpers.predefined_type(
"computed::ContainerName::none()",
engines="gecko servo",
animation_type="none",
servo_pref="layout.container-queries.enabled",
servo_pref="layout_container_queries_enabled",
spec="https://drafts.csswg.org/css-contain-3/#container-name",
affects="",
)}
Expand Down Expand Up @@ -632,7 +632,7 @@ ${helpers.predefined_type(
engines="gecko servo",
spec="Non-standard (https://github.com/atanassov/css-zoom/ is the closest)",
gecko_pref="layout.css.zoom.enabled",
servo_pref="layout.unimplemented",
servo_pref="layout_unimplemented",
affects="layout",
enabled_in="chrome",
)}
6 changes: 3 additions & 3 deletions style/properties/longhands/column.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ${helpers.predefined_type(
"computed::length::NonNegativeLengthOrAuto::auto()",
engines="gecko servo",
initial_specified_value="specified::length::NonNegativeLengthOrAuto::auto()",
servo_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",
Expand All @@ -22,7 +22,7 @@ ${helpers.predefined_type(
"computed::ColumnCount::Auto",
engines="gecko servo",
initial_specified_value="specified::ColumnCount::Auto",
servo_pref="layout.columns.enabled",
servo_pref="layout_columns_enabled",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-count",
servo_restyle_damage="rebuild_and_reflow",
affects="layout",
Expand Down Expand Up @@ -64,7 +64,7 @@ ${helpers.single_keyword(
"column-span",
"none all",
engines="gecko servo",
servo_pref="layout.columns.enabled",
servo_pref="layout_columns_enabled",
animation_type="discrete",
gecko_enum_prefix="StyleColumnSpan",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-span",
Expand Down
4 changes: 2 additions & 2 deletions style/properties/longhands/counters.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ${helpers.predefined_type(
"counter-increment",
"CounterIncrement",
engines="gecko servo",
servo_pref="layout.legacy_layout",
servo_pref="layout_legacy_layout",
initial_value="Default::default()",
animation_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-counter-increment",
Expand All @@ -32,7 +32,7 @@ ${helpers.predefined_type(
"counter-reset",
"CounterReset",
engines="gecko servo",
servo_pref="layout.legacy_layout",
servo_pref="layout_legacy_layout",
initial_value="Default::default()",
animation_type="discrete",
spec="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset",
Expand Down
2 changes: 1 addition & 1 deletion style/properties/longhands/inherited_box.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ${helpers.single_keyword(
gecko_aliases="lr=horizontal-tb lr-tb=horizontal-tb \
rl=horizontal-tb rl-tb=horizontal-tb \
tb=vertical-rl tb-rl=vertical-rl",
servo_pref="layout.writing-mode.enabled",
servo_pref="layout_writing_mode_enabled",
animation_type="none",
spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode",
gecko_enum_prefix="StyleWritingModeProperty",
Expand Down
2 changes: 1 addition & 1 deletion style/properties/longhands/inherited_ui.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ${helpers.predefined_type(
"ColorScheme",
"specified::color::ColorScheme::normal()",
engines="gecko servo",
servo_pref="layout.unimplemented",
servo_pref="layout_unimplemented",
spec="https://drafts.csswg.org/css-color-adjust/#color-scheme-prop",
animation_type="discrete",
ignored_when_colors_disabled=True,
Expand Down
2 changes: 1 addition & 1 deletion style/properties/longhands/list.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ${helpers.predefined_type(
"Quotes",
"computed::Quotes::get_initial_value()",
engines="gecko servo",
servo_pref="layout.legacy_layout",
servo_pref="layout_legacy_layout",
animation_type="discrete",
spec="https://drafts.csswg.org/css-content/#propdef-quotes",
servo_restyle_damage="rebuild_and_reflow",
Expand Down
24 changes: 12 additions & 12 deletions style/properties/longhands/position.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ${helpers.single_keyword(
"flex-direction",
"row row-reverse column column-reverse",
engines="gecko servo",
servo_pref="layout.flexbox.enabled",
servo_pref="layout_flexbox_enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-direction-property",
extra_prefixes="webkit",
animation_type="discrete",
Expand All @@ -66,7 +66,7 @@ ${helpers.single_keyword(
"flex-wrap",
"nowrap wrap wrap-reverse",
engines="gecko servo",
servo_pref="layout.flexbox.enabled",
servo_pref="layout_flexbox_enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-wrap-property",
extra_prefixes="webkit",
animation_type="discrete",
Expand Down Expand Up @@ -138,7 +138,7 @@ ${helpers.predefined_type(
"NonNegativeNumber",
"From::from(1.0)",
engines="gecko servo",
servo_pref="layout.flexbox.enabled",
servo_pref="layout_flexbox_enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property",
extra_prefixes="webkit",
servo_restyle_damage = "reflow",
Expand Down Expand Up @@ -174,7 +174,7 @@ ${helpers.predefined_type(
"Integer",
"0",
engines="gecko servo",
servo_pref="layout.flexbox.enabled",
servo_pref="layout_flexbox_enabled",
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-flexbox/#order-property",
servo_restyle_damage="reflow",
Expand All @@ -186,7 +186,7 @@ ${helpers.predefined_type(
"FlexBasis",
"computed::FlexBasis::auto()",
engines="gecko servo",
servo_pref="layout.flexbox.enabled",
servo_pref="layout_flexbox_enabled",
spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property",
extra_prefixes="webkit",
servo_restyle_damage="reflow",
Expand Down Expand Up @@ -344,7 +344,7 @@ ${helpers.predefined_type(
"GridLine",
"Default::default()",
engines="gecko servo",
servo_pref="layout.grid.enabled",
servo_pref="layout_grid_enabled",
animation_type="discrete",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-%s-%s" % (kind, range),
affects="layout",
Expand All @@ -356,7 +356,7 @@ ${helpers.predefined_type(
"ImplicitGridTracks",
"Default::default()",
engines="gecko servo",
servo_pref="layout.grid.enabled",
servo_pref="layout_grid_enabled",
animation_type="discrete",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-auto-%ss" % kind,
affects="layout",
Expand All @@ -367,7 +367,7 @@ ${helpers.predefined_type(
"GridTemplateComponent",
"specified::GenericGridTemplateComponent::None",
engines="gecko servo",
servo_pref="layout.grid.enabled",
servo_pref="layout_grid_enabled",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-template-%ss" % kind,
affects="layout",
)}
Expand All @@ -390,7 +390,7 @@ ${helpers.predefined_type(
"GridAutoFlow",
"computed::GridAutoFlow::ROW",
engines="gecko servo",
servo_pref="layout.grid.enabled",
servo_pref="layout_grid_enabled",
animation_type="discrete",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-auto-flow",
affects="layout",
Expand All @@ -401,7 +401,7 @@ ${helpers.predefined_type(
"GridTemplateAreas",
"computed::GridTemplateAreas::none()",
engines="gecko servo",
servo_pref="layout.grid.enabled",
servo_pref="layout_grid_enabled",
animation_type="discrete",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-template-areas",
affects="layout",
Expand All @@ -413,7 +413,7 @@ ${helpers.predefined_type(
"computed::length::NonNegativeLengthPercentageOrNormal::normal()",
engines="gecko servo",
aliases="grid-column-gap",
servo_pref="layout.flexbox.enabled",
servo_pref="layout_flexbox_enabled",
spec="https://drafts.csswg.org/css-align-3/#propdef-column-gap",
servo_restyle_damage="reflow",
affects="layout",
Expand All @@ -426,7 +426,7 @@ ${helpers.predefined_type(
"computed::length::NonNegativeLengthPercentageOrNormal::normal()",
engines="gecko servo",
aliases="grid-row-gap",
servo_pref="layout.flexbox.enabled",
servo_pref="layout_flexbox_enabled",
spec="https://drafts.csswg.org/css-align-3/#propdef-row-gap",
servo_restyle_damage="reflow",
affects="layout",
Expand Down
2 changes: 1 addition & 1 deletion style/properties/longhands/text.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ${helpers.predefined_type(
"TextOverflow",
"computed::TextOverflow::get_initial_value()",
engines="gecko servo",
servo_pref="layout.legacy_layout",
servo_pref="layout_legacy_layout",
animation_type="discrete",
boxed=True,
spec="https://drafts.csswg.org/css-ui/#propdef-text-overflow",
Expand Down
6 changes: 3 additions & 3 deletions style/properties/longhands/ui.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ ${helpers.predefined_type(
need_index=True,
animation_type="none",
gecko_pref="layout.css.transition-behavior.enabled",
servo_pref="layout.css.transition-behavior.enabled",
servo_pref="layout_css_transition_behavior_enabled",
spec="https://drafts.csswg.org/css-transitions-2/#transition-behavior-property",
affects="",
)}
Expand Down Expand Up @@ -311,7 +311,7 @@ ${helpers.predefined_type(
need_index=True,
animation_type="none",
gecko_pref="layout.css.animation-composition.enabled",
servo_pref="layout.unimplemented",
servo_pref="layout_unimplemented",
spec="https://drafts.csswg.org/css-animations-2/#animation-composition",
affects="",
)}
Expand All @@ -336,7 +336,7 @@ ${helpers.predefined_type(
"AnimationTimeline",
"computed::AnimationTimeline::auto()",
engines="gecko servo",
servo_pref="layout.unimplemented",
servo_pref="layout_unimplemented",
initial_specified_value="specified::AnimationTimeline::auto()",
vector=True,
need_index=True,
Expand Down
2 changes: 1 addition & 1 deletion style/properties/shorthands/column.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%helpers:shorthand name="columns"
engines="gecko servo"
sub_properties="column-width column-count"
servo_pref="layout.columns.enabled"
servo_pref="layout_columns_enabled"
spec="https://drafts.csswg.org/css-multicol/#propdef-columns">
use crate::properties::longhands::{column_count, column_width};

Expand Down
14 changes: 7 additions & 7 deletions style/properties/shorthands/position.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<%helpers:shorthand name="flex-flow"
engines="gecko servo",
servo_pref="layout.flexbox.enabled",
servo_pref="layout_flexbox_enabled",
sub_properties="flex-direction flex-wrap"
extra_prefixes="webkit"
spec="https://drafts.csswg.org/css-flexbox/#flex-flow-property">
Expand Down Expand Up @@ -62,7 +62,7 @@

<%helpers:shorthand name="flex"
engines="gecko servo",
servo_pref="layout.flexbox.enabled",
servo_pref="layout_flexbox_enabled",
sub_properties="flex-grow flex-shrink flex-basis"
extra_prefixes="webkit"
derive_serialize="True"
Expand Down Expand Up @@ -130,7 +130,7 @@
<%helpers:shorthand
name="gap"
engines="gecko servo"
servo_pref="layout.flexbox.enabled",
servo_pref="layout_flexbox_enabled",
aliases="grid-gap"
sub_properties="row-gap column-gap"
spec="https://drafts.csswg.org/css-align-3/#gap-shorthand"
Expand Down Expand Up @@ -167,7 +167,7 @@
name="grid-${kind}"
sub_properties="grid-${kind}-start grid-${kind}-end"
engines="gecko servo",
servo_pref="layout.grid.enabled",
servo_pref="layout_grid_enabled",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-${kind}"
>
use crate::values::specified::GridLine;
Expand Down Expand Up @@ -222,7 +222,7 @@
<%helpers:shorthand
name="grid-area"
engines="gecko servo"
servo_pref="layout.grid.enabled",
servo_pref="layout_grid_enabled",
sub_properties="grid-row-start grid-row-end grid-column-start grid-column-end"
spec="https://drafts.csswg.org/css-grid/#propdef-grid-area"
>
Expand Down Expand Up @@ -318,7 +318,7 @@
<%helpers:shorthand
name="grid-template"
engines="gecko servo"
servo_pref="layout.grid.enabled",
servo_pref="layout_grid_enabled",
sub_properties="grid-template-rows grid-template-columns grid-template-areas"
spec="https://drafts.csswg.org/css-grid/#propdef-grid-template"
>
Expand Down Expand Up @@ -560,7 +560,7 @@
<%helpers:shorthand
name="grid"
engines="gecko servo"
servo_pref="layout.grid.enabled",
servo_pref="layout_grid_enabled",
sub_properties="grid-template-rows grid-template-columns grid-template-areas
grid-auto-rows grid-auto-columns grid-auto-flow"
spec="https://drafts.csswg.org/css-grid/#propdef-grid"
Expand Down
4 changes: 2 additions & 2 deletions style/values/specified/box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ fn grid_enabled() -> bool {

#[cfg(feature = "servo")]
fn flexbox_enabled() -> bool {
style_config::get_bool("layout.flexbox.enabled")
style_config::get_bool("layout_flexbox_enabled")
}
#[cfg(feature = "servo")]
fn grid_enabled() -> bool {
style_config::get_bool("layout.grid.enabled")
style_config::get_bool("layout_grid_enabled")
}

/// Defines an element’s display type, which consists of
Expand Down

0 comments on commit 4bf0c2e

Please sign in to comment.