bug 1261144 - call Accessible::IsText() directly from EmbeddedObjCollector r=lsocks
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Wed, 30 Mar 2016 19:20:20 -0400
changeset 292678 2571512a99dc43a84bba0d257bde345a8d80e43c
parent 292677 7068b471499ffb99ebcb88d6ab1c0c55caf881a9
child 292679 fd91240b139ff6094a24923866b03cca05014991
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 - call Accessible::IsText() directly from EmbeddedObjCollector r=lsocks
accessible/base/EmbeddedObjCollector.cpp
--- a/accessible/base/EmbeddedObjCollector.cpp
+++ b/accessible/base/EmbeddedObjCollector.cpp
@@ -26,34 +26,34 @@ EmbeddedObjCollector::GetAccessibleAt(ui
 }
 
 Accessible*
 EmbeddedObjCollector::EnsureNGetObject(uint32_t aIndex)
 {
   uint32_t childCount = mRoot->ChildCount();
   while (mRootChildIdx < childCount) {
     Accessible* child = mRoot->GetChildAt(mRootChildIdx++);
-    if (!(filters::GetEmbeddedObject(child) & filters::eMatch))
+    if (child->IsText())
       continue;
 
     AppendObject(child);
     if (mObjects.Length() - 1 == aIndex)
       return mObjects[aIndex];
   }
 
   return nullptr;
 }
 
 int32_t
 EmbeddedObjCollector::EnsureNGetIndex(Accessible* aAccessible)
 {
   uint32_t childCount = mRoot->ChildCount();
   while (mRootChildIdx < childCount) {
     Accessible* child = mRoot->GetChildAt(mRootChildIdx++);
-    if (!(filters::GetEmbeddedObject(child) & filters::eMatch))
+    if (child->IsText())
       continue;
 
     AppendObject(child);
     if (child == aAccessible)
       return mObjects.Length() - 1;
   }
 
   return -1;
@@ -64,18 +64,17 @@ EmbeddedObjCollector::GetIndexAt(Accessi
 {
   if (aAccessible->mParent != mRoot)
     return -1;
 
   MOZ_ASSERT(!aAccessible->IsProxy());
   if (aAccessible->mInt.mIndexOfEmbeddedChild != -1)
     return aAccessible->mInt.mIndexOfEmbeddedChild;
 
-  return filters::GetEmbeddedObject(aAccessible) & filters::eMatch ?
-    EnsureNGetIndex(aAccessible) : -1;
+  return !aAccessible->IsText() ?  EnsureNGetIndex(aAccessible) : -1;
 }
 
 void
 EmbeddedObjCollector::AppendObject(Accessible* aAccessible)
 {
   MOZ_ASSERT(!aAccessible->IsProxy());
   aAccessible->mInt.mIndexOfEmbeddedChild = mObjects.Length();
   mObjects.AppendElement(aAccessible);