mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Use decomposition to interpolate matched perspective transform operations.
Looks like this produces sensible results for interpolation with 0, though I'm not really convinced about the results from, let's say, 1px to 2000px in the attached test-case, I would've expected a linear interpolation from that to go through normal length interpolation. css-transforms-1 says: > Two transform functions with the same name and the same number of arguments > are interpolated numerically without a former conversion. The calculated > value will be of the same transform function type with the same number of > arguments. > > Special rules apply to <matrix()>. Which is what we do... I was going to file a spec issue but turns out that it's already addressed in css-transforms-2: https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions Which says: > The transform functions <matrix()>, matrix3d() and perspective() get > converted into 4x4 matrices first and interpolated as defined in section > Interpolation of Matrices afterwards. Differential Revision: https://phabricator.services.mozilla.com/D4942
This commit is contained in:
parent
3e0250ae61
commit
6dcf9b7630
2 changed files with 22 additions and 3 deletions
|
@ -42,6 +42,7 @@ impl TransformOrigin {
|
|||
|
||||
/// computed value of matrix3d()
|
||||
pub type Matrix3D = generic::Matrix3D<Number>;
|
||||
|
||||
/// computed value of matrix()
|
||||
pub type Matrix = generic::Matrix<Number>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue