Make transition_combined_duration_at consider duration and delay value are used by repeating the list of values if the given index is greater than the list length

This commit is contained in:
Hiroyuki Ikezoe 2018-01-04 19:12:45 +09:00
parent 782e3fe4e4
commit 18a99e50d8

View file

@ -3298,7 +3298,8 @@ fn static_assert() {
pub fn transition_combined_duration_at(&self, index: usize) -> f32 {
// https://drafts.csswg.org/css-transitions/#transition-combined-duration
self.gecko.mTransitions[index].mDuration.max(0.0) + self.gecko.mTransitions[index].mDelay
self.gecko.mTransitions[index % self.gecko.mTransitionDurationCount as usize].mDuration.max(0.0)
+ self.gecko.mTransitions[index % self.gecko.mTransitionDelayCount as usize].mDelay
}
pub fn set_transition_property<I>(&mut self, v: I)