Bug 520710 followup: move nsSMILAnimationFunction's inline methods IsToAnimation/IsAdditive to header, to fix link error on some OSX systems. r=smaug

This commit is contained in:
Daniel Holbert 2009-10-25 12:22:29 -07:00
parent d5b8092f6f
commit 638007729b
2 changed files with 20 additions and 27 deletions

View File

@ -767,31 +767,6 @@ nsSMILAnimationFunction::GetValues(const nsISMILAttr& aSMILAttr,
return NS_OK;
}
inline PRBool
nsSMILAnimationFunction::IsToAnimation() const
{
return !HasAttr(nsGkAtoms::values) &&
HasAttr(nsGkAtoms::to) &&
!HasAttr(nsGkAtoms::from);
}
inline PRBool
nsSMILAnimationFunction::IsAdditive() const
{
/*
* Animation is additive if:
*
* (1) additive = "sum" (GetAdditive() == true), or
* (2) it is 'by animation' (by is set, from and values are not)
*
* Although animation is not additive if it is 'to animation'
*/
PRBool isByAnimation = (!HasAttr(nsGkAtoms::values)
&& HasAttr(nsGkAtoms::by)
&& !HasAttr(nsGkAtoms::from));
return !IsToAnimation() && (GetAdditive() || isByAnimation);
}
/**
* Performs checks for the keyTimes attribute required by the SMIL spec but
* which depend on other attributes and therefore needs to be updated as

View File

@ -292,11 +292,29 @@ protected:
nsresult GetValues(const nsISMILAttr& aSMILAttr,
nsSMILValueArray& aResult);
void UpdateValuesArray();
PRBool IsToAnimation() const;
PRBool IsAdditive() const;
void CheckKeyTimes(PRUint32 aNumValues);
void CheckKeySplines(PRUint32 aNumValues);
inline PRBool IsToAnimation() const {
return !HasAttr(nsGkAtoms::values) &&
HasAttr(nsGkAtoms::to) &&
!HasAttr(nsGkAtoms::from);
}
inline PRBool IsAdditive() const {
/*
* Animation is additive if:
*
* (1) additive = "sum" (GetAdditive() == true), or
* (2) it is 'by animation' (by is set, from and values are not)
*
* Although animation is not additive if it is 'to animation'
*/
PRBool isByAnimation = (!HasAttr(nsGkAtoms::values) &&
HasAttr(nsGkAtoms::by) &&
!HasAttr(nsGkAtoms::from));
return !IsToAnimation() && (GetAdditive() || isByAnimation);
}
// Members
// -------