bug 1270916 - make TreeMutation track if it should be queueing events r=davidb a=jcristau
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Mon, 05 Sep 2016 14:52:12 -0400
changeset 352962 931cdea76fa290da66eadb072187f727f4f76564
parent 352961 40a2d26936006c5256ece3268a89f418500cd63e
child 352963 f195b9640e6d388912aa81eb65150b39e2b5dd1b
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb, jcristau
bugs1270916
milestone52.0a2
bug 1270916 - make TreeMutation track if it should be queueing events r=davidb a=jcristau Soon we will want to know if events should be emitted independt of EventTrees.
accessible/base/EventTree.cpp
accessible/base/EventTree.h
--- a/accessible/base/EventTree.cpp
+++ b/accessible/base/EventTree.cpp
@@ -20,17 +20,18 @@ using namespace mozilla::a11y;
 ////////////////////////////////////////////////////////////////////////////////
 // TreeMutation class
 
 EventTree* const TreeMutation::kNoEventTree = reinterpret_cast<EventTree*>(-1);
 
 TreeMutation::TreeMutation(Accessible* aParent, bool aNoEvents) :
   mParent(aParent), mStartIdx(UINT32_MAX),
   mStateFlagsCopy(mParent->mStateFlags),
-  mEventTree(aNoEvents ? kNoEventTree : nullptr)
+  mEventTree(aNoEvents ? kNoEventTree : nullptr),
+  mQueueEvents(!aNoEvents)
 {
 #ifdef DEBUG
   mIsDone = false;
 #endif
 
 #ifdef A11Y_LOG
   if (mEventTree != kNoEventTree && logging::IsEnabled(logging::eEventTree)) {
     logging::MsgBegin("EVENTS_TREE", "reordering tree before");
--- a/accessible/base/EventTree.h
+++ b/accessible/base/EventTree.h
@@ -44,16 +44,21 @@ private:
   static const char* PrefixLog(void* aData, Accessible*);
 #endif
 
   Accessible* mParent;
   uint32_t mStartIdx;
   uint32_t mStateFlagsCopy;
   EventTree* mEventTree;
 
+  /*
+   * True if mutation events should be queued.
+   */
+  bool mQueueEvents;
+
 #ifdef DEBUG
   bool mIsDone;
 #endif
 };
 
 
 /**
  * A mutation events coalescence structure.