1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:27:43 +00:00

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
parent ac4350748e
commit 62a8cf2bb8
4 changed files with 19 additions and 1 deletions

View file

@ -79,7 +79,7 @@ CSS::Size StyleProperties::size_value(CSS::PropertyID id) const
}
if (value->is_calculated())
return CSS::Size::make_length(CSS::Length::make_calculated(const_cast<CalculatedStyleValue&>(value->as_calculated())));
return CSS::Size::make_calculated(const_cast<CalculatedStyleValue&>(value->as_calculated()));
if (value->is_percentage())
return CSS::Size::make_percentage(value->as_percentage().percentage());