diff --git a/components/style/properties/longhand/inherited_box.mako.rs b/components/style/properties/longhand/inherited_box.mako.rs index e6836972f52..f919a95d406 100644 --- a/components/style/properties/longhand/inherited_box.mako.rs +++ b/components/style/properties/longhand/inherited_box.mako.rs @@ -31,42 +31,13 @@ ${helpers.single_keyword("direction", "ltr rtl", need_clone=True, animation_type spec="https://drafts.csswg.org/css-writing-modes/#propdef-direction", needs_conversion=True)} -<%helpers:single_keyword_computed - name="text-orientation" - values="mixed upright sideways" - extra_specified="sideways-right" - products="gecko" - need_clone="True" - animation_type="none" - spec="https://drafts.csswg.org/css-writing-modes/#propdef-text-orientation" -> - use values::HasViewportPercentage; - no_viewport_percentage!(SpecifiedValue); - - impl ToComputedValue for SpecifiedValue { - type ComputedValue = computed_value::T; - - #[inline] - fn to_computed_value(&self, _: &Context) -> computed_value::T { - match *self { - % for value in "mixed upright sideways".split(): - SpecifiedValue::${value} => computed_value::T::${value}, - % endfor - // https://drafts.csswg.org/css-writing-modes-3/#valdef-text-orientation-sideways-right - SpecifiedValue::sideways_right => computed_value::T::sideways, - } - } - - #[inline] - fn from_computed_value(computed: &computed_value::T) -> SpecifiedValue { - match *computed { - % for value in "mixed upright sideways".split(): - computed_value::T::${value} => SpecifiedValue::${value}, - % endfor - } - } - } - +${helpers.single_keyword("text-orientation", + "mixed upright sideways", + extra_gecko_aliases="sideways-right=sideways", + products="gecko", + need_clone=True, + animation_type="none", + spec="https://drafts.csswg.org/css-writing-modes/#propdef-text-orientation")} // CSS Color Module Level 4 // https://drafts.csswg.org/css-color/