Auto merge of #18444 - ferjm:bug1384221.alias.errors, r=jdm

stylo: Fix error reporting for invalid values in property alias

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1384221](https://bugzilla.mozilla.org/show_bug.cgi?id=1384221)
- [X] There are [tests](https://bug1384221.bmoattachments.org/attachment.cgi?id=8906527) for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18444)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-09-11 12:50:11 -05:00 committed by GitHub
commit d2b689cf2e
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())