mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 13:09:41 +00:00
LibWeb/CSS: Remove the "Auto" type from Length
This has always been a bit of a hack. Initially it made sense as a lot of properties that accept a length also accept `auto`, but while convenient, that leads to problems: It's easy to forget to check if a length is `auto`, and places that don't accept it end up with an invalid state lurking in the type system, which makes things unclear.
This commit is contained in:
parent
f74a40fdcb
commit
930ee495e7
Notes:
github-actions[bot]
2025-09-04 12:32:29 +00:00
Author: https://github.com/AtkinsSJ
Commit: 930ee495e7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6043
10 changed files with 8 additions and 66 deletions
|
@ -3173,7 +3173,6 @@ RefPtr<FitContentStyleValue const> Parser::parse_fit_content_value(TokenStream<C
|
|||
if (component_value.is_ident("fit-content"sv)) {
|
||||
transaction.commit();
|
||||
return FitContentStyleValue::create();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!component_value.is_function())
|
||||
|
@ -3192,8 +3191,6 @@ RefPtr<FitContentStyleValue const> Parser::parse_fit_content_value(TokenStream<C
|
|||
return nullptr;
|
||||
|
||||
transaction.commit();
|
||||
if (maybe_length->is_auto())
|
||||
return FitContentStyleValue::create();
|
||||
return FitContentStyleValue::create(maybe_length.release_value());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue