bug 1270916 - make TreeMutation track if it should be queueing events r=davidb
☠☠ backed out by eec10be4f099 ☠ ☠
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Mon, 05 Sep 2016 14:52:12 -0400
changeset 322680 9b27e6ae9481f3da6b097eeb2e8c758e60c47a56
parent 322679 10d579e5dec1099b3c7016c7b03e9199acf9c1f0
child 322681 b2694ad14de7b59cb20d921fde4686178f60cd7b
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 - make TreeMutation track if it should be queueing events r=davidb 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 we should queue mutation events.
+   */
+  bool mQueueEvents;
+
 #ifdef DEBUG
   bool mIsDone;
 #endif
 };
 
 
 /**
  * A mutation events coalescence structure.