diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs index 559034078ce..74df70469a6 100644 --- a/components/style/properties/helpers.mako.rs +++ b/components/style/properties/helpers.mako.rs @@ -402,22 +402,30 @@ % endif } % if not property.derived_from: - pub fn parse_specified<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) - % if property.boxed: - -> Result, ParseError<'i>> { - parse(context, input).map(|result| Box::new(result)) + pub fn parse_specified<'i, 't>( + context: &ParserContext, + input: &mut Parser<'i, 't>, + % if property.boxed: + ) -> Result, ParseError<'i>> { + % else: + ) -> Result> { + % endif + % if property.allow_quirks: + parse_quirky(context, input, specified::AllowQuirks::Yes) % else: - -> Result> { - % if property.allow_quirks: - parse_quirky(context, input, specified::AllowQuirks::Yes) - % else: - parse(context, input) - % endif + parse(context, input) + % endif + % if property.boxed: + .map(Box::new) % endif } - pub fn parse_declared<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) - -> Result> { - parse_specified(context, input).map(PropertyDeclaration::${property.camel_case}) + + pub fn parse_declared<'i, 't>( + context: &ParserContext, + input: &mut Parser<'i, 't>, + ) -> Result> { + parse_specified(context, input) + .map(PropertyDeclaration::${property.camel_case}) } % endif }