diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/StyleComputer.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/StyleComputer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index a8f6c39db4..f0c303b659 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -665,8 +665,8 @@ void StyleComputer::compute_font(StyleProperties& style, DOM::Element const* ele default: break; } - } else if (font_weight->is_numeric()) { - int font_weight_integer = roundf(static_cast<NumericStyleValue const&>(*font_weight).value()); + } else if (font_weight->has_integer()) { + int font_weight_integer = font_weight->to_integer(); if (font_weight_integer <= Gfx::FontWeight::Regular) weight = Gfx::FontWeight::Regular; else if (font_weight_integer <= Gfx::FontWeight::Bold) |