mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
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:
parent
d5b8092f6f
commit
638007729b
@ -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
|
||||
|
@ -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
|
||||
// -------
|
||||
|
Loading…
Reference in New Issue
Block a user