mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Fix the integer setting of the GridLine struct
GridLine line_num shouldn't be set if it's not parsed. So we can determine if it's set or not for serialization.
This commit is contained in:
parent
46780ceb0d
commit
638a306168
2 changed files with 5 additions and 6 deletions
|
@ -119,9 +119,7 @@ impl Parse for GridLine {
|
|||
if i.value() <= 0 { // disallow negative integers for grid spans
|
||||
return Err(StyleParseError::UnspecifiedError.into())
|
||||
}
|
||||
} else if grid_line.ident.is_some() { // integer could be omitted
|
||||
grid_line.line_num = Some(Integer::new(1));
|
||||
} else {
|
||||
} else if grid_line.ident.is_none() { // integer could be omitted
|
||||
return Err(StyleParseError::UnspecifiedError.into())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue