mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
style: Make PropertyId::parse less of a footgun.
Bug: 1466095 Reviewed-by: xidorn MozReview-Commit-ID: 2BmtSDPmHj9
This commit is contained in:
parent
5db1387f39
commit
600f19540e
5 changed files with 44 additions and 26 deletions
|
@ -1158,7 +1158,7 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for PropertyDeclarationParser<'a, 'b> {
|
|||
name: CowRcStr<'i>,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Importance, ParseError<'i>> {
|
||||
let id = match PropertyId::parse(&name) {
|
||||
let id = match PropertyId::parse(&name, self.context) {
|
||||
Ok(id) => id,
|
||||
Err(..) => {
|
||||
return Err(input.new_custom_error(if is_non_mozilla_vendor_identifier(&name) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue