LibWeb/CSS: Remove duplicate error reporting for invalid descriptors

parse_descriptor_value() already logs this.
This commit is contained in:
Sam Atkins 2025-07-21 13:13:05 +01:00
commit d86bcc795d
Notes: github-actions[bot] 2025-08-04 09:53:11 +00:00

View file

@ -228,15 +228,8 @@ Optional<Descriptor> Parser::convert_to_descriptor(AtRuleID at_rule_id, Declarat
auto value_token_stream = TokenStream(declaration.value);
auto value = parse_descriptor_value(at_rule_id, descriptor_id.value(), value_token_stream);
if (value.is_error()) {
if (value.error() == ParseError::SyntaxError) {
if constexpr (CSS_PARSER_DEBUG) {
dbgln("Unable to parse value for CSS @{} descriptor '{}'.", to_string(at_rule_id), declaration.name);
value_token_stream.dump_all_tokens();
}
}
if (value.is_error())
return {};
}
return Descriptor { *descriptor_id, value.release_value() };
}