bug 1261144 - remove the AccCollector class r=lsocks
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Wed, 30 Mar 2016 17:08:59 -0400
changeset 316465 9d674ccbdee1ffbf65c97c97a78cd2658b2d307d
parent 316464 8f07e3f4ea98dfb543d9f2bf04ebea6f8bc23444
child 316466 4d94046fc040f334f54f3e47ccefde23db51a7d6
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsocks
bugs1261144
milestone48.0a1
bug 1261144 - remove the AccCollector class r=lsocks
accessible/base/AccCollector.cpp
accessible/base/AccCollector.h
--- a/accessible/base/AccCollector.cpp
+++ b/accessible/base/AccCollector.cpp
@@ -3,24 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "AccCollector.h"
 
 #include "Accessible.h"
 
 using namespace mozilla::a11y;
 
-////////////////////////////////////////////////////////////////////////////////
-// nsAccCollector
-////////////////////////////////////////////////////////////////////////////////
-
-AccCollector::~AccCollector()
-{
-}
-
 uint32_t
 EmbeddedObjCollector::Count()
 {
   EnsureNGetIndex(nullptr);
   return mObjects.Length();
 }
 
 Accessible*
@@ -28,19 +20,16 @@ EmbeddedObjCollector::GetAccessibleAt(ui
 {
   Accessible* accessible = mObjects.SafeElementAt(aIndex, nullptr);
   if (accessible)
     return accessible;
 
   return EnsureNGetObject(aIndex);
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// nsAccCollector protected
-
 Accessible*
 EmbeddedObjCollector::EnsureNGetObject(uint32_t aIndex)
 {
   uint32_t childCount = mRoot->ChildCount();
   while (mRootChildIdx < childCount) {
     Accessible* child = mRoot->GetChildAt(mRootChildIdx++);
     if (!(mFilterFunc(child) & filters::eMatch))
       continue;
@@ -65,20 +54,16 @@ EmbeddedObjCollector::EnsureNGetIndex(Ac
     AppendObject(child);
     if (child == aAccessible)
       return mObjects.Length() - 1;
   }
 
   return -1;
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// EmbeddedObjCollector
-////////////////////////////////////////////////////////////////////////////////
-
 int32_t
 EmbeddedObjCollector::GetIndexAt(Accessible* aAccessible)
 {
   if (aAccessible->mParent != mRoot)
     return -1;
 
   MOZ_ASSERT(!aAccessible->IsProxy());
   if (aAccessible->mInt.mIndexOfEmbeddedChild != -1)
--- a/accessible/base/AccCollector.h
+++ b/accessible/base/AccCollector.h
@@ -10,37 +10,20 @@
 #include "nsTArray.h"
 
 namespace mozilla {
 namespace a11y {
 
 class Accessible;
 
 /**
- * Collect accessible children complying with filter function. Provides quick
- * access to accessible by index.
- */
-class AccCollector
-{
-public:
-  virtual ~AccCollector();
-
-protected:
-  AccCollector() {}
-
-private:
-  AccCollector(const AccCollector&);
-  AccCollector& operator =(const AccCollector&);
-};
-
-/**
  * Collect embedded objects. Provide quick access to accessible by index and
  * vice versa.
  */
-class EmbeddedObjCollector final : public AccCollector
+class EmbeddedObjCollector final
 {
 public:
   virtual ~EmbeddedObjCollector() { }
 
 public:
   /**
    * Return index of the given accessible within the collection.
    */