mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Moved the rest of the longhand structs to separate files.
Sorry for the bulk size of this; I know already it's not going to be a fun thing to review. Nevertheless, it should be done so we finalize the split of this huge file into smaller, more maintable parts. The content of stuff being moved to separate files is unchanged. Only some minor formatting changes have been made and similar, but nothing of particular interest. IMHO it should be safe to merge if all the tests are fine.
This commit is contained in:
parent
97a45dc30c
commit
4e8831457a
21 changed files with 4440 additions and 4361 deletions
|
@ -56,3 +56,62 @@
|
|||
}
|
||||
}
|
||||
</%helpers:longhand>
|
||||
|
||||
// CSS Flexible Box Layout Module Level 1
|
||||
// http://www.w3.org/TR/css3-flexbox/
|
||||
|
||||
// Flex container properties
|
||||
${helpers.single_keyword("flex-direction", "row row-reverse column column-reverse", experimental=True)}
|
||||
|
||||
// https://drafts.csswg.org/css-flexbox/#propdef-order
|
||||
<%helpers:longhand name="order">
|
||||
use values::computed::ComputedValueAsSpecified;
|
||||
|
||||
impl ComputedValueAsSpecified for SpecifiedValue {}
|
||||
|
||||
pub type SpecifiedValue = computed_value::T;
|
||||
|
||||
pub mod computed_value {
|
||||
pub type T = i32;
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_initial_value() -> computed_value::T {
|
||||
0
|
||||
}
|
||||
|
||||
fn parse(_context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
|
||||
specified::parse_integer(input)
|
||||
}
|
||||
</%helpers:longhand>
|
||||
|
||||
${helpers.predefined_type("flex-basis",
|
||||
"LengthOrPercentageOrAutoOrContent",
|
||||
"computed::LengthOrPercentageOrAutoOrContent::Auto")}
|
||||
|
||||
${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse", products="gecko")}
|
||||
|
||||
${helpers.predefined_type("min-width",
|
||||
"LengthOrPercentage",
|
||||
"computed::LengthOrPercentage::Length(Au(0))",
|
||||
"parse_non_negative")}
|
||||
${helpers.predefined_type("max-width",
|
||||
"LengthOrPercentageOrNone",
|
||||
"computed::LengthOrPercentageOrNone::None",
|
||||
"parse_non_negative")}
|
||||
|
||||
${helpers.predefined_type("min-height",
|
||||
"LengthOrPercentage",
|
||||
"computed::LengthOrPercentage::Length(Au(0))",
|
||||
"parse_non_negative")}
|
||||
${helpers.predefined_type("max-height",
|
||||
"LengthOrPercentageOrNone",
|
||||
"computed::LengthOrPercentageOrNone::None",
|
||||
"parse_non_negative")}
|
||||
|
||||
${helpers.single_keyword("box-sizing",
|
||||
"content-box border-box")}
|
||||
|
||||
// CSS Image Values and Replaced Content Module Level 3
|
||||
// https://drafts.csswg.org/css-images-3/
|
||||
${helpers.single_keyword("object-fit", "fill contain cover none scale-down", products="gecko")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue