mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-21 07:29:53 +00: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
Notes:
github-actions[bot]
2025-10-20 10:29:27 +00:00
Author: https://github.com/Calme1709
Commit: ef4f01ea44
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6459
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue