bug 1270916 - allow downcasting AccEvent to AccTreeMutationEvent r=davidb

This commit is contained in:
Trevor Saunders 2016-09-02 19:08:52 -04:00
Родитель 989676f381
Коммит fe3457276d
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -94,6 +94,7 @@ public:
eGenericEvent,
eStateChangeEvent,
eTextChangeEvent,
eTreeMutationEvent,
eMutationEvent,
eReorderEvent,
eHideEvent,
@ -211,6 +212,13 @@ class AccTreeMutationEvent : public AccEvent
public:
AccTreeMutationEvent(uint32_t aEventType, Accessible* aTarget) :
AccEvent(aEventType, aTarget, eAutoDetect, eCoalesceReorder) {}
// Event
static const EventGroup kEventGroup = eTreeMutationEvent;
virtual unsigned int GetEventGroups() const override
{
return AccEvent::GetEventGroups() | (1U << eTreeMutationEvent);
}
};
/**
@ -232,7 +240,7 @@ public:
static const EventGroup kEventGroup = eMutationEvent;
virtual unsigned int GetEventGroups() const override
{
return AccEvent::GetEventGroups() | (1U << eMutationEvent);
return AccTreeMutationEvent::GetEventGroups() | (1U << eMutationEvent);
}
// MutationEvent
@ -319,7 +327,7 @@ public:
static const EventGroup kEventGroup = eReorderEvent;
virtual unsigned int GetEventGroups() const override
{
return AccEvent::GetEventGroups() | (1U << eReorderEvent);
return AccTreeMutationEvent::GetEventGroups() | (1U << eReorderEvent);
}
};