LibWeb/CSS: Add method for parsing <custom-ident> directly

We specifically want to parse one inside a selector, where we only care
about the string itself and don't want a whole style value.
This commit is contained in:
Sam Atkins 2025-03-24 13:44:05 +00:00 committed by Andreas Kling
commit 5cf04a33ad
Notes: github-actions[bot] 2025-03-25 07:56:19 +00:00
2 changed files with 14 additions and 6 deletions

View file

@ -301,6 +301,7 @@ private:
Optional<PropertyAndValue> parse_css_value_for_properties(ReadonlySpan<PropertyID>, TokenStream<ComponentValue>&);
RefPtr<CSSStyleValue> parse_builtin_value(TokenStream<ComponentValue>&);
RefPtr<CSSStyleValue> parse_calculated_value(ComponentValue const&);
Optional<FlyString> parse_custom_ident(TokenStream<ComponentValue>&, ReadonlySpan<StringView> blacklist);
RefPtr<CustomIdentStyleValue> parse_custom_ident_value(TokenStream<ComponentValue>&, ReadonlySpan<StringView> blacklist);
// NOTE: Implemented in generated code. (GenerateCSSMathFunctions.cpp)
RefPtr<CalculationNode> parse_math_function(Function const&, CalculationContext const&);