mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Remove nscsspropertyid_is_{animatable,transitionable}.
There are better ways, plus the existing code didn't handle aliases at all (not that it needed to, but it's better if it does). Differential Revision: https://phabricator.services.mozilla.com/D10838
This commit is contained in:
parent
707bd841a8
commit
8b49ef813f
3 changed files with 16 additions and 27 deletions
|
@ -50,20 +50,6 @@ use values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber, SVGPaint}
|
|||
use values::generics::svg::{SVGPaintKind, SVGStrokeDashArray, SVGOpacity};
|
||||
use void::{self, Void};
|
||||
|
||||
|
||||
/// Returns true if this nsCSSPropertyID is one of the animatable properties.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub fn nscsspropertyid_is_animatable(property: nsCSSPropertyID) -> bool {
|
||||
match property {
|
||||
% for prop in data.longhands + data.shorthands_except_all():
|
||||
% if prop.animatable:
|
||||
${prop.nscsspropertyid()} => true,
|
||||
% endif
|
||||
% endfor
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert nsCSSPropertyID to TransitionProperty
|
||||
#[cfg(feature = "gecko")]
|
||||
#[allow(non_upper_case_globals)]
|
||||
|
@ -90,19 +76,6 @@ impl From<nsCSSPropertyID> for TransitionProperty {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns true if this nsCSSPropertyID is one of the transitionable properties.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub fn nscsspropertyid_is_transitionable(property: nsCSSPropertyID) -> bool {
|
||||
match property {
|
||||
% for prop in data.longhands + data.shorthands_except_all():
|
||||
% if prop.transitionable:
|
||||
${prop.nscsspropertyid()} => true,
|
||||
% endif
|
||||
% endfor
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
||||
/// An animated property interpolation between two computed values for that
|
||||
/// property.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue