mirror of
https://github.com/servo/servo.git
synced 2025-08-17 11:25:35 +01:00
stylo: Fix error reporting for invalid values in property alias
This commit is contained in:
parent
3d4868b282
commit
3be7ad8b6f
4 changed files with 15 additions and 13 deletions
|
@ -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())
|
||||
|
|
|
@ -265,7 +265,7 @@ impl Declaration {
|
|||
|
||||
let mut declarations = SourcePropertyDeclaration::new();
|
||||
input.parse_until_before(Delimiter::Bang, |input| {
|
||||
PropertyDeclaration::parse_into(&mut declarations, id, &context, input)
|
||||
PropertyDeclaration::parse_into(&mut declarations, id, prop.into(), &context, input)
|
||||
.map_err(|e| StyleParseError::PropertyDeclaration(e).into())
|
||||
})?;
|
||||
let _ = input.try(parse_important);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue