1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

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.
This commit is contained in:
Sam Atkins 2023-08-02 17:03:57 +01:00 committed by Andreas Kling
parent d98bc0da87
commit 5640779838

View file

@ -7576,12 +7576,7 @@ Parser::ParseErrorOr<NonnullRefPtr<StyleValue>> 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))) {