From 5640779838c02269501b539236209e0a34b86719 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 2 Aug 2023 17:03:57 +0100 Subject: [PATCH] LibWeb: Allow single-value shorthand properties to parse as CompositeSV Don't give up if we can't parse that single value for the property directly, but let the parsing code carry on and see if we can produce a CompositeStyleValue. --- Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 93750ffac3..cf2c4ef3cf 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -7576,12 +7576,7 @@ Parser::ParseErrorOr> Parser::parse_css_value(Property auto stream = TokenStream { component_values }; if (auto parsed_value = FIXME_TRY(parse_css_value_for_property(property_id, stream))) return parsed_value.release_nonnull(); - - return ParseError::SyntaxError; - } - - // Multiple ComponentValues will usually produce multiple StyleValues, so make a StyleValueList. - { + } else { StyleValueVector parsed_values; auto stream = TokenStream { component_values }; while (auto parsed_value = FIXME_TRY(parse_css_value_for_property(property_id, stream))) {