mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Layer should be an invalid media type
Differential Revision: https://phabricator.services.mozilla.com/D170676
This commit is contained in:
parent
fa9fa00977
commit
75b3bf1842
1 changed files with 2 additions and 2 deletions
|
@ -44,12 +44,12 @@ impl MediaType {
|
||||||
fn parse(name: &str) -> Result<Self, ()> {
|
fn parse(name: &str) -> Result<Self, ()> {
|
||||||
// From https://drafts.csswg.org/mediaqueries/#mq-syntax:
|
// From https://drafts.csswg.org/mediaqueries/#mq-syntax:
|
||||||
//
|
//
|
||||||
// The <media-type> production does not include the keywords not, or, and, and only.
|
// The <media-type> production does not include the keywords only, not, and, or, and layer.
|
||||||
//
|
//
|
||||||
// Here we also perform the to-ascii-lowercase part of the serialization
|
// Here we also perform the to-ascii-lowercase part of the serialization
|
||||||
// algorithm: https://drafts.csswg.org/cssom/#serializing-media-queries
|
// algorithm: https://drafts.csswg.org/cssom/#serializing-media-queries
|
||||||
match_ignore_ascii_case! { name,
|
match_ignore_ascii_case! { name,
|
||||||
"not" | "or" | "and" | "only" => Err(()),
|
"not" | "or" | "and" | "only" | "layer" => Err(()),
|
||||||
_ => Ok(MediaType(CustomIdent(Atom::from(string_as_ascii_lowercase(name))))),
|
_ => Ok(MediaType(CustomIdent(Atom::from(string_as_ascii_lowercase(name))))),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue