зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1214536 - Part 6: Revise AnimationTiming::operator==. r=birtles
This commit is contained in:
Родитель
fa79443f12
Коммит
d03ac9c993
|
@ -17,14 +17,11 @@ AnimationTiming::operator==(const AnimationTiming& aOther) const
|
|||
durationEqual = aOther.mDuration.IsUnrestrictedDouble() &&
|
||||
(mDuration.GetAsUnrestrictedDouble() ==
|
||||
aOther.mDuration.GetAsUnrestrictedDouble());
|
||||
} else if (mDuration.IsString()) {
|
||||
durationEqual = aOther.mDuration.IsString() &&
|
||||
(mDuration.GetAsString() ==
|
||||
aOther.mDuration.GetAsString());
|
||||
} else {
|
||||
// Check if both are uninitialized
|
||||
durationEqual = !aOther.mDuration.IsUnrestrictedDouble() &&
|
||||
!aOther.mDuration.IsString();
|
||||
// We consider all string values and uninitialized values as meaning "auto".
|
||||
// Since mDuration is either a string or uninitialized, we consider it equal
|
||||
// if aOther.mDuration is also either a string or uninitialized.
|
||||
durationEqual = !aOther.mDuration.IsUnrestrictedDouble();
|
||||
}
|
||||
return durationEqual &&
|
||||
mDelay == aOther.mDelay &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче