Bug 1194037 part 5 - Make AnimationProperty::operator== ignore mWinsInCascade; r=heycam

This commit is contained in:
Brian Birtles 2015-09-10 14:03:46 +09:00
parent 5ad1091be6
commit 89ee1f892f

View File

@ -168,13 +168,20 @@ struct AnimationProperty
// **NOTE**: For CSS animations, we only bother setting mWinsInCascade
// accurately for properties that we can animate on the compositor.
// For other properties, we make it always be true.
// **NOTE 2**: This member is not included when comparing AnimationProperty
// objects for equality.
bool mWinsInCascade;
InfallibleTArray<AnimationPropertySegment> mSegments;
// NOTE: This operator does *not* compare the mWinsInCascade member.
// This is because AnimationProperty objects are compared when recreating
// CSS animations to determine if mutation observer change records need to
// be created or not. However, at the point when these objects are compared
// the mWinsInCascade will not have been set on the new objects so we ignore
// this member to avoid generating spurious change records.
bool operator==(const AnimationProperty& aOther) const {
return mProperty == aOther.mProperty &&
mWinsInCascade == aOther.mWinsInCascade &&
mSegments == aOther.mSegments;
}
bool operator!=(const AnimationProperty& aOther) const {