зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
8fa3c30672
Коммит
93993116da
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче