mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1064842 - Add ImplCycleCollectionTraverse/Unlink implementations for nsSMILTimedElement so that SVGAnimationElement can use the shorter NS_IMPL_CYCLE_COLLECTION_INHERITED macro. r=roc
This commit is contained in:
parent
f765e8e0ff
commit
75b8bea4c8
@ -25,20 +25,9 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimationElement)
|
||||
NS_INTERFACE_MAP_ENTRY(mozilla::dom::SVGTests)
|
||||
NS_INTERFACE_MAP_END_INHERITING(SVGAnimationElementBase)
|
||||
|
||||
// Cycle collection magic -- based on nsSVGUseElement
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(SVGAnimationElement)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(SVGAnimationElement,
|
||||
SVGAnimationElementBase)
|
||||
tmp->mHrefTarget.Unlink();
|
||||
tmp->mTimedElement.Unlink();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SVGAnimationElement,
|
||||
SVGAnimationElementBase)
|
||||
tmp->mHrefTarget.Traverse(&cb);
|
||||
tmp->mTimedElement.Traverse(&cb);
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(SVGAnimationElement,
|
||||
SVGAnimationElementBase,
|
||||
mHrefTarget, mTimedElement)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Implementation
|
||||
|
@ -661,4 +661,19 @@ protected:
|
||||
static const uint8_t sMaxUpdateIntervalRecursionDepth;
|
||||
};
|
||||
|
||||
inline void
|
||||
ImplCycleCollectionUnlink(nsSMILTimedElement& aField)
|
||||
{
|
||||
aField.Unlink();
|
||||
}
|
||||
|
||||
inline void
|
||||
ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback,
|
||||
nsSMILTimedElement& aField,
|
||||
const char* aName,
|
||||
uint32_t aFlags = 0)
|
||||
{
|
||||
aField.Traverse(&aCallback);
|
||||
}
|
||||
|
||||
#endif // NS_SMILTIMEDELEMENT_H_
|
||||
|
Loading…
Reference in New Issue
Block a user