Rename animation_type to animation_value_type.

This commit is contained in:
Hiroyuki Ikezoe 2017-04-24 15:18:43 +09:00
parent 1da31f5cf3
commit 94fb839fdd
25 changed files with 265 additions and 263 deletions

View file

@ -13,21 +13,21 @@
${helpers.predefined_type(side, "LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Auto",
spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side,
animation_type="normal")}
animation_value_type="normal")}
% endfor
// offset-* logical properties, map to "top" / "left" / "bottom" / "right"
% for side in LOGICAL_SIDES:
${helpers.predefined_type("offset-%s" % side, "LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Auto",
spec="https://drafts.csswg.org/css-logical-props/#propdef-offset-%s" % side,
animation_type="normal", logical=True)}
animation_value_type="normal", logical=True)}
% endfor
${helpers.predefined_type("z-index", "IntegerOrAuto",
"Either::Second(Auto)",
spec="https://www.w3.org/TR/CSS2/visuren.html#z-index",
flags="CREATES_STACKING_CONTEXT",
animation_type="normal")}
animation_value_type="normal")}
// CSS Flexible Box Layout Module Level 1
@ -36,25 +36,25 @@ ${helpers.predefined_type("z-index", "IntegerOrAuto",
// Flex container properties
${helpers.single_keyword("flex-direction", "row row-reverse column column-reverse",
spec="https://drafts.csswg.org/css-flexbox/#flex-direction-property",
extra_prefixes="webkit", animation_type="none")}
extra_prefixes="webkit", animation_value_type="none")}
${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse",
spec="https://drafts.csswg.org/css-flexbox/#flex-wrap-property",
extra_prefixes="webkit", animation_type="none")}
extra_prefixes="webkit", animation_value_type="none")}
% if product == "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",
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-align/#propdef-justify-content",
animation_type="none")}
animation_value_type="none")}
% else:
${helpers.predefined_type(name="justify-content",
type="AlignJustifyContent",
initial_value="specified::AlignJustifyContent::normal()",
spec="https://drafts.csswg.org/css-align/#propdef-justify-content",
extra_prefixes="webkit",
animation_type="none")}
animation_value_type="none")}
% endif
% if product == "servo":
@ -62,33 +62,33 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse",
${helpers.single_keyword("align-content", "stretch flex-start flex-end center space-between space-around",
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-align/#propdef-align-content",
animation_type="none")}
animation_value_type="none")}
${helpers.single_keyword("align-items",
"stretch flex-start flex-end center baseline",
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-flexbox/#align-items-property",
animation_type="discrete")}
animation_value_type="discrete")}
% else:
${helpers.predefined_type(name="align-content",
type="AlignJustifyContent",
initial_value="specified::AlignJustifyContent::normal()",
spec="https://drafts.csswg.org/css-align/#propdef-align-content",
extra_prefixes="webkit",
animation_type="none")}
animation_value_type="none")}
${helpers.predefined_type(name="align-items",
type="AlignItems",
initial_value="specified::AlignItems::normal()",
spec="https://drafts.csswg.org/css-align/#propdef-align-items",
extra_prefixes="webkit",
animation_type="discrete")}
animation_value_type="discrete")}
${helpers.predefined_type(name="justify-items",
type="JustifyItems",
initial_value="specified::JustifyItems::auto()",
spec="https://drafts.csswg.org/css-align/#propdef-justify-items",
animation_type="none")}
animation_value_type="none")}
% endif
// Flex item properties
@ -96,13 +96,13 @@ ${helpers.predefined_type("flex-grow", "Number",
"0.0", "parse_non_negative",
spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property",
extra_prefixes="webkit",
animation_type="normal")}
animation_value_type="normal")}
${helpers.predefined_type("flex-shrink", "Number",
"1.0", "parse_non_negative",
spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property",
extra_prefixes="webkit",
animation_type="normal")}
animation_value_type="normal")}
// https://drafts.csswg.org/css-align/#align-self-property
% if product == "servo":
@ -111,26 +111,26 @@ ${helpers.predefined_type("flex-shrink", "Number",
need_clone=True,
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-flexbox/#propdef-align-self",
animation_type="none")}
animation_value_type="none")}
% else:
${helpers.predefined_type(name="align-self",
type="AlignJustifySelf",
initial_value="specified::AlignJustifySelf::auto()",
spec="https://drafts.csswg.org/css-align/#align-self-property",
extra_prefixes="webkit",
animation_type="none")}
animation_value_type="none")}
${helpers.predefined_type(name="justify-self",
type="AlignJustifySelf",
initial_value="specified::AlignJustifySelf::auto()",
spec="https://drafts.csswg.org/css-align/#justify-self-property",
animation_type="none")}
animation_value_type="none")}
% endif
// https://drafts.csswg.org/css-flexbox/#propdef-order
${helpers.predefined_type("order", "Integer", "0",
extra_prefixes="webkit",
animation_type="normal",
animation_value_type="normal",
spec="https://drafts.csswg.org/css-flexbox/#order-property")}
// FIXME: Gecko doesn't support content value yet.
@ -143,7 +143,7 @@ ${helpers.predefined_type("flex-basis",
"parse_non_negative",
spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property",
extra_prefixes="webkit",
animation_type="normal" if product == "gecko" else "none")}
animation_value_type="normal" if product == "gecko" else "none")}
% for (size, logical) in ALL_SIZES:
<%
@ -157,7 +157,7 @@ ${helpers.predefined_type("flex-basis",
"computed::LengthOrPercentageOrAuto::Auto",
"parse_non_negative",
spec=spec % size,
animation_type="normal", logical = logical)}
animation_value_type="normal", logical = logical)}
% if product == "gecko":
% for min_max in ["min", "max"]:
<%
@ -171,7 +171,7 @@ ${helpers.predefined_type("flex-basis",
// Keyword values are only valid in the inline direction; they must
// be replaced with auto/none in block.
<%helpers:longhand name="${min_max}-${size}" spec="${spec % ('%s-%s' % (min_max, size))}"
animation_type="normal" logical="${logical}" predefined_type="${MinMax}Length">
animation_value_type="normal" logical="${logical}" predefined_type="${MinMax}Length">
use std::fmt;
use style_traits::ToCss;
@ -253,13 +253,13 @@ ${helpers.predefined_type("flex-basis",
"computed::LengthOrPercentage::Length(Au(0))",
"parse_non_negative",
spec=spec % ("min-%s" % size),
animation_type="normal", logical = logical)}
animation_value_type="normal", logical = logical)}
${helpers.predefined_type("max-%s" % size,
"LengthOrPercentageOrNone",
"computed::LengthOrPercentageOrNone::None",
"parse_non_negative",
spec=spec % ("min-%s" % size),
animation_type="normal", logical = logical)}
animation_value_type="normal", logical = logical)}
% endif
% endfor
@ -267,10 +267,10 @@ ${helpers.single_keyword("box-sizing",
"content-box border-box",
extra_prefixes="moz webkit",
spec="https://drafts.csswg.org/css-ui/#propdef-box-sizing",
animation_type="none")}
animation_value_type="none")}
${helpers.single_keyword("object-fit", "fill contain cover none scale-down",
products="gecko", animation_type="none",
products="gecko", animation_value_type="none",
spec="https://drafts.csswg.org/css-images/#propdef-object-fit")}
${helpers.predefined_type("object-position",
@ -279,21 +279,21 @@ ${helpers.predefined_type("object-position",
products="gecko",
boxed="True",
spec="https://drafts.csswg.org/css-images-3/#the-object-position",
animation_type="normal")}
animation_value_type="normal")}
% for kind in ["row", "column"]:
${helpers.predefined_type("grid-%s-gap" % kind,
"LengthOrPercentage",
"computed::LengthOrPercentage::Length(Au(0))",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-%s-gap" % kind,
animation_type="normal",
animation_value_type="normal",
products="gecko")}
% for range in ["start", "end"]:
${helpers.predefined_type("grid-%s-%s" % (kind, range),
"GridLine",
"Default::default()",
animation_type="none",
animation_value_type="none",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-%s-%s" % (kind, range),
products="gecko",
boxed=True)}
@ -304,7 +304,7 @@ ${helpers.predefined_type("object-position",
${helpers.predefined_type("grid-auto-%ss" % kind,
"TrackSize",
"Default::default()",
animation_type="none",
animation_value_type="none",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-auto-%ss" % kind,
products="gecko",
boxed=True)}
@ -313,7 +313,7 @@ ${helpers.predefined_type("object-position",
<%helpers:longhand name="grid-auto-flow"
spec="https://drafts.csswg.org/css-grid/#propdef-grid-auto-flow"
products="gecko"
animation_type="none">
animation_value_type="none">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;