bug 1270916 - allow tracking when a mutation event was fired relative to other mutation events r=davidb
☠☠ backed out by 3dc4cf076e29 ☠ ☠
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Thu, 10 Nov 2016 14:44:20 -0500
changeset 322835 b2694ad14de7b59cb20d921fde4686178f60cd7b
parent 322834 9b27e6ae9481f3da6b097eeb2e8c758e60c47a56
child 322836 074b41be0f3eb037c3bbfbe33f7512a996c5c3f5
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +0000
reviewersdavidb
bugs1270916
milestone53.0a1
bug 1270916 - allow tracking when a mutation event was fired relative to other mutation events r=davidb
accessible/base/AccEvent.h
--- a/accessible/base/AccEvent.h
+++ b/accessible/base/AccEvent.h
@@ -206,33 +206,40 @@ private:
 /**
  * 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) {}
+    AccEvent(aEventType, aTarget, eAutoDetect, eCoalesceReorder), mGeneration(0) {}
 
   // Event
   static const EventGroup kEventGroup = eTreeMutationEvent;
   virtual unsigned int GetEventGroups() const override
   {
     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; }
 
+  /**
+   * A sequence number to know when this event was fired.
+   */
+  uint32_t EventGeneration() const { return mGeneration; }
+  void SetEventGeneration(uint32_t aGeneration) { mGeneration = aGeneration; }
+
 private:
   RefPtr<AccTreeMutationEvent> mNextEvent;
   RefPtr<AccTreeMutationEvent> mPrevEvent;
+  uint32_t mGeneration;
 };
 
 /**
  * Base class for show and hide accessible events.
  */
 class AccMutationEvent: public AccTreeMutationEvent
 {
 public: