зеркало из 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() &&
|
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 &&
|
||||||
|
|
Загрузка…
Ссылка в новой задаче