mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Move Animatable::get_zero_value to ToAnimatedZero::to_animated_zero
This commit is contained in:
parent
99592cc3d1
commit
98bf832169
13 changed files with 293 additions and 127 deletions
|
@ -129,6 +129,8 @@
|
|||
|
||||
% if animation_value_type == "ComputedValue":
|
||||
use properties::animated_properties::Animatable;
|
||||
use values::animated::ToAnimatedZero;
|
||||
|
||||
impl Animatable for T {
|
||||
fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64)
|
||||
-> Result<Self, ()> {
|
||||
|
@ -149,6 +151,11 @@
|
|||
self.0.compute_squared_distance(&other.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl ToAnimatedZero for T {
|
||||
#[inline]
|
||||
fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
|
||||
}
|
||||
% endif
|
||||
|
||||
pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue