diff options
author | Jinwoo Song <jinwoo7.song@samsung.com> | 2015-06-01 11:35:14 +0900 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-09-12 01:06:35 +0200 |
commit | d524601cf58f51cd04df908e672a539665ad751b (patch) | |
tree | b50a812b0fc6aa2d9440c9411c8eafe0bb38b0fe /components/style/animation.rs | |
parent | f11fcebd9ca460a2eb7ccbdd0c510e8904f36249 (diff) | |
download | servo-d524601cf58f51cd04df908e672a539665ad751b.tar.gz servo-d524601cf58f51cd04df908e672a539665ad751b.zip |
CSS 'transformation: skew()' should take <angle> type as parameters
Current implementation is taking <number> type as parameter so skew()
does not work properly. Let the skew() to get <angle> as specification
described.
Fixes #6237.
Diffstat (limited to 'components/style/animation.rs')
-rw-r--r-- | components/style/animation.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/components/style/animation.rs b/components/style/animation.rs index 34043e47a98..247ceb6b2a5 100644 --- a/components/style/animation.rs +++ b/components/style/animation.rs @@ -415,6 +415,13 @@ impl Interpolate for i32 { } } +impl Interpolate for Angle { + #[inline] + fn interpolate(&self, other: &Angle, time: f64) -> Option<Angle> { + self.radians().interpolate(&other.radians(), time).map(Angle) + } +} + impl Interpolate for Visibility { #[inline] fn interpolate(&self, other: &Visibility, time: f64) @@ -804,7 +811,7 @@ fn build_identity_transform_list(list: &Vec<TransformOperation>) -> Vec<Transfor result.push(TransformOperation::Matrix(identity)); } TransformOperation::Skew(..) => { - result.push(TransformOperation::Skew(0.0, 0.0)); + result.push(TransformOperation::Skew(Angle(0.0), Angle(0.0))); } TransformOperation::Translate(..) => { result.push(TransformOperation::Translate(LengthOrPercentage::zero(), |