Miscellaneous build / tidy fixes.

This commit is contained in:
Emilio Cobos Álvarez 2021-02-26 12:40:48 +01:00
parent 5158f65810
commit 31e8e418ea
66 changed files with 566 additions and 294 deletions

View file

@ -948,7 +948,8 @@
input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
% for sub_property in shorthand.sub_properties:
% if sub_property.may_be_disabled_in(shorthand, engine):
if NonCustomPropertyId::from(LonghandId::${sub_property.camel_case}).allowed_in_ignoring_rule_type(context) {
if NonCustomPropertyId::from(LonghandId::${sub_property.camel_case})
.allowed_in_ignoring_rule_type(context) {
% endif
declarations.push(PropertyDeclaration::${sub_property.camel_case}(
longhands.${sub_property.ident}
@ -984,7 +985,10 @@
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Longhands, ParseError<'i>> {
let parse_one = |c: &ParserContext, input: &mut Parser<'i, 't>| -> Result<crate::properties::longhands::${to_rust_ident(first_property)}::SpecifiedValue, ParseError<'i>> {
let parse_one = |c: &ParserContext, input: &mut Parser<'i, 't>| -> Result<
crate::properties::longhands::${to_rust_ident(first_property)}::SpecifiedValue,
ParseError<'i>
> {
${parser_function}(c, input)
};
@ -1028,7 +1032,10 @@
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Longhands, ParseError<'i>> {
let rect = Rect::parse_with(context, input, |c, i| -> Result<crate::properties::longhands::${to_rust_ident(sub_property_pattern % "top")}::SpecifiedValue, ParseError<'i>> {
let rect = Rect::parse_with(context, input, |c, i| -> Result<
crate::properties::longhands::${to_rust_ident(sub_property_pattern % "top")}::SpecifiedValue,
ParseError<'i>
> {
% if allow_quirks != "No":
${parser_function}_quirky(c, i, specified::AllowQuirks::${allow_quirks})
% else: