stylo: Preserve the variant of rotate() values in computed transforms

MozReview-Commit-ID: Dmw7P21I6FN
This commit is contained in:
Manish Goregaokar 2017-09-11 17:16:07 -07:00 committed by Manish Goregaokar
parent e74d04c040
commit 06300999e9
4 changed files with 39 additions and 3 deletions

View file

@ -1163,6 +1163,9 @@ impl ToAnimatedZero for TransformOperation {
TransformOperation::ScaleX(_) => Ok(TransformOperation::ScaleX(1.)),
TransformOperation::ScaleY(_) => Ok(TransformOperation::ScaleY(1.)),
TransformOperation::ScaleZ(_) => Ok(TransformOperation::ScaleZ(1.)),
TransformOperation::RotateX(_) => Ok(TransformOperation::RotateX(Angle::zero())),
TransformOperation::RotateY(_) => Ok(TransformOperation::RotateY(Angle::zero())),
TransformOperation::RotateZ(_) => Ok(TransformOperation::RotateZ(Angle::zero())),
TransformOperation::Rotate(x, y, z, a) => {
let (x, y, z, _) = TransformList::get_normalized_vector_and_angle(x, y, z, a);
Ok(TransformOperation::Rotate(x, y, z, Angle::zero()))