diff --git a/components/style/keyframes.rs b/components/style/keyframes.rs index 31ba401cddb..348bc028ee6 100644 --- a/components/style/keyframes.rs +++ b/components/style/keyframes.rs @@ -393,7 +393,6 @@ impl<'a, 'b> AtRuleParser for KeyframeDeclarationParser<'a, 'b> { } impl<'a, 'b> DeclarationParser for KeyframeDeclarationParser<'a, 'b> { - /// We parse rules directly into the declarations object type Declaration = ParsedDeclaration; fn parse_value(&mut self, name: &str, input: &mut Parser) -> Result { diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 5eb133601fe..af4943e8d33 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -823,7 +823,7 @@ pub enum ParsedDeclaration { impl ParsedDeclaration { /// Transform this ParsedDeclaration into a sequence of PropertyDeclaration /// by expanding shorthand declarations into their corresponding longhands - pub fn expand(self, mut f: F) where F: FnMut(PropertyDeclaration) { + pub fn expand(self, mut push: F) where F: FnMut(PropertyDeclaration) { match self { % for shorthand in data.shorthands: ParsedDeclaration::${shorthand.camel_case}( @@ -834,7 +834,7 @@ impl ParsedDeclaration { } ) => { % for sub_property in shorthand.sub_properties: - f(PropertyDeclaration::${sub_property.camel_case}( + push(PropertyDeclaration::${sub_property.camel_case}( % if sub_property.boxed: DeclaredValue::Value(Box::new(${sub_property.ident})) % else: @@ -845,7 +845,7 @@ impl ParsedDeclaration { } ParsedDeclaration::${shorthand.camel_case}CSSWideKeyword(keyword) => { % for sub_property in shorthand.sub_properties: - f(PropertyDeclaration::${sub_property.camel_case}( + push(PropertyDeclaration::${sub_property.camel_case}( DeclaredValue::CSSWideKeyword(keyword) )); % endfor @@ -856,13 +856,13 @@ impl ParsedDeclaration { Some(ShorthandId::${shorthand.camel_case}) ); % for sub_property in shorthand.sub_properties: - f(PropertyDeclaration::${sub_property.camel_case}( + push(PropertyDeclaration::${sub_property.camel_case}( DeclaredValue::WithVariables(value.clone()) )); % endfor } % endfor - ParsedDeclaration::LonghandOrCustom(declaration) => f(declaration), + ParsedDeclaration::LonghandOrCustom(declaration) => push(declaration), } }