1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:18:11 +00:00

LibWeb: Add better debug logging for CSS parsing errors

Hidden behind `CSS_PARSER_DEBUG`, so I won't drive everyone else crazy.
:^)
This commit is contained in:
Sam Atkins 2021-09-22 20:33:33 +01:00 committed by Andreas Kling
parent 5d6a4c5fc2
commit 35eb8b0dc2

View file

@ -1282,8 +1282,12 @@ Optional<StyleProperty> Parser::convert_to_style_property(StyleDeclarationRule&
auto value_token_stream = TokenStream(declaration.m_values);
auto value = parse_css_value(property_id, value_token_stream);
if (value.is_error()) {
if (value.error() != ParsingResult::IncludesIgnoredVendorPrefix)
dbgln("Unable to parse value for CSS property '{}'", property_name);
if (value.error() != ParsingResult::IncludesIgnoredVendorPrefix) {
dbgln("Unable to parse value for CSS property '{}'.", property_name);
if constexpr (CSS_PARSER_DEBUG) {
value_token_stream.dump_all_tokens();
}
}
return {};
}