style: Derive ToComputedValue for TransitionProperty.

This commit is contained in:
Emilio Cobos Álvarez 2017-09-09 13:31:46 +02:00
parent 84f3073402
commit b94dd4885d
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -46,7 +46,7 @@ use values::animated::effects::Filter as AnimatedFilter;
use values::animated::effects::FilterList as AnimatedFilterList;
use values::animated::effects::TextShadowList as AnimatedTextShadowList;
use values::computed::{Angle, BorderCornerRadius, CalcLengthOrPercentage};
use values::computed::{ClipRect, Context, ComputedUrl, ComputedValueAsSpecified};
use values::computed::{ClipRect, Context, ComputedUrl};
use values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
use values::computed::{LengthOrPercentageOrNone, MaxLength, NonNegativeAu};
use values::computed::{NonNegativeNumber, Number, NumberOrPercentage, Percentage};
@ -203,7 +203,7 @@ pub fn nscsspropertyid_is_animatable(property: nsCSSPropertyID) -> bool {
// NB: This needs to be here because it needs all the longhands generated
// beforehand.
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Debug, Eq, Hash, PartialEq, ToCss)]
#[derive(Clone, Debug, Eq, Hash, PartialEq, ToCss, ToComputedValue)]
pub enum TransitionProperty {
/// All, any transitionable property changing should generate a transition.
All,
@ -218,9 +218,6 @@ pub enum TransitionProperty {
Unsupported(CustomIdent)
}
impl ComputedValueAsSpecified for TransitionProperty {}
impl TransitionProperty {
/// Iterates over each longhand property.
pub fn each<F: FnMut(&TransitionProperty) -> ()>(mut cb: F) {