stylo: Fix error reporting for invalid values in property alias

This commit is contained in:
Fernando Jiménez Moreno 2017-09-11 18:47:12 +02:00
parent 3d4868b282
commit 3be7ad8b6f
4 changed files with 15 additions and 13 deletions

View file

@ -583,8 +583,8 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for KeyframeDeclarationParser<'a, 'b> {
let property_context = PropertyParserContext::new(self.context);
let id = PropertyId::parse(&name, Some(&property_context))
.map_err(|()| PropertyDeclarationParseError::UnknownProperty(name))?;
match PropertyDeclaration::parse_into(self.declarations, id, self.context, input) {
.map_err(|()| PropertyDeclarationParseError::UnknownProperty(name.clone()))?;
match PropertyDeclaration::parse_into(self.declarations, id, name, self.context, input) {
Ok(()) => {
// In case there is still unparsed text in the declaration, we should roll back.
input.expect_exhausted().map_err(|e| e.into())