From ca436afeb5a971ff48df6c8d5660c5ffa515bb47 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 23 Jul 2021 13:51:46 +0100 Subject: [PATCH] LibWeb: Stop parsing integer CSS values as Lengths This was a hack copied over from the old parser, but it was causing problems with flex-grow, and probably other properties that accept numbers. Removing it does not seem to break anything, so lets' remove it! :^) --- Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 121433b6f4..549b0c3c7a 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -1411,9 +1411,7 @@ RefPtr Parser::parse_numeric_value(ParsingContext const&, StyleCompo if (component_value.is(Token::Type::Number)) { auto number = component_value.token(); if (number.m_number_type == Token::NumberType::Integer) { - // FIXME: This seems wrong, but it's how the old parser did things, as well as it - // whitelisting ZIndex, FontWeight and Custom PropertyIDs to allow this. - return LengthStyleValue::create(Length::make_px(number.integer())); + return NumericStyleValue::create(number.integer()); } else { auto float_value = try_parse_float(number.m_value.string_view()); if (float_value.has_value())