Bug 1311257 - Make TransitionProperty::from_declaration() convert PropertyDeclaration::{CSSWideKeyword,WithVariables} as well. r?heycam
MozReview-Commit-ID: G5pk50Rh4Ls
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -83,16 +83,28 @@ impl TransitionProperty {
pub fn from_declaration(declaration: &PropertyDeclaration) -> Option<Self> {
match *declaration {
% for prop in data.longhands:
% if prop.animatable:
PropertyDeclaration::${prop.camel_case}(..)
=> Some(TransitionProperty::${prop.camel_case}),
% endif
% endfor
+ PropertyDeclaration::CSSWideKeyword(id, _) |
+ PropertyDeclaration::WithVariables(id, _) => {
+ match id {
+ % for prop in data.longhands:
+ % if prop.animatable:
+ LonghandId::${prop.camel_case} =>
+ Some(TransitionProperty::${prop.camel_case}),
+ % endif
+ % endfor
+ _ => None,
+ }
+ },
_ => None,
}
}
}
impl ToCss for TransitionProperty {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result
where W: fmt::Write,