mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibWeb: Make property_id_from_string()
return Optional
This commit is contained in:
parent
03613dc14d
commit
465ecf37c2
5 changed files with 29 additions and 29 deletions
|
@ -27,8 +27,8 @@ 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 property’s grammar, return true.
|
||||
if (auto property_id = property_id_from_string(property); property_id != PropertyID::Invalid) {
|
||||
if (parse_css_value(Parser::ParsingContext { realm }, value, property_id).release_value_but_fixme_should_propagate_errors())
|
||||
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())
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue