WPT failures in transform-interpolation-005.html
Categories
(Core :: Layout, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: boris, Assigned: boris)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Per wpt.fyi, there are 4 sub-tests we failed because we don't convert the 3d matrix into 2d matrix, for the interpolation result:
1. FAIL CSS Transitions: property <transform> from [matrix3d(0.571428571428571, -0.625, -0.8333333333333346, -0.66666666666669, 0.5, -0.1875, -0.8125, 0.3125, 0.34375, -1, 0.8333333333333327, 1.34375, -1.34375, 1, -0.9375, 1)] to [none] at (1) should be [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)] - assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 0 , 0 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 ) "
2. FAIL CSS Transitions with transition: all: property <transform> from [matrix3d(0.571428571428571, -0.625, -0.8333333333333346, -0.66666666666669, 0.5, -0.1875, -0.8125, 0.3125, 0.34375, -1, 0.8333333333333327, 1.34375, -1.34375, 1, -0.9375, 1)] to [none] at (1) should be [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)] - assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 0 , 0 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 ) "
3. FAIL CSS Animations: property <transform> from [matrix3d(0.571428571428571, -0.625, -0.8333333333333346, -0.66666666666669, 0.5, -0.1875, -0.8125, 0.3125, 0.34375, -1, 0.8333333333333327, 1.34375, -1.34375, 1, -0.9375, 1)] to [none] at (1) should be [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)] - assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 0 , 0 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 ) "
4. FAIL Web Animations: property <transform> from [matrix3d(0.571428571428571, -0.625, -0.8333333333333346, -0.66666666666669, 0.5, -0.1875, -0.8125, 0.3125, 0.34375, -1, 0.8333333333333327, 1.34375, -1.34375, 1, -0.9375, 1)] to [none] at (1) should be [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)] - assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 0 , 0 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 ) "
Need to check what is the expected behavior for this case. (i.e. Do we really need to convert the 3d matrix into 2d matrix?)
Assignee | ||
Comment 1•1 years ago
•
|
||
Looks like we don't follow the spec for serialization.
The interpolation is correct. per this test case, when progress is 100%, our result is matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 )
.
Per spec, the resolved value for matrix (https://drafts.csswg.org/css-transforms-2/#serialization-of-the-computed-value):
Chose between <matrix()> or <matrix3d()> serialization:
If transform is a 2D matrix
Serialize transform to a <matrix()> function.
Otherwise
Serialize transform to a <matrix3d()> function.
So in this case, the result is a 2D matrix, and we have to serialize it as a matrix()
function, instead of matrix3d()
function.
UPDATED:
Well, we definitely have a check if it is 2D or 3D when serialization. Need to figure out what happened.
Assignee | ||
Comment 2•1 years ago
|
||
When the progress is 100%, the result from the original formula of calculating
left_weight
may not be 0 exactly (i.e. approximate zero, e.g. -2.22e-16), and
so this imprecision makes the recomposed Matrix3D have some approximate zeros.
Those approximate zeros (e.g. _m13
is 2e-16, and _m23
is 8e-17 in WPT)
make us failed to treat this Matrix3D as a 2D matrix when we serializing it
(because we use != 0.0f
to check if the matrix components are not equal to
zero in Matrix4x4::Is2D()
, and other places).
Updated•1 years ago
|
Updated•1 years ago
|
Comment 4•1 years ago
|
||
bugherder |
Description
•