LibWeb: Let CSS::Size contain a CalculatedStyleValue

Technically this was already true, but now we explicitly allow it
instead of that calc value being hidden inside a Length or Percentage.
This commit is contained in:
Sam Atkins 2023-03-30 10:50:40 +01:00 committed by Andreas Kling
commit 62a8cf2bb8
Notes: sideshowbarker 2024-07-17 11:06:06 +09:00
4 changed files with 19 additions and 1 deletions

View file

@ -168,6 +168,8 @@ static NonnullRefPtr<StyleValue const> style_value_for_size(CSS::Size const& siz
return LengthStyleValue::create(size.length());
if (size.is_auto())
return IdentifierStyleValue::create(ValueID::Auto);
if (size.is_calculated())
return size.calculated();
if (size.is_min_content())
return IdentifierStyleValue::create(ValueID::MinContent);
if (size.is_max_content())