LibWeb/CSS: Replace CSSUnitValue with DimensionStyleValue

CSSUnitValue is a typed-om type which we will implement separately in
the future. However, it still seems useful to give our dimension values
a base class. (Maybe they could be templated in the future?) So instead
of deleting it entirely, rename it to DimensionStyleValue and make its
API match our style better.
This commit is contained in:
Sam Atkins 2025-08-08 11:08:54 +01:00 committed by Tim Ledbetter
commit 99bce9a94d
Notes: github-actions[bot] 2025-08-08 14:20:30 +00:00
17 changed files with 65 additions and 52 deletions

View file

@ -5486,7 +5486,7 @@ RefPtr<CSS::StyleValue const> parse_nonzero_dimension_value(StringView string)
return nullptr;
// 4. If value is zero, return an error.
if (value->is_length() && value->as_length().length().raw_value() == 0)
if (value->is_length() && value->as_length().raw_value() == 0)
return nullptr;
if (value->is_percentage() && value->as_percentage().percentage().value() == 0)
return nullptr;