From 75b3bf184216cf9ab7041cd48fec9ee83a30555b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 23 Feb 2023 22:28:50 +0000 Subject: [PATCH] style: Layer should be an invalid media type Differential Revision: https://phabricator.services.mozilla.com/D170676 --- components/style/media_queries/media_query.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/style/media_queries/media_query.rs b/components/style/media_queries/media_query.rs index da34bdee571..24312561a1f 100644 --- a/components/style/media_queries/media_query.rs +++ b/components/style/media_queries/media_query.rs @@ -44,12 +44,12 @@ impl MediaType { fn parse(name: &str) -> Result { // From https://drafts.csswg.org/mediaqueries/#mq-syntax: // - // The production does not include the keywords not, or, and, and only. + // The production does not include the keywords only, not, and, or, and layer. // // Here we also perform the to-ascii-lowercase part of the serialization // algorithm: https://drafts.csswg.org/cssom/#serializing-media-queries 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))))), } }