mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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.
This commit is contained in:
parent
f11fcebd9c
commit
d524601cf5
6 changed files with 133 additions and 13 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue