mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Pass transition-property into gecko's struct.
This commit is contained in:
parent
3616e4240f
commit
16cba0876d
2 changed files with 55 additions and 4 deletions
|
@ -127,6 +127,24 @@ impl From<TransitionProperty> for nsCSSPropertyID {
|
|||
}
|
||||
}
|
||||
|
||||
/// Convert nsCSSPropertyID to TransitionProperty
|
||||
#[cfg(feature = "gecko")]
|
||||
#[allow(non_upper_case_globals)]
|
||||
impl From<nsCSSPropertyID> for TransitionProperty {
|
||||
fn from(property: nsCSSPropertyID) -> TransitionProperty {
|
||||
match property {
|
||||
% for prop in data.longhands:
|
||||
% if prop.animatable:
|
||||
${helpers.to_nscsspropertyid(prop.ident)}
|
||||
=> TransitionProperty::${prop.camel_case},
|
||||
% endif
|
||||
% endfor
|
||||
nsCSSPropertyID::eCSSPropertyExtra_all_properties => TransitionProperty::All,
|
||||
_ => panic!("Unsupported Servo transition property: {:?}", property),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert to PropertyDeclarationId.
|
||||
#[cfg(feature = "gecko")]
|
||||
#[allow(non_upper_case_globals)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue