mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 04:59:23 +00:00
LibWeb/CSS: Use Optional instead of auto lengths in Size
Any type of Size which has no LengthPercentage value now uses an empty optional instead of making an auto Length as before. We also now serialize a `fit-content` Size as `fit-content` instead of `fit-content(auto)`, though this doesn't affect test results and I didn't identify where it's actually used.
This commit is contained in:
parent
d10eaa996e
commit
60fc23e916
Notes:
github-actions[bot]
2025-09-04 12:33:22 +00:00
Author: https://github.com/AtkinsSJ
Commit: 60fc23e916
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6043
3 changed files with 28 additions and 22 deletions
|
@ -346,8 +346,11 @@ static NonnullRefPtr<StyleValue const> style_value_for_size(Size const& size)
|
|||
return KeywordStyleValue::create(Keyword::MinContent);
|
||||
if (size.is_max_content())
|
||||
return KeywordStyleValue::create(Keyword::MaxContent);
|
||||
if (size.is_fit_content())
|
||||
return FitContentStyleValue::create(size.fit_content_available_space());
|
||||
if (size.is_fit_content()) {
|
||||
if (auto available_space = size.fit_content_available_space(); available_space.has_value())
|
||||
return FitContentStyleValue::create(available_space.release_value());
|
||||
return FitContentStyleValue::create();
|
||||
}
|
||||
TODO();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue