mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Discard Number type when converting to CalculationNode
Before this change we would maintain explicit signs when serializing e.g. `animation-iteration-count: calc(+1)` would serialize as `calc(+1)` rather than `calc(1)` as intended
This commit is contained in:
parent
2f83356c0f
commit
ef4f01ea44
|
|
@ -4253,7 +4253,7 @@ RefPtr<CalculationNode const> Parser::convert_to_calculation_node(CalcParsing::N
|
|||
}
|
||||
|
||||
if (component_value->is(Token::Type::Number))
|
||||
return NumericCalculationNode::create(component_value->token().number(), context);
|
||||
return NumericCalculationNode::create(Number { Number::Type::Number, component_value->token().number().value() }, context);
|
||||
|
||||
if (component_value->is(Token::Type::Dimension)) {
|
||||
auto numeric_value = component_value->token().dimension_value();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user