mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Fix a few media query parsing bugs.
MozReview-Commit-ID: 6nUd2vA6zO Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
ca3cd64d6b
commit
78a3408405
2 changed files with 25 additions and 13 deletions
|
@ -409,11 +409,12 @@ impl Expression {
|
|||
// If there's no colon, this is a media query of the form
|
||||
// '(<feature>)', that is, there's no value specified.
|
||||
//
|
||||
// FIXME(emilio): We need to check for range operators too here when
|
||||
// we support them, see:
|
||||
//
|
||||
// https://drafts.csswg.org/mediaqueries/#mq-ranges
|
||||
// Gecko doesn't allow ranged expressions without a value, so just
|
||||
// reject them here too.
|
||||
if input.try(|i| i.expect_colon()).is_err() {
|
||||
if range != nsMediaExpression_Range::eEqual {
|
||||
return Err(())
|
||||
}
|
||||
return Ok(Expression::new(feature, None, range));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue