LibWeb: Remove obsolete font-style Keyword handling
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

`Parser::parse_font_style_value()` only produces
FontStyleStyleValues now, so we no longer need this
branch.
This commit is contained in:
Lion Kortlepel 2025-05-19 21:48:00 +02:00 committed by Sam Atkins
parent b1ee539e9d
commit 900500c0b3
Notes: github-actions[bot] 2025-05-22 16:40:10 +00:00

View file

@ -446,21 +446,7 @@ int CSSStyleValue::to_font_weight() const
int CSSStyleValue::to_font_slope() const
{
// FIXME: Implement oblique <angle>
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);