style: Properly track whether <angle> or <time> values came from calc() expressions.

This commit is contained in:
Emilio Cobos Álvarez 2017-03-27 01:45:22 +02:00
parent c654c05884
commit fc72f096a0
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
10 changed files with 281 additions and 90 deletions

View file

@ -343,7 +343,7 @@ impl PropertyAnimation {
#[inline]
fn does_animate(&self) -> bool {
self.property.does_animate() && self.duration != Time(0.0)
self.property.does_animate() && self.duration.seconds() != 0.0
}
/// Whether this animation has the same end value as another one.
@ -681,7 +681,7 @@ pub fn update_style_for_animation(context: &SharedStyleContext,
transition_property, name);
match PropertyAnimation::from_transition_property(*transition_property,
timing_function,
Time(relative_duration as f32),
Time::from_seconds(relative_duration as f32),
&from_style,
&target_style) {
Some(property_animation) => {