From 900500c0b3e89456b22cf3d1c9dd43d561d06844 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Mon, 19 May 2025 21:48:00 +0200 Subject: [PATCH] LibWeb: Remove obsolete font-style Keyword handling `Parser::parse_font_style_value()` only produces FontStyleStyleValues now, so we no longer need this branch. --- Libraries/LibWeb/CSS/CSSStyleValue.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Libraries/LibWeb/CSS/CSSStyleValue.cpp b/Libraries/LibWeb/CSS/CSSStyleValue.cpp index db0a928b68a..3740acb2431 100644 --- a/Libraries/LibWeb/CSS/CSSStyleValue.cpp +++ b/Libraries/LibWeb/CSS/CSSStyleValue.cpp @@ -446,21 +446,7 @@ int CSSStyleValue::to_font_weight() const int CSSStyleValue::to_font_slope() const { // FIXME: Implement oblique - if (is_keyword()) { - switch (as_keyword().keyword()) { - case Keyword::Italic: { - static int italic_slope = Gfx::name_to_slope("Italic"sv); - return italic_slope; - } - case Keyword::Oblique: - static int oblique_slope = Gfx::name_to_slope("Oblique"sv); - return oblique_slope; - case Keyword::Normal: - default: - static int normal_slope = Gfx::name_to_slope("Normal"sv); - return normal_slope; - } - } else if (is_font_style()) { + if (is_font_style()) { switch (as_font_style().font_style()) { case FontStyle::Italic: static int italic_slope = Gfx::name_to_slope("Italic"sv);