mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
committed by
Andreas Kling
parent
22cb74d9ff
commit
6bf5371124
@@ -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 {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user