Bug 1328787 - Part 10: Set Keyframe.mPropertyValues for the case where keyframe is not specified. r=heycam

This commit is contained in:
Hiroyuki Ikezoe 2017-01-28 19:00:23 +09:00
parent aa6372d99d
commit 2bfa0f7a2d
3 changed files with 54 additions and 2 deletions

View file

@ -22,6 +22,7 @@ use properties::longhands::box_shadow::single_value::computed_value::T as BoxSha
use properties::longhands::vertical_align::computed_value::T as VerticalAlign;
use properties::longhands::visibility::computed_value::T as Visibility;
use properties::longhands::z_index::computed_value::T as ZIndex;
#[cfg(feature = "gecko")] use properties::{PropertyDeclarationId, LonghandId};
use std::cmp;
use std::fmt;
use style_traits::ToCss;
@ -121,6 +122,23 @@ impl From<TransitionProperty> for nsCSSPropertyID {
}
}
/// Convert to PropertyDeclarationId.
#[cfg(feature = "gecko")]
#[allow(non_upper_case_globals)]
impl<'a> From<TransitionProperty> for PropertyDeclarationId<'a> {
fn from(transition_property: TransitionProperty) -> PropertyDeclarationId<'a> {
match transition_property {
% for prop in data.longhands:
% if prop.animatable:
TransitionProperty::${prop.camel_case}
=> PropertyDeclarationId::Longhand(LonghandId::${prop.camel_case}),
% endif
% endfor
TransitionProperty::All => panic!(),
}
}
}
/// An animated property interpolation between two computed values for that
/// property.
#[derive(Clone, Debug, PartialEq)]