Auto merge of #18134 - servo:we-are-leaving-babylon, r=emilio

Introduce values::animated::Animate

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18134)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-22 07:22:10 -05:00 committed by GitHub
commit 8ca9542de6
23 changed files with 1160 additions and 1238 deletions

View file

@ -1410,15 +1410,15 @@ impl<'le> TElement for GeckoElement<'le> {
})
}
fn needs_transitions_update_per_property(&self,
property: &TransitionProperty,
combined_duration: f32,
before_change_style: &ComputedValues,
after_change_style: &ComputedValues,
existing_transitions: &HashMap<TransitionProperty,
Arc<AnimationValue>>)
-> bool {
use properties::animated_properties::Animatable;
fn needs_transitions_update_per_property(
&self,
property: &TransitionProperty,
combined_duration: f32,
before_change_style: &ComputedValues,
after_change_style: &ComputedValues,
existing_transitions: &HashMap<TransitionProperty, Arc<AnimationValue>>,
) -> bool {
use values::animated::{Animate, Procedure};
// |property| should be an animatable longhand
let animatable_longhand = AnimatableLonghand::from_transition_property(property).unwrap();
@ -1440,7 +1440,7 @@ impl<'le> TElement for GeckoElement<'le> {
combined_duration > 0.0f32 &&
from != to &&
from.interpolate(&to, 0.5).is_ok()
from.animate(&to, Procedure::Interpolate { progress: 0.5 }).is_ok()
}
#[inline]