mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Fix parsing logic of grid-template property
Fist line names are parsed on the top of the function already and it shouldn't be parsed again.
This commit is contained in:
parent
8827cb1440
commit
f7aac8d225
1 changed files with 7 additions and 1 deletions
|
@ -313,7 +313,13 @@
|
|||
} else {
|
||||
let mut template_rows = GridTemplateComponent::parse(context, input)?;
|
||||
if let GenericGridTemplateComponent::TrackList(ref mut list) = template_rows {
|
||||
list.line_names[0] = first_line_names; // won't panic
|
||||
// Fist line names are parsed already and it shouldn't be parsed again.
|
||||
// If line names are not empty, that means given property value is not acceptable
|
||||
if list.line_names[0].is_empty() {
|
||||
list.line_names[0] = first_line_names; // won't panic
|
||||
} else {
|
||||
return Err(StyleParseError::UnspecifiedError.into());
|
||||
}
|
||||
}
|
||||
|
||||
input.expect_delim('/')?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue