mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Comments and minor fixes
This commit is contained in:
parent
123bc1d6de
commit
cb9645cd17
3 changed files with 13 additions and 6 deletions
|
@ -1438,6 +1438,8 @@ impl Animate for Matrix3D {
|
|||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
// Gecko doesn't exactly follow the spec here; we use a different procedure
|
||||
// to match it
|
||||
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
|
||||
let (from, to) = if self.is_3d() || other.is_3d() {
|
||||
(decompose_3d_matrix(*self), decompose_3d_matrix(*other))
|
||||
|
@ -1467,6 +1469,8 @@ impl Animate for Matrix {
|
|||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
// Gecko doesn't exactly follow the spec here; we use a different procedure
|
||||
// to match it
|
||||
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
|
||||
let from = decompose_2d_matrix(&(*self).into());
|
||||
let to = decompose_2d_matrix(&(*other).into());
|
||||
|
@ -2471,6 +2475,9 @@ impl ComputeSquaredDistance for ComputedTransformOperation {
|
|||
}
|
||||
p_matrix.compute_squared_distance(&m)
|
||||
}
|
||||
// Gecko cross-interpolates amongst all translate and all scale
|
||||
// functions (See ToPrimitive in layout/style/StyleAnimationValue.cpp)
|
||||
// without falling back to InterpolateMatrix
|
||||
_ if self.is_translate() && other.is_translate() => {
|
||||
self.to_translate_3d().compute_squared_distance(&other.to_translate_3d())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue