Treat animation-iteration-count:0 specially. (Bug 765218) r=bzbarsky

This commit is contained in:
L. David Baron 2012-06-21 11:44:34 -07:00
Родитель b118cfe2c6
Коммит 477e40be2b
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -213,10 +213,10 @@ ElementAnimations::EnsureStyleRuleFor(TimeStamp aRefreshTime,
// the keyframes.
NS_ABORT_IF_FALSE(currentIterationCount >= 0.0, "must be positive");
PRUint32 whichIteration = int(currentIterationCount);
if (whichIteration == anim.mIterationCount) {
if (whichIteration == anim.mIterationCount && whichIteration != 0) {
// When the animation's iteration count is an integer (as it
// normally is), we need to end at 100% of its last iteration
// rather than 0% of the next one.
// rather than 0% of the next one (unless it's zero).
--whichIteration;
}
double positionInIteration =