1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

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
parent 22cb74d9ff
commit 6bf5371124

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 {};
}