LibWeb/CSS: Stop asserting that UnresolvedSV contains an ASF

Typed-OM means that the author can set a property's value to a
CSSUnparsedValue, which may or may not have any arbitrary substitution
functions in it. This VERIFY was just there to catch parsing bugs that
created UnresolvedStyleValues unnecessarily, and removing it is
harmless.
This commit is contained in:
Sam Atkins 2025-10-03 13:43:52 +01:00 committed by Andreas Kling
commit 882bdbb019
Notes: github-actions[bot] 2025-10-09 14:17:05 +00:00

View file

@ -4663,10 +4663,6 @@ RefPtr<FontSourceStyleValue const> Parser::parse_font_source_value(TokenStream<C
NonnullRefPtr<StyleValue const> Parser::resolve_unresolved_style_value(ParsingParams const& context, DOM::AbstractElement abstract_element, PropertyNameAndID const& property, UnresolvedStyleValue const& unresolved, Optional<GuardedSubstitutionContexts&> existing_guarded_contexts)
{
// Unresolved always contains a var() or attr(), unless it is a custom property's value, in which case we shouldn't be trying
// to produce a different StyleValue from it.
VERIFY(unresolved.contains_arbitrary_substitution_function());
auto parser = Parser::create(context, ""sv);
if (existing_guarded_contexts.has_value())
return parser.resolve_unresolved_style_value(abstract_element, existing_guarded_contexts.value(), property, unresolved);