mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
Make nscssproperty a method of longhand/shorthand/alias class.
This commit is contained in:
parent
2aee174b6d
commit
1599357cff
4 changed files with 22 additions and 30 deletions
|
@ -68,7 +68,7 @@ pub fn nscsspropertyid_is_animatable(property: nsCSSPropertyID) -> bool {
|
|||
match property {
|
||||
% for prop in data.longhands + data.shorthands_except_all():
|
||||
% if prop.animatable:
|
||||
${helpers.to_nscsspropertyid(prop.ident)} => true,
|
||||
${prop.nscsspropertyid()} => true,
|
||||
% endif
|
||||
% endfor
|
||||
_ => false
|
||||
|
@ -154,12 +154,12 @@ impl From<nsCSSPropertyID> for TransitionProperty {
|
|||
fn from(property: nsCSSPropertyID) -> TransitionProperty {
|
||||
match property {
|
||||
% for prop in data.longhands:
|
||||
${helpers.to_nscsspropertyid(prop.ident)} => {
|
||||
${prop.nscsspropertyid()} => {
|
||||
TransitionProperty::Longhand(LonghandId::${prop.camel_case})
|
||||
}
|
||||
% endfor
|
||||
% for prop in data.shorthands_except_all():
|
||||
${helpers.to_nscsspropertyid(prop.ident)} => {
|
||||
${prop.nscsspropertyid()} => {
|
||||
TransitionProperty::Shorthand(ShorthandId::${prop.camel_case})
|
||||
}
|
||||
% endfor
|
||||
|
@ -179,7 +179,7 @@ pub fn nscsspropertyid_is_transitionable(property: nsCSSPropertyID) -> bool {
|
|||
match property {
|
||||
% for prop in data.longhands + data.shorthands_except_all():
|
||||
% if prop.transitionable:
|
||||
${helpers.to_nscsspropertyid(prop.ident)} => true,
|
||||
${prop.nscsspropertyid()} => true,
|
||||
% endif
|
||||
% endfor
|
||||
_ => false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue