Bug 1353628 - Part 3: Create PropertyAnimation for shorthands.

Therefore, we can start transitions on shorthand properties properly.

MozReview-Commit-ID: Ev2u2tEalnK
This commit is contained in:
Boris Chiou 2017-04-19 10:44:30 +08:00
parent 3a1421491b
commit 43f9f8ca95
2 changed files with 21 additions and 0 deletions

View file

@ -158,6 +158,16 @@ impl TransitionProperty {
_ => panic!("Not allowed to call longhands() for this TransitionProperty")
}
}
/// Returns true if this TransitionProperty is a shorthand.
pub fn is_shorthand(&self) -> bool {
match *self {
% for prop in data.shorthands_except_all():
TransitionProperty::${prop.camel_case} => true,
% endfor
_ => false
}
}
}
/// Returns true if this nsCSSPropertyID is one of the animatable properties.