1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

LibWeb: Make text-decoration-line parsing match other properties

This commit is contained in:
Sam Atkins 2023-12-08 17:32:25 +00:00 committed by Sam Atkins
parent ed77dee405
commit 6a6995cb12

View file

@ -5935,13 +5935,10 @@ Parser::ParseErrorOr<NonnullRefPtr<StyleValue>> Parser::parse_css_value(Property
if (auto parsed_value = parse_text_decoration_value(tokens); parsed_value && !tokens.has_next_token())
return parsed_value.release_nonnull();
return ParseError::SyntaxError;
case PropertyID::TextDecorationLine: {
TokenStream value_tokens { component_values };
auto parsed_value = parse_text_decoration_line_value(value_tokens);
if (parsed_value && !value_tokens.has_next_token())
case PropertyID::TextDecorationLine:
if (auto parsed_value = parse_text_decoration_line_value(tokens); parsed_value && !tokens.has_next_token())
return parsed_value.release_nonnull();
return ParseError::SyntaxError;
}
case PropertyID::TextShadow:
if (auto parsed_value = parse_shadow_value(tokens, AllowInsetKeyword::No); parsed_value && !tokens.has_next_token())
return parsed_value.release_nonnull();