mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 04:59:23 +00:00
LibWeb/CSS: Use LengthOrAuto for clip rects
This commit is contained in:
parent
f663c0a72d
commit
9b27aaa00c
Notes:
github-actions[bot]
2025-09-04 12:34:02 +00:00
Author: https://github.com/AtkinsSJ
Commit: 9b27aaa00c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6043
5 changed files with 22 additions and 15 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue