mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
stylo: Preserve the variant of rotate() values in computed transforms
MozReview-Commit-ID: Dmw7P21I6FN
This commit is contained in:
parent
e74d04c040
commit
06300999e9
4 changed files with 39 additions and 3 deletions
|
@ -80,6 +80,18 @@ impl TransformList {
|
|||
|
||||
for operation in list {
|
||||
let matrix = match *operation {
|
||||
ComputedOperation::RotateX(theta) => {
|
||||
let theta = Angle::from_radians(2.0f32 * f32::consts::PI - theta.radians());
|
||||
Transform3D::create_rotation(1., 0., 0., theta.into())
|
||||
}
|
||||
ComputedOperation::RotateY(theta) => {
|
||||
let theta = Angle::from_radians(2.0f32 * f32::consts::PI - theta.radians());
|
||||
Transform3D::create_rotation(0., 1., 0., theta.into())
|
||||
}
|
||||
ComputedOperation::RotateZ(theta) => {
|
||||
let theta = Angle::from_radians(2.0f32 * f32::consts::PI - theta.radians());
|
||||
Transform3D::create_rotation(0., 0., 1., theta.into())
|
||||
}
|
||||
ComputedOperation::Rotate(ax, ay, az, theta) => {
|
||||
let theta = Angle::from_radians(2.0f32 * f32::consts::PI - theta.radians());
|
||||
let (ax, ay, az, theta) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue