Implement moz-transform property

This commit is contained in:
Nazım Can Altınova 2017-04-07 23:49:18 +03:00
parent 67799f9445
commit f9225d84aa
No known key found for this signature in database
GPG key ID: AF9BCD7CE6449954
7 changed files with 320 additions and 46 deletions

View file

@ -1127,6 +1127,7 @@ fn build_identity_transform_list(list: &[TransformOperation]) -> Vec<TransformOp
let identity = ComputedMatrix::identity();
result.push(TransformOperation::Matrix(identity));
}
TransformOperation::MatrixWithPercents(..) => {}
TransformOperation::Skew(..) => {
result.push(TransformOperation::Skew(Angle::zero(), Angle::zero()))
}
@ -1167,6 +1168,12 @@ fn interpolate_transform_list(from_list: &[TransformOperation],
let interpolated = from.interpolate(&_to, progress).unwrap();
result.push(TransformOperation::Matrix(interpolated));
}
(&TransformOperation::MatrixWithPercents(_),
&TransformOperation::MatrixWithPercents(_)) => {
// We don't interpolate `-moz-transform` matrices yet.
// They contain percentage values.
{}
}
(&TransformOperation::Skew(fx, fy),
&TransformOperation::Skew(tx, ty)) => {
let ix = fx.interpolate(&tx, progress).unwrap();