diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 7d1a7344345..bcf24aac879 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -2597,7 +2597,7 @@ fn static_assert() { <% scroll_snap_type_keyword = Keyword("scroll-snap-type", "none mandatory proximity") %> - ${impl_keyword('scroll_snap_type_y', 'mScrollSnapTypeY', scroll_snap_type_keyword, need_clone=False)} + ${impl_keyword('scroll_snap_type_y', 'mScrollSnapTypeY', scroll_snap_type_keyword, need_clone=True)} pub fn set_perspective_origin(&mut self, v: longhands::perspective_origin::computed_value::T) { self.gecko.mPerspectiveOrigin[0].set(v.horizontal); @@ -3576,7 +3576,7 @@ fn static_assert() { <%self:impl_trait style_struct_name="InheritedText" skip_longhands="text-align text-emphasis-style text-shadow line-height letter-spacing word-spacing - -webkit-text-stroke-width text-emphasis-position -moz-tab-size -moz-text-size-adjust"> + -webkit-text-stroke-width text-emphasis-position -moz-tab-size"> <% text_align_keyword = Keyword("text-align", "start end left right center justify -moz-center -moz-left -moz-right char", @@ -3753,11 +3753,6 @@ fn static_assert() { } <%call expr="impl_coord_copy('_moz_tab_size', 'mTabSize')"> - - <% text_size_adjust_keyword = Keyword("text-size-adjust", "auto none") %> - - ${impl_keyword('_moz_text_size_adjust', 'mTextSizeAdjust', text_size_adjust_keyword, need_clone=False)} - <%self:impl_trait style_struct_name="Text" diff --git a/components/style/properties/longhand/box.mako.rs b/components/style/properties/longhand/box.mako.rs index a6fc0f66add..44d80cf7b15 100644 --- a/components/style/properties/longhand/box.mako.rs +++ b/components/style/properties/longhand/box.mako.rs @@ -1612,7 +1612,7 @@ ${helpers.single_keyword("scroll-snap-type-x", spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-type-x)", animation_value_type="discrete")} -<%helpers:longhand products="gecko" name="scroll-snap-type-y" animation_value_type="none" +<%helpers:longhand products="gecko" name="scroll-snap-type-y" animation_value_type="discrete" spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-type-x)"> pub use super::scroll_snap_type_x::SpecifiedValue; pub use super::scroll_snap_type_x::computed_value; @@ -1710,7 +1710,7 @@ ${helpers.predefined_type("transform-origin", // FIXME: `size` and `content` values are not implemented and `strict` is implemented // like `content`(layout style paint) in gecko. We should implement `size` and `content`, // also update the glue once they are implemented in gecko. -<%helpers:longhand name="contain" animation_value_type="none" products="gecko" need_clone="True" +<%helpers:longhand name="contain" animation_value_type="discrete" products="gecko" need_clone="True" flags="FIXPOS_CB" spec="https://drafts.csswg.org/css-contain/#contain-property"> use std::fmt; diff --git a/components/style/properties/longhand/inherited_text.mako.rs b/components/style/properties/longhand/inherited_text.mako.rs index 8a4aea6a2b0..8264dd2d258 100644 --- a/components/style/properties/longhand/inherited_text.mako.rs +++ b/components/style/properties/longhand/inherited_text.mako.rs @@ -18,18 +18,20 @@ ${helpers.predefined_type("line-height", ${helpers.single_keyword("text-transform", "none capitalize uppercase lowercase", extra_gecko_values="full-width", - animation_value_type="none", + animation_value_type="discrete", spec="https://drafts.csswg.org/css-text/#propdef-text-transform")} ${helpers.single_keyword("hyphens", "manual none auto", gecko_enum_prefix="StyleHyphens", - products="gecko", animation_value_type="none", extra_prefixes="moz", + gecko_inexhaustive=True, + products="gecko", animation_value_type="discrete", extra_prefixes="moz", spec="https://drafts.csswg.org/css-text/#propdef-hyphens")} // TODO: Support ${helpers.single_keyword("-moz-text-size-adjust", "auto none", gecko_constant_prefix="NS_STYLE_TEXT_SIZE_ADJUST", - products="gecko", animation_value_type="none", + gecko_ffi_name="mTextSizeAdjust", + products="gecko", animation_value_type="discrete", spec="https://drafts.csswg.org/css-size-adjust/#adjustment-control", alias="-webkit-text-size-adjust")} @@ -45,7 +47,7 @@ ${helpers.predefined_type("text-indent", ${helpers.single_keyword("overflow-wrap", "normal break-word", gecko_constant_prefix="NS_STYLE_OVERFLOWWRAP", - animation_value_type="none", + animation_value_type="discrete", spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap", alias="word-wrap")} @@ -53,7 +55,7 @@ ${helpers.single_keyword("overflow-wrap", ${helpers.single_keyword("word-break", "normal break-all keep-all", gecko_constant_prefix="NS_STYLE_WORDBREAK", - animation_value_type="none", + animation_value_type="discrete", spec="https://drafts.csswg.org/css-text/#propdef-word-break")} // TODO(pcwalton): Support `text-justify: distribute`. @@ -62,7 +64,8 @@ ${helpers.single_keyword("word-break", extra_gecko_values="inter-character" extra_specified="${'distribute' if product == 'gecko' else ''}" gecko_enum_prefix="StyleTextJustify" - animation_value_type="none" + gecko_inexhaustive="True" + animation_value_type="discrete" spec="https://drafts.csswg.org/css-text/#propdef-text-justify"> no_viewport_percentage!(SpecifiedValue); @@ -101,11 +104,11 @@ ${helpers.single_keyword("text-align-last", "auto start end left right center justify", products="gecko", gecko_constant_prefix="NS_STYLE_TEXT_ALIGN", - animation_value_type="none", + animation_value_type="discrete", spec="https://drafts.csswg.org/css-text/#propdef-text-align-last")} // TODO make this a shorthand and implement text-align-last/text-align-all -<%helpers:longhand name="text-align" animation_value_type="none" need_clone="True" +<%helpers:longhand name="text-align" animation_value_type="discrete" spec="https://drafts.csswg.org/css-text/#propdef-text-align"> no_viewport_percentage!(SpecifiedValue); pub mod computed_value { @@ -360,7 +363,8 @@ ${helpers.predefined_type("word-spacing", extra_gecko_values="-moz-pre-space" gecko_enum_prefix="StyleWhiteSpace" needs_conversion="True" - animation_value_type="none" + gecko_inexhaustive="True" + animation_value_type="discrete" spec="https://drafts.csswg.org/css-text/#propdef-white-space"> use values::computed::ComputedValueAsSpecified; impl ComputedValueAsSpecified for SpecifiedValue {} diff --git a/components/style/properties/longhand/outline.mako.rs b/components/style/properties/longhand/outline.mako.rs index 2b5b2841ba6..70f5b920361 100644 --- a/components/style/properties/longhand/outline.mako.rs +++ b/components/style/properties/longhand/outline.mako.rs @@ -16,7 +16,7 @@ ${helpers.predefined_type("outline-color", "Color", "computed_value::T::currentc ignored_when_colors_disabled=True, spec="https://drafts.csswg.org/css-ui/#propdef-outline-color")} -<%helpers:longhand name="outline-style" need_clone="True" animation_value_type="none" +<%helpers:longhand name="outline-style" animation_value_type="discrete" spec="https://drafts.csswg.org/css-ui/#propdef-outline-style"> use values::specified::BorderStyle;