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
This commit is contained in:
Emilio Cobos Álvarez 2020-07-06 16:26:20 +00:00
parent 1f9d6ad5ef
commit 1c8d4be6b2

View file

@ -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;