Rename 'normal' of animation_value_type to 'ComputedValue'.

This commit is contained in:
Hiroyuki Ikezoe 2017-04-24 15:19:46 +09:00
parent ce51ff3a9a
commit e47d30f668
18 changed files with 67 additions and 61 deletions

View file

@ -178,7 +178,7 @@ class Longhand(object):
# really random. # really random.
if animation_value_type is None: if animation_value_type is None:
raise TypeError("animation_value_type should be specified for (" + name + ")") raise TypeError("animation_value_type should be specified for (" + name + ")")
animation_value_types = ["none", "normal", "discrete"] animation_value_types = ["none", "discrete", "ComputedValue"]
if animation_value_type not in animation_value_types: if animation_value_type not in animation_value_types:
raise TypeError("animation_value_type should be one of (" + raise TypeError("animation_value_type should be one of (" +
str(animation_value_types) + ")") str(animation_value_types) + ")")

View file

@ -10,7 +10,7 @@ ${helpers.predefined_type("background-color", "CSSColor",
"::cssparser::Color::RGBA(::cssparser::RGBA::transparent())", "::cssparser::Color::RGBA(::cssparser::RGBA::transparent())",
initial_specified_value="SpecifiedValue::transparent()", initial_specified_value="SpecifiedValue::transparent()",
spec="https://drafts.csswg.org/css-backgrounds/#background-color", spec="https://drafts.csswg.org/css-backgrounds/#background-color",
animation_value_type="normal", complex_color=True)} animation_value_type="ComputedValue", complex_color=True)}
<%helpers:vector_longhand name="background-image" animation_value_type="none" <%helpers:vector_longhand name="background-image" animation_value_type="none"
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image" spec="https://drafts.csswg.org/css-backgrounds/#the-background-image"
@ -89,7 +89,7 @@ ${helpers.predefined_type("background-color", "CSSColor",
} }
</%helpers:vector_longhand> </%helpers:vector_longhand>
<%helpers:vector_longhand name="background-position-x" animation_value_type="normal" <%helpers:vector_longhand name="background-position-x" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-x" spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-x"
delegate_animate="True"> delegate_animate="True">
use std::fmt; use std::fmt;
@ -140,7 +140,7 @@ ${helpers.predefined_type("background-color", "CSSColor",
} }
</%helpers:vector_longhand> </%helpers:vector_longhand>
<%helpers:vector_longhand name="background-position-y" animation_value_type="normal" <%helpers:vector_longhand name="background-position-y" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-y" spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-y"
delegate_animate="True"> delegate_animate="True">
use std::fmt; use std::fmt;
@ -323,7 +323,7 @@ ${helpers.single_keyword("background-origin",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-origin", spec="https://drafts.csswg.org/css-backgrounds/#the-background-origin",
animation_value_type="none")} animation_value_type="none")}
<%helpers:vector_longhand name="background-size" animation_value_type="normal" extra_prefixes="webkit" <%helpers:vector_longhand name="background-size" animation_value_type="ComputedValue" extra_prefixes="webkit"
spec="https://drafts.csswg.org/css-backgrounds/#the-background-size"> spec="https://drafts.csswg.org/css-backgrounds/#the-background-size">
use cssparser::Token; use cssparser::Token;
use std::ascii::AsciiExt; use std::ascii::AsciiExt;

View file

@ -20,7 +20,7 @@
"::cssparser::Color::CurrentColor", "::cssparser::Color::CurrentColor",
alias=maybe_moz_logical_alias(product, side, "-moz-border-%s-color"), alias=maybe_moz_logical_alias(product, side, "-moz-border-%s-color"),
spec=maybe_logical_spec(side, "color"), spec=maybe_logical_spec(side, "color"),
animation_value_type="normal", logical = side[1])} animation_value_type="ComputedValue", logical = side[1])}
% endfor % endfor
% for side in ALL_SIDES: % for side in ALL_SIDES:
@ -36,7 +36,7 @@ ${helpers.gecko_keyword_conversion(Keyword('border-style',
"none solid double dotted dashed hidden groove ridge inset outset"), "none solid double dotted dashed hidden groove ridge inset outset"),
type="::values::specified::BorderStyle")} type="::values::specified::BorderStyle")}
% for side in ALL_SIDES: % for side in ALL_SIDES:
<%helpers:longhand name="border-${side[0]}-width" animation_value_type="normal" logical="${side[1]}" <%helpers:longhand name="border-${side[0]}-width" animation_value_type="ComputedValue" logical="${side[1]}"
alias="${maybe_moz_logical_alias(product, side, '-moz-border-%s-width')}" alias="${maybe_moz_logical_alias(product, side, '-moz-border-%s-width')}"
spec="${maybe_logical_spec(side, 'width')}"> spec="${maybe_logical_spec(side, 'width')}">
use app_units::Au; use app_units::Au;
@ -70,7 +70,7 @@ ${helpers.gecko_keyword_conversion(Keyword('border-style',
"parse", extra_prefixes="webkit", "parse", extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-backgrounds/#border-%s-radius" % corner, spec="https://drafts.csswg.org/css-backgrounds/#border-%s-radius" % corner,
boxed=True, boxed=True,
animation_value_type="normal")} animation_value_type="ComputedValue")}
% endfor % endfor
${helpers.single_keyword("box-decoration-break", "slice clone", ${helpers.single_keyword("box-decoration-break", "slice clone",

View file

@ -211,7 +211,7 @@ ${helpers.single_keyword("position", "static absolute relative fixed",
</%helpers:longhand> </%helpers:longhand>
<%helpers:longhand name="vertical-align" animation_value_type="normal" <%helpers:longhand name="vertical-align" animation_value_type="ComputedValue"
spec="https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align"> spec="https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align">
use std::fmt; use std::fmt;
use style_traits::ToCss; use style_traits::ToCss;
@ -1100,7 +1100,7 @@ ${helpers.predefined_type("scroll-snap-destination",
products="gecko", products="gecko",
boxed="True", boxed="True",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)", spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)",
animation_value_type="normal")} animation_value_type="ComputedValue")}
${helpers.predefined_type("scroll-snap-coordinate", ${helpers.predefined_type("scroll-snap-coordinate",
"Position", "Position",
@ -1108,14 +1108,14 @@ ${helpers.predefined_type("scroll-snap-coordinate",
vector=True, vector=True,
products="gecko", products="gecko",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)", spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)",
animation_value_type="normal", animation_value_type="ComputedValue",
allow_empty=True, allow_empty=True,
delegate_animate=True)} delegate_animate=True)}
<%helpers:longhand name="transform" extra_prefixes="webkit" <%helpers:longhand name="transform" extra_prefixes="webkit"
animation_value_type="normal" animation_value_type="ComputedValue"
flags="CREATES_STACKING_CONTEXT FIXPOS_CB" flags="CREATES_STACKING_CONTEXT FIXPOS_CB"
spec="https://drafts.csswg.org/css-transforms/#propdef-transform"> spec="https://drafts.csswg.org/css-transforms/#propdef-transform">
use app_units::Au; use app_units::Au;
@ -2094,9 +2094,11 @@ ${helpers.predefined_type("perspective",
spec="https://drafts.csswg.org/css-transforms/#perspective", spec="https://drafts.csswg.org/css-transforms/#perspective",
extra_prefixes="moz webkit", extra_prefixes="moz webkit",
flags="CREATES_STACKING_CONTEXT FIXPOS_CB", flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
animation_value_type="normal")} animation_value_type="ComputedValue")}
<%helpers:longhand name="perspective-origin" boxed="True" animation_value_type="normal" extra_prefixes="moz webkit" <%helpers:longhand name="perspective-origin" boxed="True"
animation_value_type="ComputedValue"
extra_prefixes="moz webkit"
spec="https://drafts.csswg.org/css-transforms/#perspective-origin-property"> spec="https://drafts.csswg.org/css-transforms/#perspective-origin-property">
use std::fmt; use std::fmt;
use style_traits::ToCss; use style_traits::ToCss;
@ -2194,7 +2196,7 @@ ${helpers.single_keyword("transform-style",
flags="CREATES_STACKING_CONTEXT FIXPOS_CB", flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
animation_value_type="none")} animation_value_type="none")}
<%helpers:longhand name="transform-origin" animation_value_type="normal" extra_prefixes="moz webkit" boxed="True" <%helpers:longhand name="transform-origin" animation_value_type="ComputedValue" extra_prefixes="moz webkit" boxed="True"
spec="https://drafts.csswg.org/css-transforms/#transform-origin-property"> spec="https://drafts.csswg.org/css-transforms/#transform-origin-property">
use app_units::Au; use app_units::Au;
use std::fmt; use std::fmt;

View file

@ -8,7 +8,7 @@
<% from data import to_rust_ident %> <% from data import to_rust_ident %>
<%helpers:longhand name="color" need_clone="True" animation_value_type="normal" <%helpers:longhand name="color" need_clone="True" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-color/#color"> spec="https://drafts.csswg.org/css-color/#color">
use cssparser::RGBA; use cssparser::RGBA;
use std::fmt; use std::fmt;

View file

@ -12,7 +12,7 @@ ${helpers.predefined_type("column-width",
initial_specified_value="Either::Second(Auto)", initial_specified_value="Either::Second(Auto)",
parse_method="parse_non_negative_length", parse_method="parse_non_negative_length",
extra_prefixes="moz", extra_prefixes="moz",
animation_value_type="normal", animation_value_type="ComputedValue",
experimental=True, experimental=True,
spec="https://drafts.csswg.org/css-multicol/#propdef-column-width")} spec="https://drafts.csswg.org/css-multicol/#propdef-column-width")}
@ -23,7 +23,7 @@ ${helpers.predefined_type("column-count",
parse_method="parse_positive", parse_method="parse_positive",
initial_specified_value="Either::Second(Auto)", initial_specified_value="Either::Second(Auto)",
experimental="True", experimental="True",
animation_value_type="normal", animation_value_type="ComputedValue",
extra_prefixes="moz", extra_prefixes="moz",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-count")} spec="https://drafts.csswg.org/css-multicol/#propdef-column-count")}
@ -33,7 +33,7 @@ ${helpers.predefined_type("column-gap",
parse_method='parse_non_negative_length', parse_method='parse_non_negative_length',
extra_prefixes="moz", extra_prefixes="moz",
experimental=True, experimental=True,
animation_value_type="normal", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-gap")} spec="https://drafts.csswg.org/css-multicol/#propdef-column-gap")}
${helpers.single_keyword("column-fill", "balance auto", extra_prefixes="moz", ${helpers.single_keyword("column-fill", "balance auto", extra_prefixes="moz",
@ -41,7 +41,7 @@ ${helpers.single_keyword("column-fill", "balance auto", extra_prefixes="moz",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-fill")} spec="https://drafts.csswg.org/css-multicol/#propdef-column-fill")}
// https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width // https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width
<%helpers:longhand name="column-rule-width" products="gecko" animation_value_type="normal" extra_prefixes="moz" <%helpers:longhand name="column-rule-width" products="gecko" animation_value_type="ComputedValue" extra_prefixes="moz"
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-width"> spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-width">
use app_units::Au; use app_units::Au;
use std::fmt; use std::fmt;
@ -75,7 +75,7 @@ ${helpers.single_keyword("column-fill", "balance auto", extra_prefixes="moz",
${helpers.predefined_type("column-rule-color", "CSSColor", ${helpers.predefined_type("column-rule-color", "CSSColor",
"::cssparser::Color::CurrentColor", "::cssparser::Color::CurrentColor",
initial_specified_value="specified::CSSColor::currentcolor()", initial_specified_value="specified::CSSColor::currentcolor()",
products="gecko", animation_value_type="normal", extra_prefixes="moz", products="gecko", animation_value_type="ComputedValue", extra_prefixes="moz",
complex_color=True, need_clone=True, complex_color=True, need_clone=True,
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-color")} spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-color")}

View file

@ -10,12 +10,12 @@
${helpers.predefined_type("opacity", ${helpers.predefined_type("opacity",
"Opacity", "Opacity",
"1.0", "1.0",
animation_value_type="normal", animation_value_type="ComputedValue",
flags="CREATES_STACKING_CONTEXT", flags="CREATES_STACKING_CONTEXT",
spec="https://drafts.csswg.org/css-color/#opacity")} spec="https://drafts.csswg.org/css-color/#opacity")}
<%helpers:vector_longhand name="box-shadow" allow_empty="True" <%helpers:vector_longhand name="box-shadow" allow_empty="True"
animation_value_type="normal" extra_prefixes="webkit" animation_value_type="ComputedValue" extra_prefixes="webkit"
spec="https://drafts.csswg.org/css-backgrounds/#box-shadow"> spec="https://drafts.csswg.org/css-backgrounds/#box-shadow">
use cssparser; use cssparser;
use std::fmt; use std::fmt;
@ -80,7 +80,7 @@ ${helpers.predefined_type("opacity",
${helpers.predefined_type("clip", ${helpers.predefined_type("clip",
"ClipRectOrAuto", "ClipRectOrAuto",
"computed::ClipRectOrAuto::auto()", "computed::ClipRectOrAuto::auto()",
animation_value_type="normal", animation_value_type="ComputedValue",
boxed="True", boxed="True",
spec="https://drafts.fxtf.org/css-masking/#clip-property")} spec="https://drafts.fxtf.org/css-masking/#clip-property")}

View file

@ -351,7 +351,7 @@ ${helpers.single_keyword_system("font-variant-caps",
custom_consts=font_variant_caps_custom_consts, custom_consts=font_variant_caps_custom_consts,
animation_value_type="none")} animation_value_type="none")}
<%helpers:longhand name="font-weight" need_clone="True" animation_value_type="normal" <%helpers:longhand name="font-weight" need_clone="True" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-fonts/#propdef-font-weight"> spec="https://drafts.csswg.org/css-fonts/#propdef-font-weight">
use std::fmt; use std::fmt;
use style_traits::ToCss; use style_traits::ToCss;
@ -549,7 +549,7 @@ ${helpers.single_keyword_system("font-variant-caps",
} }
</%helpers:longhand> </%helpers:longhand>
<%helpers:longhand name="font-size" need_clone="True" animation_value_type="normal" <%helpers:longhand name="font-size" need_clone="True" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-fonts/#propdef-font-size"> spec="https://drafts.csswg.org/css-fonts/#propdef-font-size">
use app_units::Au; use app_units::Au;
use properties::longhands::system_font::SystemFont; use properties::longhands::system_font::SystemFont;
@ -934,7 +934,7 @@ ${helpers.single_keyword_system("font-variant-caps",
} }
</%helpers:longhand> </%helpers:longhand>
<%helpers:longhand products="gecko" name="font-size-adjust" animation_value_type="normal" <%helpers:longhand products="gecko" name="font-size-adjust" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-fonts/#propdef-font-size-adjust"> spec="https://drafts.csswg.org/css-fonts/#propdef-font-size-adjust">
use properties::longhands::system_font::SystemFont; use properties::longhands::system_font::SystemFont;
use std::fmt; use std::fmt;

View file

@ -11,7 +11,7 @@ ${helpers.single_keyword("visibility",
"visible hidden", "visible hidden",
extra_gecko_values="collapse", extra_gecko_values="collapse",
gecko_ffi_name="mVisible", gecko_ffi_name="mVisible",
animation_value_type="normal", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-box/#propdef-visibility")} spec="https://drafts.csswg.org/css-box/#propdef-visibility")}
// CSS Writing Modes Level 3 // CSS Writing Modes Level 3

View file

@ -70,7 +70,7 @@ ${helpers.predefined_type(
"computed::LengthOrPercentage::one()", "computed::LengthOrPercentage::one()",
"parse_numbers_are_pixels_non_negative", "parse_numbers_are_pixels_non_negative",
products="gecko", products="gecko",
animation_value_type="normal", animation_value_type="ComputedValue",
spec="https://www.w3.org/TR/SVG2/painting.html#StrokeWidth")} spec="https://www.w3.org/TR/SVG2/painting.html#StrokeWidth")}
${helpers.single_keyword("stroke-linecap", "butt round square", ${helpers.single_keyword("stroke-linecap", "butt round square",
@ -106,7 +106,7 @@ ${helpers.predefined_type(
"computed::LengthOrPercentage::zero()", "computed::LengthOrPercentage::zero()",
"parse_numbers_are_pixels", "parse_numbers_are_pixels",
products="gecko", products="gecko",
animation_value_type="normal", animation_value_type="ComputedValue",
spec="https://www.w3.org/TR/SVG2/painting.html#StrokeDashing")} spec="https://www.w3.org/TR/SVG2/painting.html#StrokeDashing")}
// Section 14 - Clipping, Masking and Compositing // Section 14 - Clipping, Masking and Compositing

View file

@ -6,7 +6,7 @@
<% from data import Keyword %> <% from data import Keyword %>
<% data.new_style_struct("InheritedText", inherited=True, gecko_name="Text") %> <% data.new_style_struct("InheritedText", inherited=True, gecko_name="Text") %>
<%helpers:longhand name="line-height" animation_value_type="normal" <%helpers:longhand name="line-height" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css2/visudet.html#propdef-line-height"> spec="https://drafts.csswg.org/css2/visudet.html#propdef-line-height">
use std::fmt; use std::fmt;
use style_traits::ToCss; use style_traits::ToCss;
@ -183,7 +183,7 @@ ${helpers.single_keyword("-moz-text-size-adjust", "auto none",
${helpers.predefined_type("text-indent", ${helpers.predefined_type("text-indent",
"LengthOrPercentage", "LengthOrPercentage",
"computed::LengthOrPercentage::Length(Au(0))", "computed::LengthOrPercentage::Length(Au(0))",
animation_value_type="normal", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-text/#propdef-text-indent")} spec="https://drafts.csswg.org/css-text/#propdef-text-indent")}
// Also known as "word-wrap" (which is more popular because of IE), but this is the preferred // Also known as "word-wrap" (which is more popular because of IE), but this is the preferred
@ -406,7 +406,7 @@ ${helpers.single_keyword("text-align-last",
% endif % endif
</%helpers:longhand> </%helpers:longhand>
<%helpers:longhand name="letter-spacing" animation_value_type="normal" <%helpers:longhand name="letter-spacing" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-text/#propdef-letter-spacing"> spec="https://drafts.csswg.org/css-text/#propdef-letter-spacing">
use std::fmt; use std::fmt;
use style_traits::ToCss; use style_traits::ToCss;
@ -492,7 +492,7 @@ ${helpers.single_keyword("text-align-last",
} }
</%helpers:longhand> </%helpers:longhand>
<%helpers:longhand name="word-spacing" animation_value_type="normal" <%helpers:longhand name="word-spacing" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-text/#propdef-word-spacing"> spec="https://drafts.csswg.org/css-text/#propdef-word-spacing">
use std::fmt; use std::fmt;
use style_traits::ToCss; use style_traits::ToCss;
@ -711,7 +711,7 @@ ${helpers.single_keyword("text-align-last",
% endif % endif
</%helpers:single_keyword_computed> </%helpers:single_keyword_computed>
<%helpers:longhand name="text-shadow" animation_value_type="normal" <%helpers:longhand name="text-shadow" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-shadow"> spec="https://drafts.csswg.org/css-text-decor/#propdef-text-shadow">
use cssparser; use cssparser;
use std::fmt; use std::fmt;
@ -1205,7 +1205,7 @@ ${helpers.single_keyword("text-align-last",
${helpers.predefined_type("text-emphasis-color", "CSSColor", ${helpers.predefined_type("text-emphasis-color", "CSSColor",
"::cssparser::Color::CurrentColor", "::cssparser::Color::CurrentColor",
initial_specified_value="specified::CSSColor::currentcolor()", initial_specified_value="specified::CSSColor::currentcolor()",
products="gecko", animation_value_type="normal", products="gecko", animation_value_type="ComputedValue",
complex_color=True, need_clone=True, complex_color=True, need_clone=True,
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-color")} spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-color")}
@ -1223,7 +1223,7 @@ ${helpers.predefined_type(
${helpers.predefined_type( ${helpers.predefined_type(
"-webkit-text-fill-color", "CSSColor", "-webkit-text-fill-color", "CSSColor",
"CSSParserColor::CurrentColor", "CSSParserColor::CurrentColor",
products="gecko", animation_value_type="normal", products="gecko", animation_value_type="ComputedValue",
complex_color=True, need_clone=True, complex_color=True, need_clone=True,
spec="https://compat.spec.whatwg.org/#the-webkit-text-fill-color")} spec="https://compat.spec.whatwg.org/#the-webkit-text-fill-color")}
@ -1231,7 +1231,7 @@ ${helpers.predefined_type(
"-webkit-text-stroke-color", "CSSColor", "-webkit-text-stroke-color", "CSSColor",
"CSSParserColor::CurrentColor", "CSSParserColor::CurrentColor",
initial_specified_value="specified::CSSColor::currentcolor()", initial_specified_value="specified::CSSColor::currentcolor()",
products="gecko", animation_value_type="normal", products="gecko", animation_value_type="ComputedValue",
complex_color=True, need_clone=True, complex_color=True, need_clone=True,
spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-color")} spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-color")}

View file

@ -15,6 +15,6 @@
${helpers.predefined_type("margin-%s" % side[0], "LengthOrPercentageOrAuto", ${helpers.predefined_type("margin-%s" % side[0], "LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Length(Au(0))", "computed::LengthOrPercentageOrAuto::Length(Au(0))",
alias=maybe_moz_logical_alias(product, side, "-moz-margin-%s"), alias=maybe_moz_logical_alias(product, side, "-moz-margin-%s"),
animation_value_type="normal", logical = side[1], spec = spec, animation_value_type="ComputedValue", logical = side[1], spec = spec,
allowed_in_page_rule=True)} allowed_in_page_rule=True)}
% endfor % endfor

View file

@ -12,7 +12,7 @@
// TODO(pcwalton): `invert` // TODO(pcwalton): `invert`
${helpers.predefined_type("outline-color", "CSSColor", "computed::CSSColor::CurrentColor", ${helpers.predefined_type("outline-color", "CSSColor", "computed::CSSColor::CurrentColor",
initial_specified_value="specified::CSSColor::currentcolor()", initial_specified_value="specified::CSSColor::currentcolor()",
animation_value_type="normal", complex_color=True, need_clone=True, animation_value_type="ComputedValue", complex_color=True, need_clone=True,
spec="https://drafts.csswg.org/css-ui/#propdef-outline-color")} 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" need_clone="True" animation_value_type="none"
@ -64,7 +64,7 @@ ${helpers.predefined_type("outline-color", "CSSColor", "computed::CSSColor::Curr
} }
</%helpers:longhand> </%helpers:longhand>
<%helpers:longhand name="outline-width" animation_value_type="normal" <%helpers:longhand name="outline-width" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-ui/#propdef-outline-width"> spec="https://drafts.csswg.org/css-ui/#propdef-outline-width">
use app_units::Au; use app_units::Au;
use std::fmt; use std::fmt;
@ -128,5 +128,6 @@ ${helpers.predefined_type("outline-color", "CSSColor", "computed::CSSColor::Curr
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)")} spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)")}
% endfor % endfor
${helpers.predefined_type("outline-offset", "Length", "Au(0)", products="servo gecko", animation_value_type="normal", ${helpers.predefined_type("outline-offset", "Length", "Au(0)", products="servo gecko",
animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset")} spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset")}

View file

@ -16,7 +16,7 @@
"computed::LengthOrPercentage::Length(Au(0))", "computed::LengthOrPercentage::Length(Au(0))",
"parse_non_negative", "parse_non_negative",
alias=maybe_moz_logical_alias(product, side, "-moz-padding-%s"), alias=maybe_moz_logical_alias(product, side, "-moz-padding-%s"),
animation_value_type="normal", animation_value_type="ComputedValue",
logical = side[1], logical = side[1],
spec = spec)} spec = spec)}
% endfor % endfor

View file

@ -177,6 +177,6 @@ ${helpers.predefined_type("caret-color",
"ColorOrAuto", "ColorOrAuto",
"Either::Second(Auto)", "Either::Second(Auto)",
spec="https://drafts.csswg.org/css-ui/#caret-color", spec="https://drafts.csswg.org/css-ui/#caret-color",
animation_value_type="normal", animation_value_type="ComputedValue",
boxed=True, boxed=True,
products="gecko")} products="gecko")}

View file

@ -13,21 +13,21 @@
${helpers.predefined_type(side, "LengthOrPercentageOrAuto", ${helpers.predefined_type(side, "LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Auto", "computed::LengthOrPercentageOrAuto::Auto",
spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side, spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side,
animation_value_type="normal")} animation_value_type="ComputedValue")}
% endfor % endfor
// offset-* logical properties, map to "top" / "left" / "bottom" / "right" // offset-* logical properties, map to "top" / "left" / "bottom" / "right"
% for side in LOGICAL_SIDES: % for side in LOGICAL_SIDES:
${helpers.predefined_type("offset-%s" % side, "LengthOrPercentageOrAuto", ${helpers.predefined_type("offset-%s" % side, "LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Auto", "computed::LengthOrPercentageOrAuto::Auto",
spec="https://drafts.csswg.org/css-logical-props/#propdef-offset-%s" % side, spec="https://drafts.csswg.org/css-logical-props/#propdef-offset-%s" % side,
animation_value_type="normal", logical=True)} animation_value_type="ComputedValue", logical=True)}
% endfor % endfor
${helpers.predefined_type("z-index", "IntegerOrAuto", ${helpers.predefined_type("z-index", "IntegerOrAuto",
"Either::Second(Auto)", "Either::Second(Auto)",
spec="https://www.w3.org/TR/CSS2/visuren.html#z-index", spec="https://www.w3.org/TR/CSS2/visuren.html#z-index",
flags="CREATES_STACKING_CONTEXT", flags="CREATES_STACKING_CONTEXT",
animation_value_type="normal")} animation_value_type="ComputedValue")}
// CSS Flexible Box Layout Module Level 1 // CSS Flexible Box Layout Module Level 1
@ -96,13 +96,13 @@ ${helpers.predefined_type("flex-grow", "Number",
"0.0", "parse_non_negative", "0.0", "parse_non_negative",
spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property", spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property",
extra_prefixes="webkit", extra_prefixes="webkit",
animation_value_type="normal")} animation_value_type="ComputedValue")}
${helpers.predefined_type("flex-shrink", "Number", ${helpers.predefined_type("flex-shrink", "Number",
"1.0", "parse_non_negative", "1.0", "parse_non_negative",
spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property", spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property",
extra_prefixes="webkit", extra_prefixes="webkit",
animation_value_type="normal")} animation_value_type="ComputedValue")}
// https://drafts.csswg.org/css-align/#align-self-property // https://drafts.csswg.org/css-align/#align-self-property
% if product == "servo": % if product == "servo":
@ -130,7 +130,7 @@ ${helpers.predefined_type("flex-shrink", "Number",
// https://drafts.csswg.org/css-flexbox/#propdef-order // https://drafts.csswg.org/css-flexbox/#propdef-order
${helpers.predefined_type("order", "Integer", "0", ${helpers.predefined_type("order", "Integer", "0",
extra_prefixes="webkit", extra_prefixes="webkit",
animation_value_type="normal", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-flexbox/#order-property")} spec="https://drafts.csswg.org/css-flexbox/#order-property")}
// FIXME: Gecko doesn't support content value yet. // FIXME: Gecko doesn't support content value yet.
@ -143,7 +143,7 @@ ${helpers.predefined_type("flex-basis",
"parse_non_negative", "parse_non_negative",
spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property", spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property",
extra_prefixes="webkit", extra_prefixes="webkit",
animation_value_type="normal" if product == "gecko" else "none")} animation_value_type="ComputedValue" if product == "gecko" else "none")}
% for (size, logical) in ALL_SIZES: % for (size, logical) in ALL_SIZES:
<% <%
@ -157,7 +157,7 @@ ${helpers.predefined_type("flex-basis",
"computed::LengthOrPercentageOrAuto::Auto", "computed::LengthOrPercentageOrAuto::Auto",
"parse_non_negative", "parse_non_negative",
spec=spec % size, spec=spec % size,
animation_value_type="normal", logical = logical)} animation_value_type="ComputedValue", logical = logical)}
% if product == "gecko": % if product == "gecko":
% for min_max in ["min", "max"]: % for min_max in ["min", "max"]:
<% <%
@ -171,7 +171,8 @@ ${helpers.predefined_type("flex-basis",
// Keyword values are only valid in the inline direction; they must // Keyword values are only valid in the inline direction; they must
// be replaced with auto/none in block. // be replaced with auto/none in block.
<%helpers:longhand name="${min_max}-${size}" spec="${spec % ('%s-%s' % (min_max, size))}" <%helpers:longhand name="${min_max}-${size}" spec="${spec % ('%s-%s' % (min_max, size))}"
animation_value_type="normal" logical="${logical}" predefined_type="${MinMax}Length"> animation_value_type="ComputedValue"
logical="${logical}" predefined_type="${MinMax}Length">
use std::fmt; use std::fmt;
use style_traits::ToCss; use style_traits::ToCss;
@ -253,13 +254,13 @@ ${helpers.predefined_type("flex-basis",
"computed::LengthOrPercentage::Length(Au(0))", "computed::LengthOrPercentage::Length(Au(0))",
"parse_non_negative", "parse_non_negative",
spec=spec % ("min-%s" % size), spec=spec % ("min-%s" % size),
animation_value_type="normal", logical = logical)} animation_value_type="ComputedValue", logical = logical)}
${helpers.predefined_type("max-%s" % size, ${helpers.predefined_type("max-%s" % size,
"LengthOrPercentageOrNone", "LengthOrPercentageOrNone",
"computed::LengthOrPercentageOrNone::None", "computed::LengthOrPercentageOrNone::None",
"parse_non_negative", "parse_non_negative",
spec=spec % ("min-%s" % size), spec=spec % ("min-%s" % size),
animation_value_type="normal", logical = logical)} animation_value_type="ComputedValue", logical = logical)}
% endif % endif
% endfor % endfor
@ -279,14 +280,14 @@ ${helpers.predefined_type("object-position",
products="gecko", products="gecko",
boxed="True", boxed="True",
spec="https://drafts.csswg.org/css-images-3/#the-object-position", spec="https://drafts.csswg.org/css-images-3/#the-object-position",
animation_value_type="normal")} animation_value_type="ComputedValue")}
% for kind in ["row", "column"]: % for kind in ["row", "column"]:
${helpers.predefined_type("grid-%s-gap" % kind, ${helpers.predefined_type("grid-%s-gap" % kind,
"LengthOrPercentage", "LengthOrPercentage",
"computed::LengthOrPercentage::Length(Au(0))", "computed::LengthOrPercentage::Length(Au(0))",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-%s-gap" % kind, spec="https://drafts.csswg.org/css-grid/#propdef-grid-%s-gap" % kind,
animation_value_type="normal", animation_value_type="ComputedValue",
products="gecko")} products="gecko")}
% for range in ["start", "end"]: % for range in ["start", "end"]:

View file

@ -113,7 +113,8 @@ ${helpers.single_keyword("mask-mode",
} }
</%helpers:vector_longhand> </%helpers:vector_longhand>
<%helpers:vector_longhand name="mask-position-x" products="gecko" animation_value_type="normal" extra_prefixes="webkit" <%helpers:vector_longhand name="mask-position-x" products="gecko"
animation_value_type="ComputedValue" extra_prefixes="webkit"
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-position"> spec="https://drafts.fxtf.org/css-masking/#propdef-mask-position">
pub use properties::longhands::background_position_x::single_value::get_initial_value; pub use properties::longhands::background_position_x::single_value::get_initial_value;
pub use properties::longhands::background_position_x::single_value::get_initial_position_value; pub use properties::longhands::background_position_x::single_value::get_initial_position_value;
@ -141,7 +142,8 @@ ${helpers.single_keyword("mask-mode",
} }
</%helpers:vector_longhand> </%helpers:vector_longhand>
<%helpers:vector_longhand name="mask-position-y" products="gecko" animation_value_type="normal" extra_prefixes="webkit" <%helpers:vector_longhand name="mask-position-y" products="gecko"
animation_value_type="ComputedValue" extra_prefixes="webkit"
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-position"> spec="https://drafts.fxtf.org/css-masking/#propdef-mask-position">
pub use properties::longhands::background_position_y::single_value::get_initial_value; pub use properties::longhands::background_position_y::single_value::get_initial_value;
pub use properties::longhands::background_position_y::single_value::get_initial_position_value; pub use properties::longhands::background_position_y::single_value::get_initial_position_value;
@ -187,7 +189,7 @@ ${helpers.single_keyword("mask-origin",
animation_value_type="none", animation_value_type="none",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-origin")} spec="https://drafts.fxtf.org/css-masking/#propdef-mask-origin")}
<%helpers:longhand name="mask-size" products="gecko" animation_value_type="normal" extra_prefixes="webkit" <%helpers:longhand name="mask-size" products="gecko" animation_value_type="ComputedValue" extra_prefixes="webkit"
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-size"> spec="https://drafts.fxtf.org/css-masking/#propdef-mask-size">
use properties::longhands::background_size; use properties::longhands::background_size;
pub use ::properties::longhands::background_size::SpecifiedValue; pub use ::properties::longhands::background_size::SpecifiedValue;

View file

@ -228,7 +228,7 @@ ${helpers.predefined_type(
initial_specified_value="specified::CSSColor::currentcolor()", initial_specified_value="specified::CSSColor::currentcolor()",
complex_color=True, complex_color=True,
products="gecko", products="gecko",
animation_value_type="normal", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-color")} spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-color")}
<%helpers:longhand name="initial-letter" <%helpers:longhand name="initial-letter"