Bug 1214536 - Part 6: Revise AnimationTiming::operator==. r=birtles

This commit is contained in:
Boris Chiou 2016-01-13 18:38:00 +01:00
Родитель fa79443f12
Коммит d03ac9c993
1 изменённых файлов: 4 добавлений и 7 удалений

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

@ -17,14 +17,11 @@ AnimationTiming::operator==(const AnimationTiming& aOther) const
durationEqual = aOther.mDuration.IsUnrestrictedDouble() && durationEqual = aOther.mDuration.IsUnrestrictedDouble() &&
(mDuration.GetAsUnrestrictedDouble() == (mDuration.GetAsUnrestrictedDouble() ==
aOther.mDuration.GetAsUnrestrictedDouble()); aOther.mDuration.GetAsUnrestrictedDouble());
} else if (mDuration.IsString()) {
durationEqual = aOther.mDuration.IsString() &&
(mDuration.GetAsString() ==
aOther.mDuration.GetAsString());
} else { } else {
// Check if both are uninitialized // We consider all string values and uninitialized values as meaning "auto".
durationEqual = !aOther.mDuration.IsUnrestrictedDouble() && // Since mDuration is either a string or uninitialized, we consider it equal
!aOther.mDuration.IsString(); // if aOther.mDuration is also either a string or uninitialized.
durationEqual = !aOther.mDuration.IsUnrestrictedDouble();
} }
return durationEqual && return durationEqual &&
mDelay == aOther.mDelay && mDelay == aOther.mDelay &&