Bug 707846 - remove unused nsAccessibleWrap::GetUnignoredChildCount(). r=surkov
authorHub Figuiere <hfiguiere@mozilla.com>
Tue, 06 Dec 2011 14:08:01 +0800
changeset 81494 335a204bcfe942d59f70186a5e4b156b9116cfc2
parent 81493 95e631d313a3721f7ffbd20bfb40f67338429b91
child 81495 da074baa9f0585bf239296c6d3ef3ee5e1097eab
push id21572
push userbmo@edmorley.co.uk
push dateTue, 06 Dec 2011 13:17:55 +0000
treeherdermozilla-central@bf8259fcab61 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs707846
milestone11.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 707846 - remove unused nsAccessibleWrap::GetUnignoredChildCount(). r=surkov
accessible/src/mac/nsAccessibleWrap.h
accessible/src/mac/nsAccessibleWrap.mm
--- a/accessible/src/mac/nsAccessibleWrap.h
+++ b/accessible/src/mac/nsAccessibleWrap.h
@@ -78,18 +78,16 @@ class nsAccessibleWrap : public nsAccess
     virtual void InvalidateChildren();
 
     virtual nsresult HandleAccEvent(AccEvent* aEvent);
 
     // ignored means that the accessible might still have children, but is not displayed
     // to the user. it also has no native accessible object represented for it.
     bool IsIgnored();
     
-    PRInt32 GetUnignoredChildCount(bool aDeepCount);
-    
     bool HasPopup () {
       return (NativeState() & mozilla::a11y::states::HASPOPUP);
     }
     
     // return this accessible's all children, adhering to "flat" accessibles by not returning their children.
     void GetUnignoredChildren(nsTArray<nsRefPtr<nsAccessibleWrap> > &aChildrenArray);
     virtual already_AddRefed<nsIAccessible> GetUnignoredParent();
     
--- a/accessible/src/mac/nsAccessibleWrap.mm
+++ b/accessible/src/mac/nsAccessibleWrap.mm
@@ -205,52 +205,16 @@ nsAccessibleWrap::InvalidateChildren()
     mozAccessible *object = mNativeWrapper->getNativeObject();
     [object invalidateChildren];
   }
   nsAccessible::InvalidateChildren();
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
-PRInt32
-nsAccessibleWrap::GetUnignoredChildCount(bool aDeepCount)
-{
-  // if we're flat, we have no children.
-  if (nsAccUtils::MustPrune(this))
-    return 0;
-
-  PRInt32 resultChildCount = 0;
-
-  PRInt32 childCount = GetChildCount();
-  for (PRInt32 childIdx = 0; childIdx < childCount; childIdx++) {
-    nsAccessibleWrap *childAcc =
-      static_cast<nsAccessibleWrap*>(GetChildAt(childIdx));
-
-    // if the current child is not ignored, count it.
-    if (!childAcc->IsIgnored())
-      ++resultChildCount;
-
-    // if it's flat, we don't care to inspect its children.
-    if (nsAccUtils::MustPrune(childAcc))
-      continue;
-
-    if (aDeepCount) {
-      // recursively count the unignored children of our children since it's a deep count.
-      resultChildCount += childAcc->GetUnignoredChildCount(true);
-    } else {
-      // no deep counting, but if the child is ignored, we want to substitute it for its
-      // children.
-      if (childAcc->IsIgnored()) 
-        resultChildCount += childAcc->GetUnignoredChildCount(false);
-    }
-  } 
-  
-  return resultChildCount;
-}
-
 // if we for some reason have no native accessible, we should be skipped over (and traversed)
 // when fetching all unignored children, etc.  when counting unignored children, we will not be counted.
 bool 
 nsAccessibleWrap::IsIgnored() 
 {
   return (mNativeWrapper == nsnull) || mNativeWrapper->isIgnored();
 }