1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

LibWeb: Return Optional from StyleProperties::box_sizing()

This function was written as if it returned `Optional<CSS::BoxSizing>`
but actually returned a plain `CSS::BoxSizing`, meaning if the property
was not set or was invalid, it would return whichever enum value was
first. This wasn't visible because we don't yet pay any attention to
the `box-sizing` property.
This commit is contained in:
Sam Atkins 2022-04-13 19:33:56 +01:00 committed by Andreas Kling
parent 3f61f869c8
commit 4d42885327
Notes: sideshowbarker 2024-07-17 11:49:06 +09:00
3 changed files with 4 additions and 3 deletions

View file

@ -961,7 +961,7 @@ Vector<ShadowData> StyleProperties::text_shadow() const
return shadow(PropertyID::TextShadow);
}
CSS::BoxSizing StyleProperties::box_sizing() const
Optional<CSS::BoxSizing> StyleProperties::box_sizing() const
{
auto value = property(CSS::PropertyID::BoxSizing);
if (!value.has_value())