mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Prevent parsing 'none' keyword in grid-template's columns part
This commit is contained in:
parent
f4eccdae3f
commit
fd3b99027a
2 changed files with 14 additions and 7 deletions
|
@ -366,6 +366,14 @@ impl Parse for GridTemplateComponent<TrackSizeOrRepeat> { // FIXME: Derive Par
|
|||
return Ok(GridTemplateComponent::None)
|
||||
}
|
||||
|
||||
Self::parse_without_none(context, input)
|
||||
}
|
||||
}
|
||||
|
||||
impl GridTemplateComponent<TrackSizeOrRepeat> {
|
||||
/// Parses a `GridTemplateComponent<TrackSizeOrRepeat>` except `none` keyword.
|
||||
pub fn parse_without_none<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
|
||||
-> Result<Self, ParseError<'i>> {
|
||||
if let Ok(t) = input.try(|i| TrackList::parse(context, i)) {
|
||||
return Ok(GridTemplateComponent::TrackList(t))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue