mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
LibWeb: Avoid early conversion to CSSPixels when simplifying calculation
Converting to CSSPixels caused us to lose precision and the sign of signed zeroes. The values we resolve against in Length::ResolutionContext are still themselves rounded too early but this is in the right direction.
This commit is contained in:
Notes:
github-actions[bot]
2025-10-23 08:35:32 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/0b45a684238 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6544 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -2,8 +2,8 @@ Harness status: OK
|
||||
|
||||
Found 229 tests
|
||||
|
||||
217 Pass
|
||||
12 Fail
|
||||
219 Pass
|
||||
10 Fail
|
||||
Pass round(10,10) should be used-value-equivalent to 10
|
||||
Pass mod(1,1) should be used-value-equivalent to 0
|
||||
Pass rem(1,1) should be used-value-equivalent to 0
|
||||
@@ -61,8 +61,8 @@ Pass calc(rem(mod(18,5),mod(17,5))) should be used-value-equivalent to 1
|
||||
Pass calc(mod(-140,-90)) should be used-value-equivalent to -50
|
||||
Pass calc(mod(rem(1,18)* -1,5)) should be used-value-equivalent to 4
|
||||
Pass round(10px,6px) should be used-value-equivalent to 12px
|
||||
Fail round(10cm,6cm) should be used-value-equivalent to 12cm
|
||||
Fail round(10mm,6mm) should be used-value-equivalent to 12mm
|
||||
Pass round(10cm,6cm) should be used-value-equivalent to 12cm
|
||||
Pass round(10mm,6mm) should be used-value-equivalent to 12mm
|
||||
Pass round(10Q, 6Q) should be used-value-equivalent to 12Q
|
||||
Pass round(10in,6in) should be used-value-equivalent to 12in
|
||||
Pass round(10pc,6pc) should be used-value-equivalent to 12pc
|
||||
|
||||
Reference in New Issue
Block a user