Files
ladybird/Tests/LibWeb/Text/expected/css/getComputedStyle-transform.txt
Jelle Raaijmakers b015926f8e AK: Improve floating point decimals formatting
There were 2 issues with the way we formatted floating point decimals:
if the part after the decimal point exceeded the max of an u64 we would
generate wildly incorrect decimals, and we applied no rounding.

With this new code, we emit decimals one by one and perform a simple
reverse string walk to round the number up if required.
2023-10-18 19:39:30 -04:00

18 lines
1.0 KiB
Plaintext

none => none
matrix(1, 2, 3, 4, 5, 6) => matrix(1, 2, 3, 4, 5, 6)
matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) => matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
translate(1%, 2px) => matrix(1, 0, 0, 1, 7.84375, 2)
translate3d(1%, 2px, 3em) => matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 7.84375, 2, 48, 1)
translateX(1px) => matrix(1, 0, 0, 1, 1, 0)
translateY(1%) => matrix(1, 0, 0, 1, 0, 0)
scale(1, 2) => matrix(1, 0, 0, 2, 0, 0)
scaleX(2) => matrix(2, 0, 0, 1, 0, 0)
scaleY(2.5) => matrix(1, 0, 0, 2.5, 0, 0)
rotate(1deg) => matrix(0.999848, 0.017452, -0.017452, 0.999848, 0, 0)
rotateX(1rad) => matrix3d(1, 0, 0, 0, 0, 0.540302, 0.841471, 0, 0, -0.841471, 0.540302, 0, 0, 0, 0, 1)
rotateY(1grad) => matrix3d(0.999877, 0, -0.015707, 0, 0, 1, 0, 0, 0.015707, 0, 0.999877, 0, 0, 0, 0, 1)
rotateZ(1turn) => matrix(1, 0, -0, 1, 0, 0)
skew(1deg, 1rad) => matrix(1, 1.557408, 0.017455, 1, 0, 0)
skewX(1deg) => matrix(1, 0, 0.017455, 1, 0, 0)
skewY(1rad) => matrix(1, 1.557408, 0, 1, 0, 0)