Bug 1278294 - UpdateTreeOnRemoval should use logging::TreeInfo, part2, r=yzen
authorAlexander Surkov <surkov.alexander@gmail.com>
Wed, 08 Jun 2016 07:33:06 -0400
changeset 301070 1a4ecd8c393b2239e959742925f70ceb3ef165a6
parent 301069 f22cca9ad502563f7e15a5a44c4bf9d04ad2e87f
child 301071 fcc0cc7b8310f9487c8c1c9e1d9f65a297ba42b9
push id30325
push userkwierso@gmail.com
push dateWed, 08 Jun 2016 23:17:01 +0000
treeherdermozilla-central@051765f8237d [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 - UpdateTreeOnRemoval should use logging::TreeInfo, part2, r=yzen
accessible/base/Logging.cpp
accessible/generic/DocAccessible.cpp
--- a/accessible/base/Logging.cpp
+++ b/accessible/base/Logging.cpp
@@ -627,31 +627,30 @@ logging::TreeInfo(const char* aMsg, uint
       while ((descr = va_arg(vl, const char*))) {
         AccessibleInfo(descr, va_arg(vl, Accessible*));
       }
     }
     else {
       MsgBegin("TREE", aMsg);
     }
     va_end(vl);
-
     MsgEnd();
 
     if (aExtraFlags & eStack) {
       Stack();
     }
   }
 }
 
 void
 logging::TreeInfo(const char* aMsg, uint32_t aExtraFlags,
                   const char* aMsg1, Accessible* aAcc,
                   const char* aMsg2, nsINode* aNode)
 {
-  if (IsEnabledAll(logging::eTree | logging::eVerbose)) {
+  if (IsEnabledAll(logging::eTree | aExtraFlags)) {
     MsgBegin("TREE", "%s; doc: %p", aMsg, aAcc ? aAcc->Document() : nullptr);
     AccessibleInfo(aMsg1, aAcc);
     Accessible* acc = aAcc->Document()->GetAccessible(aNode);
     if (acc) {
       AccessibleInfo(aMsg2, acc);
     }
     else {
       Node(aMsg2, aNode);
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -1851,27 +1851,18 @@ DocAccessible::FireEventsOnInsertion(Acc
 }
 
 void
 DocAccessible::UpdateTreeOnRemoval(Accessible* aContainer, nsIContent* aChildNode)
 {
   // If child node is not accessible then look for its accessible children.
   Accessible* child = GetAccessible(aChildNode);
 #ifdef A11Y_LOG
-  if (logging::IsEnabled(logging::eTree)) {
-    logging::MsgBegin("TREE", "process content removal");
-    logging::Node("container", aContainer->GetNode());
-    logging::Node("child", aChildNode);
-    if (child)
-      logging::Address("child", child);
-    else
-      logging::MsgEntry("child accessible: null");
-
-    logging::MsgEnd();
-  }
+  logging::TreeInfo("process content removal", 0,
+                    "container", aContainer, "child", aChildNode);
 #endif
 
   TreeMutation mt(aContainer);
   if (child) {
     mt.BeforeRemoval(child);
     MOZ_ASSERT(aContainer == child->Parent(), "Wrong parent");
     aContainer->RemoveChild(child);
     UncacheChildrenInSubtree(child);