From 1c8d4be6b22796cb5b35e1f10ff52803ad0f6a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 6 Jul 2020 16:26:20 +0000 Subject: [PATCH] style: Fix an off-by-one in the transition property iterator. By the time we get to iterate over the longhands of a shorthand, we've already advanced the range iterator, so we look at the next duration and such, which causes this bug. I'm seriously baffled that no existing test caught this when it landed, neither in our internal test suite nor wpt... :/ Differential Revision: https://phabricator.services.mozilla.com/D82396 --- components/style/properties/helpers/animated_properties.mako.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index 304f026deda..f2fc745c57b 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -820,7 +820,7 @@ impl<'a> Iterator for TransitionPropertyIterator<'a> { if let Some(longhand_id) = longhand_iterator.next() { return Some(TransitionPropertyIteration { longhand_id, - index: self.index_range.start, + index: self.index_range.start - 1, }); } self.longhand_iterator = None;