bug 1270916 - add a common base class of AccMutationEvent and AccReorderEvent r=davidb

Soon we will want to operate on either a reorder event or a mutation event.
This commit is contained in:
Trevor Saunders 2016-09-02 15:36:22 -04:00
Родитель 3fa4f2d492
Коммит 001e173dfa
1 изменённых файлов: 14 добавлений и 5 удалений

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

@ -202,15 +202,25 @@ private:
friend class EventTree;
};
/**
* A base class for events related to tree mutation, either an AccMutation
* event, or an AccReorderEvent.
*/
class AccTreeMutationEvent : public AccEvent
{
public:
AccTreeMutationEvent(uint32_t aEventType, Accessible* aTarget) :
AccEvent(aEventType, aTarget, eAutoDetect, eCoalesceReorder) {}
};
/**
* Base class for show and hide accessible events.
*/
class AccMutationEvent: public AccEvent
class AccMutationEvent: public AccTreeMutationEvent
{
public:
AccMutationEvent(uint32_t aEventType, Accessible* aTarget) :
AccEvent(aEventType, aTarget, eAutoDetect, eCoalesceReorder)
AccTreeMutationEvent(aEventType, aTarget)
{
// Don't coalesce these since they are coalesced by reorder event. Coalesce
// contained text change events.
@ -298,12 +308,11 @@ private:
/**
* Class for reorder accessible event. Takes care about
*/
class AccReorderEvent : public AccEvent
class AccReorderEvent : public AccTreeMutationEvent
{
public:
explicit AccReorderEvent(Accessible* aTarget) :
AccEvent(::nsIAccessibleEvent::EVENT_REORDER, aTarget,
eAutoDetect, eCoalesceReorder) { }
AccTreeMutationEvent(::nsIAccessibleEvent::EVENT_REORDER, aTarget) { }
virtual ~AccReorderEvent() { }
// Event