LibWeb: Don't crash when an unknown property begins with a single dash

This commit is contained in:
Gingeh 2025-07-19 21:09:37 +10:00 committed by Andreas Kling
commit f38e07e0c5
Notes: github-actions[bot] 2025-07-20 06:56:21 +00:00
3 changed files with 184 additions and 1 deletions

View file

@ -1622,7 +1622,7 @@ Optional<StyleProperty> Parser::convert_to_style_property(Declaration const& dec
property_id = PropertyID::Custom;
} else if (has_ignored_vendor_prefix(property_name)) {
return {};
} else if (!property_name.bytes_as_string_view().starts_with('-')) {
} else {
dbgln_if(CSS_PARSER_DEBUG, "Unrecognized CSS property '{}'", property_name);
return {};
}