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 322681 b2694ad14de7b59cb20d921fde4686178f60cd7b
parent 322680 9b27e6ae9481f3da6b097eeb2e8c758e60c47a56
child 322682 074b41be0f3eb037c3bbfbe33f7512a996c5c3f5
push id83956
push usertsaunders@mozilla.com
push dateWed, 16 Nov 2016 06:08:31 +0000
treeherdermozilla-inbound@fb3cad552a5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1270916
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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: