LibWeb/CSS: Use LengthOrAuto for clip rects

This commit is contained in:
Sam Atkins 2025-08-27 16:22:48 +01:00
commit 9b27aaa00c
Notes: github-actions[bot] 2025-09-04 12:34:02 +00:00
5 changed files with 22 additions and 15 deletions

View file

@ -1351,7 +1351,7 @@ RefPtr<StyleValue const> Parser::parse_rect_value(TokenStream<ComponentValue>& t
auto context_guard = push_temporary_value_parsing_context(FunctionContext { "rect"sv });
Vector<Length, 4> params;
Vector<LengthOrAuto, 4> params;
auto argument_tokens = TokenStream { function_token.function().value };
enum class CommaRequirement {
@ -1379,7 +1379,7 @@ RefPtr<StyleValue const> Parser::parse_rect_value(TokenStream<ComponentValue>& t
// Negative lengths are permitted.
if (argument_tokens.next_token().is_ident("auto"sv)) {
(void)argument_tokens.consume_a_token(); // `auto`
params.append(Length::make_auto());
params.append(LengthOrAuto::make_auto());
} else {
auto maybe_length = parse_length(argument_tokens);
if (!maybe_length.has_value())