From 4bcf4573db348ca2a2b34a385b258e12005082ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 21 May 2023 21:30:15 +0200 Subject: [PATCH] style: Avoid trying to serialize 'all' with stuff that isn't variable references or CSS wide keywords All is special, and that'd cause an error later on. Differential Revision: https://phabricator.services.mozilla.com/D115132 --- components/style/properties/properties.mako.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 99d283da46c..71bf6f1e78a 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -1537,6 +1537,11 @@ impl ShorthandId { return None; } + if self == ShorthandId::All { + // 'all' only supports variables and CSS wide keywords. + return None; + } + // Check whether all declarations can be serialized as part of shorthand. if declarations3.all(|d| d.may_serialize_as_part_of_shorthand()) { return Some(AppendableValue::DeclarationsForShorthand(self, declarations));