mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
bug 1270916 - allow keeping AccTreeMutation in a list r=davidb
Soon we will use the list to track the order of the events.
This commit is contained in:
parent
fe3457276d
commit
9211a3aa51
@ -42,7 +42,23 @@ AccEvent::AccEvent(uint32_t aEventType, Accessible* aAccessible,
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// AccEvent cycle collection
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION(AccEvent, mAccessible)
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(AccEvent)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(AccEvent)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mAccessible)
|
||||
if (AccTreeMutationEvent* tmEvent = downcast_accEvent(tmp)) {
|
||||
tmEvent->SetNextEvent(nullptr);
|
||||
tmEvent->SetPrevEvent(nullptr);
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(AccEvent)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAccessible)
|
||||
if (AccTreeMutationEvent* tmEvent = downcast_accEvent(tmp)) {
|
||||
CycleCollectionNoteChild(cb, tmEvent->NextEvent(), "mNext");
|
||||
CycleCollectionNoteChild(cb, tmEvent->PrevEvent(), "mPrevEvent");
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AccEvent, AddRef)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AccEvent, Release)
|
||||
|
@ -219,6 +219,15 @@ public:
|
||||
{
|
||||
return AccEvent::GetEventGroups() | (1U << eTreeMutationEvent);
|
||||
}
|
||||
|
||||
void SetNextEvent(AccTreeMutationEvent* aNext) { mNextEvent = aNext; }
|
||||
void SetPrevEvent(AccTreeMutationEvent* aPrev) { mPrevEvent = aPrev; }
|
||||
AccTreeMutationEvent* NextEvent() const { return mNextEvent; }
|
||||
AccTreeMutationEvent* PrevEvent() const { return mPrevEvent; }
|
||||
|
||||
private:
|
||||
RefPtr<AccTreeMutationEvent> mNextEvent;
|
||||
RefPtr<AccTreeMutationEvent> mPrevEvent;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user