style: More useful logging for transition-related stuff.

Transitions are still broken, but I found these messages more helpful than the
previous ones when diagnosing problems.
This commit is contained in:
Emilio Cobos Álvarez 2018-05-06 18:45:16 +02:00
parent a949e9e1e8
commit 561e9c81f1
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 32 additions and 32 deletions

View file

@ -127,17 +127,22 @@ pub enum AnimatedProperty {
}
impl AnimatedProperty {
/// Get the name of this property.
pub fn name(&self) -> &'static str {
/// Get the id of the property we're animating.
pub fn id(&self) -> LonghandId {
match *self {
% for prop in data.longhands:
% if prop.animatable and not prop.logical:
AnimatedProperty::${prop.camel_case}(..) => "${prop.name}",
% endif
% if prop.animatable and not prop.logical:
AnimatedProperty::${prop.camel_case}(..) => LonghandId::${prop.camel_case},
% endif
% endfor
}
}
/// Get the name of this property.
pub fn name(&self) -> &'static str {
self.id().name()
}
/// Whether this interpolation does animate, that is, whether the start and
/// end values are different.
pub fn does_animate(&self) -> bool {