Allow cross interpolation between differing translate/scale functions

See ToPrimitive() in StyleAnimationValue.cpp
This commit is contained in:
Manish Goregaokar 2017-10-30 18:01:32 -07:00
parent f699b8cfb2
commit 9c9a181f35
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98
4 changed files with 12 additions and 3 deletions

View file

@ -1226,7 +1226,12 @@ impl Animate for ComputedTransformOperation {
fd_matrix.animate(&td_matrix, procedure)?,
))
},
// XXXManishearth handle crossover between translate and scale functions
(ref f, ref t) if f.is_translate() && t.is_translate() => {
f.to_translate_3d().animate(&t.to_translate_3d(), procedure)
}
(ref f, ref t) if f.is_scale() && t.is_scale() => {
f.to_scale_3d().animate(&t.to_scale_3d(), procedure)
}
_ => Err(()),
}
}