Bug 1420928 - Check each animation sub property count in animations_equals. r?boris
In a subsequent patch, we will no longer fill out deficient property values in
mAnimations.
MozReview-Commit-ID: 7O1JjEZ2eDH
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -3385,17 +3385,25 @@ fn static_assert() {
pub fn reset_transition_property(&mut self, other: &Self) {
self.copy_transition_property_from(other)
}
${impl_transition_count('property', 'Property')}
pub fn animations_equals(&self, other: &Self) -> bool {
- unsafe { bindings::Gecko_StyleAnimationsEquals(&self.gecko.mAnimations, &other.gecko.mAnimations) }
+ return self.gecko.mAnimationNameCount == other.gecko.mAnimationNameCount
+ && self.gecko.mAnimationDelayCount == other.gecko.mAnimationDelayCount
+ && self.gecko.mAnimationDirectionCount == other.gecko.mAnimationDirectionCount
+ && self.gecko.mAnimationDurationCount == other.gecko.mAnimationDurationCount
+ && self.gecko.mAnimationFillModeCount == other.gecko.mAnimationFillModeCount
+ && self.gecko.mAnimationIterationCountCount == other.gecko.mAnimationIterationCountCount
+ && self.gecko.mAnimationPlayStateCount == other.gecko.mAnimationPlayStateCount
+ && self.gecko.mAnimationTimingFunctionCount == other.gecko.mAnimationTimingFunctionCount
+ && unsafe { bindings::Gecko_StyleAnimationsEquals(&self.gecko.mAnimations, &other.gecko.mAnimations) }
}
pub fn set_animation_name<I>(&mut self, v: I)
where I: IntoIterator<Item = longhands::animation_name::computed_value::single_value::T>,
I::IntoIter: ExactSizeIterator
{
let v = v.into_iter();
debug_assert!(v.len() != 0);