bug 1261144 - move EnsureNGetObject to EmbeddedObjCollector r=lsocks
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Wed, 30 Mar 2016 16:40:34 -0400
changeset 292671 2486e73b4a7fa320fa5bf0c772849070710abb34
parent 292670 f4f652ab9425ee0f411c4dc07c961b8cae6fed2e
child 292672 7be3111074b57d3c8fb7726291a78182073504f4
push id74949
push usertsaunders@mozilla.com
push dateTue, 12 Apr 2016 01:36:20 +0000
treeherdermozilla-inbound@9c35ce0d49ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsocks
bugs1261144
milestone48.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 1261144 - move EnsureNGetObject to EmbeddedObjCollector r=lsocks
accessible/base/AccCollector.cpp
accessible/base/AccCollector.h
--- a/accessible/base/AccCollector.cpp
+++ b/accessible/base/AccCollector.cpp
@@ -38,17 +38,17 @@ EmbeddedObjCollector::GetAccessibleAt(ui
 
   return EnsureNGetObject(aIndex);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsAccCollector protected
 
 Accessible*
-AccCollector::EnsureNGetObject(uint32_t aIndex)
+EmbeddedObjCollector::EnsureNGetObject(uint32_t aIndex)
 {
   uint32_t childCount = mRoot->ChildCount();
   while (mRootChildIdx < childCount) {
     Accessible* child = mRoot->GetChildAt(mRootChildIdx++);
     if (!(mFilterFunc(child) & filters::eMatch))
       continue;
 
     AppendObject(child);
--- a/accessible/base/AccCollector.h
+++ b/accessible/base/AccCollector.h
@@ -21,21 +21,16 @@ class Accessible;
 class AccCollector
 {
 public:
   AccCollector(Accessible* aRoot, filters::FilterFuncPtr aFilterFunc);
   virtual ~AccCollector();
 
 protected:
   /**
-   * Ensure accessible at the given index is stored and return it.
-   */
-  Accessible* EnsureNGetObject(uint32_t aIndex);
-
-  /**
    * Ensure index for the given accessible is stored and return it.
    */
   int32_t EnsureNGetIndex(Accessible* aAccessible);
 
   /**
    * Append the object to collection.
    */
   virtual void AppendObject(Accessible* aAccessible);
@@ -73,16 +68,21 @@ public:
   uint32_t Count();
 
   /**
    * Return an accessible from the collection at the given index.
    */
   Accessible* GetAccessibleAt(uint32_t aIndex);
 
 protected:
+  /**
+   * Ensure accessible at the given index is stored and return it.
+   */
+  Accessible* EnsureNGetObject(uint32_t aIndex);
+
   // Make sure it's used by Accessible class only.
   explicit EmbeddedObjCollector(Accessible* aRoot) :
     AccCollector(aRoot, filters::GetEmbeddedObject) { }
 
   virtual void AppendObject(Accessible* aAccessible) override;
 
   friend class Accessible;
 };