Remove unused Keyframe::parse method

This commit is contained in:
Simon Sapin 2016-08-17 20:05:34 +02:00
parent 24fbb26475
commit 901aaeaf68

View file

@ -73,27 +73,6 @@ pub struct Keyframe {
pub declarations: Arc<Vec<PropertyDeclaration>>, pub declarations: Arc<Vec<PropertyDeclaration>>,
} }
impl Keyframe {
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<Keyframe, ()> {
let percentages = try!(input.parse_until_before(Delimiter::CurlyBracketBlock, |input| {
input.parse_comma_separated(|input| KeyframePercentage::parse(input))
}));
let selector = KeyframeSelector(percentages);
try!(input.expect_curly_bracket_block());
let declarations = input.parse_nested_block(|input| {
Ok(parse_property_declaration_list(context, input))
}).unwrap();
// NB: Important declarations are explicitely ignored in the spec.
Ok(Keyframe {
selector: selector,
declarations: declarations.normal,
})
}
}
/// A keyframes step value. This can be a synthetised keyframes animation, that /// A keyframes step value. This can be a synthetised keyframes animation, that
/// is, one autogenerated from the current computed values, or a list of /// is, one autogenerated from the current computed values, or a list of
/// declarations to apply. /// declarations to apply.