LibWeb/CSS: Take custom-ident blacklist as a Span

Using std::initializer_list here was a bit of a hack, and makes it
awkward to pass those blacklists around.
This commit is contained in:
Sam Atkins 2025-02-25 11:46:52 +00:00
parent 9585c6c0c7
commit c6c607884b
Notes: github-actions[bot] 2025-02-26 11:24:19 +00:00
3 changed files with 7 additions and 7 deletions

View file

@ -839,7 +839,7 @@ RefPtr<CSSStyleValue> Parser::parse_color_scheme_value(TokenStream<ComponentValu
// The 'normal', 'light', 'dark', and 'only' keywords are not valid <custom-ident>s in this property.
// Note: only 'normal' is blacklisted here because 'light' and 'dark' aren't parsed differently and 'only' is checked for afterwards
auto ident = parse_custom_ident_value(tokens, { "normal"sv });
auto ident = parse_custom_ident_value(tokens, { { "normal"sv } });
if (!ident)
return {};
@ -4452,7 +4452,7 @@ RefPtr<CSSStyleValue> Parser::parse_view_transition_name_value(TokenStream<Compo
// The values 'none' and 'auto' are excluded from <custom-ident> here.
// Note: Only auto is excluded here since none isn't parsed differently.
auto ident = parse_custom_ident_value(tokens, { "auto"sv });
auto ident = parse_custom_ident_value(tokens, { { "auto"sv } });
if (!ident)
return {};