Bug 1278294 - add tree logging for single content insertion, part5, r=yzen
authorAlexander Surkov <surkov.alexander@gmail.com>
Wed, 08 Jun 2016 13:51:47 -0400
changeset 301117 e9cd625ccf89aafd0c9fa5ac292160c43587c55b
parent 301116 0d08f7065337aa6f6ae5ddc9b0fe91a1f3dcbebb
child 301118 3952362ddc5b7be149606f313c4937bcf52498eb
push id78216
push usersurkov.alexander@gmail.com
push dateWed, 08 Jun 2016 17:52:05 +0000
treeherdermozilla-inbound@e9cd625ccf89 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyzen
bugs1278294
milestone50.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 1278294 - add tree logging for single content insertion, part5, r=yzen
accessible/generic/DocAccessible.cpp
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -1809,16 +1809,25 @@ DocAccessible::ProcessContentInserted(Ac
 
 void
 DocAccessible::ProcessContentInserted(Accessible* aContainer, nsIContent* aNode)
 {
   if (!aContainer->IsInDocument()) {
     return;
   }
 
+#ifdef A11Y_LOG
+  logging::TreeInfo("children before insertion", logging::eVerbose, aContainer);
+#endif
+
+#ifdef A11Y_LOG
+  logging::TreeInfo("traversing an inserted node", logging::eVerbose,
+                    "container", aContainer, "node", aNode);
+#endif
+
   TreeWalker walker(aContainer);
   if (aContainer->IsAcceptableChild(aNode) && walker.Seek(aNode)) {
     Accessible* child = GetAccessible(aNode);
     if (!child) {
       child = GetAccService()->CreateAccessible(aNode, aContainer);
     }
 
     if (child) {
@@ -1826,16 +1835,20 @@ DocAccessible::ProcessContentInserted(Ac
       aContainer->InsertAfter(child, walker.Prev());
       mt.AfterInsertion(child);
       mt.Done();
 
       CreateSubtree(child);
       FireEventsOnInsertion(aContainer);
     }
   }
+
+#ifdef A11Y_LOG
+  logging::TreeInfo("children after insertion", logging::eVerbose, aContainer);
+#endif
 }
 
 void
 DocAccessible::FireEventsOnInsertion(Accessible* aContainer)
 {
   // Check to see if change occurred inside an alert, and fire an EVENT_ALERT
   // if it did.
   if (aContainer->IsAlert() || aContainer->IsInsideAlert()) {