LibWeb: Properly handle auto in StyleProperties::length_percentage()

This relied on `auto` being a LengthStyleValue, which soon will not be
true. :^)
This commit is contained in:
Sam Atkins 2023-04-19 11:26:49 +01:00 committed by Andreas Kling
commit 6bf5371124
Notes: sideshowbarker 2024-07-17 00:49:59 +09:00

View file

@ -114,6 +114,9 @@ Optional<LengthPercentage> StyleProperties::length_percentage(CSS::PropertyID id
if (value->has_length())
return value->to_length();
if (value->has_auto())
return LengthPercentage { Length::make_auto() };
return {};
}