mirror of
https://github.com/servo/servo.git
synced 2025-08-25 23:28:21 +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
|
@ -315,12 +315,12 @@ impl Declaration {
|
|||
|
||||
let mut input = ParserInput::new(&self.0);
|
||||
let mut input = Parser::new(&mut input);
|
||||
input
|
||||
.parse_entirely(|input| -> Result<(), CssParseError<()>> {
|
||||
input.parse_entirely(|input| -> Result<(), CssParseError<()>> {
|
||||
let prop = input.expect_ident_cloned().unwrap();
|
||||
input.expect_colon().unwrap();
|
||||
|
||||
let id = PropertyId::parse(&prop).map_err(|_| input.new_custom_error(()))?;
|
||||
let id = PropertyId::parse(&prop, context)
|
||||
.map_err(|_| input.new_custom_error(()))?;
|
||||
|
||||
let mut declarations = SourcePropertyDeclaration::new();
|
||||
input.parse_until_before(Delimiter::Bang, |input| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue