This WPT test has 4 failures in Firefox: https://wpt.fyi/results/css/css-transforms/parsing/rotate-parsing-valid.html?label=master&label=experimental&aligned&q=firefox%3Afail The first failure looks like a real bug (albeit an edge case) -- we serialize `rotate: 0 0 0 <angle>` as `rotate: x <angle>`, which is wrong. The `0 0 0` values there represent a three-dimensional direction vector, which is used to determine the direction of the rotation. And if this direction vector is 0 0 0, then we're in a degenerate case and the rotation doesn't occur. So, this is not equivalent to an "x" rotation, despite us serializing it as such. Reduced testcase for this specific issue -- this is expected to alert `0 0 0 400grad`: ``` data:text/html,<div id="me" style="rotate:0 0 0 400grad"></div><script>alert(me.style.rotate)</script> ``` The other 3 failures are more trivial; it looks like the test is expecting us to omit the `z` and just use single-value syntax in our serialization, when it's implied. Reduced testcase for this: ``` data:text/html,<div id="me" style="rotate:z 400grad"></div><script>alert(me.style.rotate)</script> `` I'm not sure if this is strictly required anywhere, but it's in line with the shortest serialization principle, and it seems easy enough, unless we feel strongly that the test is wrong and that it's better to preserve the `z` in this case.
Bug 1734472 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
This WPT test has 4 failures in Firefox: https://wpt.fyi/results/css/css-transforms/parsing/rotate-parsing-valid.html?label=master&label=experimental&aligned&q=firefox%3Afail The first failure looks like a real bug (albeit an edge case) -- we serialize `rotate: 0 0 0 <angle>` as `rotate: x <angle>`, which is wrong. The `0 0 0` values there represent a three-dimensional direction vector, which is used to determine the direction of the rotation. And if this direction vector is 0 0 0, then we're in a degenerate case and the rotation doesn't occur. So, this is not equivalent to an "x" rotation, despite us serializing it as such. Reduced testcase for this specific issue -- this is expected to alert `0 0 0 400grad`: ``` data:text/html,<div id="me" style="rotate:0 0 0 400grad"></div><script>alert(me.style.rotate)</script> ``` The other 3 failures are more trivial; it looks like the test is expecting us to omit the `z` and just use single-value syntax in our serialization, when it's implied. Reduced testcase for this: ``` data:text/html,<div id="me" style="rotate:z 400grad"></div><script>alert(me.style.rotate)</script> ``` I'm not sure if this is strictly required anywhere, but it's in line with the shortest serialization principle, and it seems easy enough, unless we feel strongly that the test is wrong and that it's better to preserve the `z` in this case.
This WPT test has 4 failures in Firefox: https://wpt.fyi/results/css/css-transforms/parsing/rotate-parsing-valid.html?label=master&label=experimental&aligned&q=firefox%3Afail The first failure looks like a real bug (albeit an edge case) -- we serialize `rotate: 0 0 0 <angle>` as `rotate: x <angle>`, which is wrong. The `0 0 0` values there represent a three-dimensional direction vector, which is used to determine the direction of the rotation. And if this direction vector is 0 0 0, then we're in a degenerate case and the rotation doesn't occur. So, this is not equivalent to an "x" rotation, despite us serializing it as such. Reduced testcase for this specific issue -- this is expected to alert `0 0 0 400grad`, but in Firefox, it instead alerts `x 400grad`: ``` data:text/html,<div id="me" style="rotate:0 0 0 400grad"></div><script>alert(me.style.rotate)</script> ``` The other 3 failures are more trivial; it looks like the test is expecting us to omit the `z` and just use single-value syntax in our serialization, when it's implied. Reduced testcase for this: ``` data:text/html,<div id="me" style="rotate:z 400grad"></div><script>alert(me.style.rotate)</script> ``` I'm not sure if this is strictly required anywhere, but it's in line with the shortest serialization principle, and it seems easy enough, unless we feel strongly that the test is wrong and that it's better to preserve the `z` in this case.