1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 21:55:07 +00:00

LibWeb: Make external StyleValue-parsing methods infallible

This commit is contained in:
Sam Atkins 2023-08-19 15:01:21 +01:00 committed by Andreas Kling
parent 9e1bbfbd37
commit 28c2836c24
13 changed files with 70 additions and 70 deletions

View file

@ -28,7 +28,7 @@ bool supports(JS::VM& vm, StringView property, StringView value)
// 1. If property is an ASCII case-insensitive match for any defined CSS property that the UA supports,
// and value successfully parses according to that propertys grammar, return true.
if (auto property_id = property_id_from_string(property); property_id.has_value()) {
if (parse_css_value(Parser::ParsingContext { realm }, value, property_id.value()).release_value_but_fixme_should_propagate_errors())
if (parse_css_value(Parser::ParsingContext { realm }, value, property_id.value()))
return true;
}