The check was introduced in bug 1245260 in the era before stylo was implemented to avoid redandunt multiple animation restyling on an element. With stylo, we never restyle the same element more than twice, so it's fine to increment the animation generation while processing pending styles. NOTE: In this bug case IncrementAnimationGeneration gets called in between the first animation restyling phase and the second normal restyling phase. Differential Revision: https://phabricator.services.mozilla.com/D245504