mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement moz-transform property
This commit is contained in:
parent
67799f9445
commit
f9225d84aa
7 changed files with 320 additions and 46 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue