mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
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! :^)
This commit is contained in:
parent
e54531244f
commit
ca436afeb5
1 changed files with 1 additions and 3 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue