LibWeb: Properly simplify sum nodes containing negated sum nodes

This is ad-hoc, see https://github.com/w3c/csswg-drafts/issues/13020

Gains us 5 WPT tests
This commit is contained in:
Callum Law
2025-10-28 20:50:20 +13:00
committed by Sam Atkins
parent 9c06d58b2e
commit c2ca712406
Notes: github-actions[bot] 2025-10-30 12:19:35 +00:00
3 changed files with 120 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
Harness status: OK
Found 11 tests
11 Pass
Pass testing calc(20px + calc(80px))
Pass testing calc(calc(100px))
Pass testing calc(calc(2) * calc(50px)
Pass testing calc(calc(150px*2/3)
Pass testing calc(calc(2 * calc(calc(3)) + 4) * 10px)
Pass testing calc(50px + calc(40%))
Pass testing calc(calc(300px - 1 * (0% + 100px)))
Pass testing calc(calc(300px - (0% + 100px) * 1))
Pass testing calc(calc(300px - (0% + 100px) * -1))
Pass testing calc(calc(300px - -1 * (0% + 100px)))
Pass testing calc(calc(300px - 1 * (0% - 100px)))