diff options
author | Sam Atkins <atkinssj@gmail.com> | 2021-07-23 13:51:46 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-31 00:18:11 +0200 |
commit | ca436afeb5a971ff48df6c8d5660c5ffa515bb47 (patch) | |
tree | b5aeb220012c316193d9b3d13980b4231a260ace /Userland/Libraries/LibWeb | |
parent | e54531244fc9791ce5adab65e33b4512bd5baaf6 (diff) | |
download | serenity-ca436afeb5a971ff48df6c8d5660c5ffa515bb47.zip |
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! :^)
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 4 |
1 files changed, 1 insertions, 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<StyleValue> 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()) |