Bug 1353628 - Part 1: Add shorthand properties into TransitionProperty.

In order to make TransitionProperty::parse() also work on shorthands, we
should add shorthands into TransitionProperty, and add the arms in other
functions which match TransitionProperty.

MozReview-Commit-ID: KFd26KcQf3N
This commit is contained in:
Boris Chiou 2017-04-14 14:56:04 +08:00
parent 56435db820
commit a06ce4a6aa
3 changed files with 61 additions and 11 deletions

View file

@ -257,7 +257,7 @@ impl LonghandIdSet {
TransitionProperty::${prop.camel_case} => self.insert(LonghandId::${prop.camel_case}),
% endif
% endfor
TransitionProperty::All => unreachable!("Tried to set TransitionProperty::All in a PropertyBitfield"),
other => unreachable!("Tried to set TransitionProperty::{:?} in a PropertyBitfield", other),
}
}
@ -270,7 +270,7 @@ impl LonghandIdSet {
TransitionProperty::${prop.camel_case} => self.contains(LonghandId::${prop.camel_case}),
% endif
% endfor
TransitionProperty::All => unreachable!("Tried to get TransitionProperty::All in a PropertyBitfield"),
other => unreachable!("Tried to get TransitionProperty::{:?} in a PropertyBitfield", other),
}
}
}