-
Notifications
You must be signed in to change notification settings - Fork 757
Description
About the serialization of the interpolation result (for individual transforms), our wpt has a testcase like this:
test_interpolation({
property: 'scale',
from: 'none',
to: '4 3 2',
}, [
{at: -1, expect: '-2 -1 0'},
{at: 0, expect: 'none'},
{at: 0.125, expect: '1.375 1.25 1.125'},
{at: 0.875, expect: '3.625 2.75 1.875'},
{at: 1, expect: '4 3 2'},
{at: 2, expect: '7 5 3'}
]);
We do animation from none to 4 3 2 in the above testcase. However, the spec [2] says
When translate, rotate or scale are animating or transitioning, and the from value or to value (but not both) is none, the value none is replaced by the equivalent identity value (0px for translate, 0deg for rotate, 1 for scale).
This means at 0%, the serialization should be 1 1 1 because we should convert it into scale3d, right? It seems the wpt converts it back to none for serialization at 0% or 100% for now.
Besides, the following question is:
if we do interpolation from 26 17 9 to 2 1, the serialization result at 100% is 2 1 or 2 1 1? Just want to know should we treat the serialization at 0% and 100% as a special case for individual transform? It seems the spec says we should convert it to a interpolatable value during animation, but the current wpt doesn't follow this? (Or maybe other specs define this but I didn't notice.)
Thanks.
cc @birtles
[1] https://github.com/web-platform-tests/wpt/blob/master/css/css-transforms/animation/scale-interpolation.html
[2] https://drafts.csswg.org/css-transforms-2/#individual-transforms