mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
style: Remove PropertyId::name.
It's only used for the error path in property parsing, so most of the time is not useful. Use the just-introduced NonCustomPropertyId::name to preserve the alias name, which we were doing by passing the name around. Bug: 1466645 Reviewed-by: xidorn MozReview-Commit-ID: 46xxZKCoeBB
This commit is contained in:
parent
7529788375
commit
915c8725ae
5 changed files with 47 additions and 42 deletions
|
@ -1116,9 +1116,7 @@ where
|
|||
let mut parser = Parser::new(&mut input);
|
||||
let start_position = parser.position();
|
||||
parser.parse_entirely(|parser| {
|
||||
let name = id.name().into();
|
||||
PropertyDeclaration::parse_into(declarations, id, name, &context, parser)
|
||||
.map_err(|e| e.into())
|
||||
PropertyDeclaration::parse_into(declarations, id, &context, parser)
|
||||
}).map_err(|err| {
|
||||
let location = err.location;
|
||||
let error = ContextualParseError::UnsupportedPropertyDeclaration(
|
||||
|
@ -1169,7 +1167,7 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for PropertyDeclarationParser<'a, 'b> {
|
|||
}
|
||||
};
|
||||
input.parse_until_before(Delimiter::Bang, |input| {
|
||||
PropertyDeclaration::parse_into(self.declarations, id, name, self.context, input)
|
||||
PropertyDeclaration::parse_into(self.declarations, id, self.context, input)
|
||||
})?;
|
||||
let importance = match input.try(parse_important) {
|
||||
Ok(()) => Importance::Important,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue