mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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:
parent
22cb74d9ff
commit
6bf5371124
Notes:
sideshowbarker
2024-07-17 00:49:59 +09:00
Author: https://github.com/AtkinsSJ
Commit: 6bf5371124
Pull-request: https://github.com/SerenityOS/serenity/pull/18430
1 changed files with 3 additions and 0 deletions
|
@ -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 {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue