Add remaining longhand flexbox style properties

Add the remaining longhand CSS properties of flexbox for servo,
including `flex-wrap`, `flex-grow`, `flex-shrink`, `justify-content`,
`align-items`, `align-self` and `align-content`.

tests for the remaining longhand properties are also enabled. Test for
default value of `align-self` is modified because the new default value
for this property is "auto" is current flexbox CR.
This commit is contained in:
Pu Xingyu 2016-05-06 08:10:43 +08:00
parent 52f17a8814
commit a7733b38d4
42 changed files with 44 additions and 111 deletions

View file

@ -61,12 +61,22 @@
// http://www.w3.org/TR/css3-flexbox/
// Flex container properties
${helpers.single_keyword("flex-direction", "row row-reverse column column-reverse", experimental=True)}
${helpers.single_keyword("flex-direction", "row row-reverse column column-reverse")}
${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse")}
${helpers.single_keyword("justify-content", "flex-start flex-end center space-between space-around")}
${helpers.single_keyword("align-items", "stretch flex-start flex-end center baseline")}
${helpers.single_keyword("align-content", "stretch flex-start flex-end center space-between space-around")}
// Flex item properties
${helpers.predefined_type("flex-grow", "Number", "0.0", "parse_non_negative", products="gecko")}
${helpers.predefined_type("flex-grow", "Number", "0.0", "parse_non_negative")}
${helpers.predefined_type("flex-shrink", "Number", "1.0", "parse_non_negative", products="gecko")}
${helpers.predefined_type("flex-shrink", "Number", "1.0", "parse_non_negative")}
${helpers.single_keyword("align-self", "auto stretch flex-start flex-end center baseline")}
// https://drafts.csswg.org/css-flexbox/#propdef-order
<%helpers:longhand name="order">
@ -94,8 +104,6 @@ ${helpers.predefined_type("flex-basis",
"LengthOrPercentageOrAutoOrContent",
"computed::LengthOrPercentageOrAutoOrContent::Auto")}
${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse", products="gecko")}
${helpers.predefined_type("width",
"LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Auto",