Index: src/orca/settings.py
===================================================================
--- src/orca/settings.py	(revision 3611)
+++ src/orca/settings.py	(working copy)
@@ -915,3 +915,7 @@
 # Contracted braille table.
 # 
 brailleContractionTable = ''
+
+# Use Collection Interface?
+# 
+useCollection = True
Index: src/orca/Gecko.py
===================================================================
--- src/orca/Gecko.py	(revision 3611)
+++ src/orca/Gecko.py	(working copy)
@@ -1393,14 +1393,16 @@
         """Calls the base class method for basic information and Gecko
         specific presentation methods for detailed/custom information.
         """
-
         if basicOnly or not self._script.inDocumentContent(obj):
             where_am_I.WhereAmI.whereAmI(self, obj, basicOnly)
             self._script.liveMngr.outputLiveRegionDescription(obj)
         else:
-            try:
-                self._collectionPageSummary()
-            except:
+            if settings.useCollection:
+                try:
+                    self._collectionPageSummary()
+                except:
+                    self._iterativePageSummary(obj)
+            else:
                 self._iterativePageSummary(obj)
 
     def _speakDefaultButton(self, obj):
@@ -1420,7 +1422,6 @@
         """
         docframe = self._script.getDocumentFrame()
         col = docframe.queryCollection()
-
         # We will initialize these after the queryCollection() call in case
         # Collection is not supported
         headings = 0 
@@ -1438,7 +1439,8 @@
                                    "", col.MATCH_NONE,
                                    False)
 
-        matches = col.getMatches (rule, col.SORT_ORDER_CANONICAL, 0)
+        matches = col.getMatches(rule, col.SORT_ORDER_CANONICAL, 0, True)
+
         col.freeMatchRule(rule)
         for obj in matches:
             role = obj.getRole()
@@ -7191,6 +7193,28 @@
         return nextObj
 
     def findPreviousRole(self, roles, wrap, currentObj=None):
+        if settings.useCollection:
+            try:
+                # The docframe is our collection
+                docframe = self.getDocumentFrame()
+                col = docframe.queryCollection()
+            except NotImplementedError:
+                # Collection is not implemented so do it iteratively
+                return self.iterFindPreviousRole(roles, wrap, currentObj)
+            # define our matchrule
+            stateset = pyatspi.StateSet()
+            rule = col.createMatchRule(stateset.raw(), col.MATCH_NONE,
+                        "", col.MATCH_NONE,
+                        roles, col.MATCH_ANY,
+                        "", col.MATCH_NONE,
+                        False)
+            retval = self.findPrevByMatchRule(col, rule, wrap, currentObj)
+            col.freeMatchRule(rule)            
+            return retval
+        else:
+            return self.iterFindPreviousRole(roles, wrap, currentObj)
+
+    def iterfindPreviousRole(self, roles, wrap, currentObj=None):
         """Finds the caret offset at the beginning of the next object
         using the given roles list as a pattern to match.
 
@@ -7235,6 +7259,28 @@
         return [None, wrapped]
 
     def findNextRole(self, roles, wrap, currentObj=None):
+        if settings.useCollection:
+            try:
+                # The docframe is our collection
+                docframe = self.getDocumentFrame()
+                col = docframe.queryCollection()
+            except NotImplementedError:
+                # Collection is not implemented so do it iteratively
+                return self.iterFindNextRole(roles, wrap, currentObj)
+            # define our matchrule
+            stateset = pyatspi.StateSet()
+            rule = col.createMatchRule(stateset.raw(), col.MATCH_NONE,
+                        "", col.MATCH_NONE,
+                        roles, col.MATCH_ANY,
+                        "", col.MATCH_NONE,
+                        False)
+            retval = self.findNextByMatchRule(col, rule, wrap, currentObj)
+            col.freeMatchRule(rule)            
+            return retval
+        else:
+            return self.iterFindNextRole(roles, wrap, currentObj)
+
+    def iterFindNextRole(self, roles, wrap, currentObj=None):
         """Finds the caret offset at the beginning of the next object
         using the given roles list as a pattern to match or not match.
 
@@ -7277,7 +7323,87 @@
                     wrapped = True
 
         return [None, wrapped]
-                
+
+    def findPrevByMatchRule(self, col, matchrule, wrap, currentObj=None):
+        # get our current object
+        if not currentObj:
+            [currentObj, characterOffset] = self.getCaretContext()
+            
+        # Get the ancestors.  We won't stop on any of them.
+        ancestors = []
+        obj = currentObj.parent
+        while obj:
+            ancestors.append(obj)
+            obj = obj.parent
+
+        wrapped = False
+        rs = col.getMatchesTo(currentObj, matchrule, 
+                              col.SORT_ORDER_CANONICAL, 
+                              col.TREE_INORDER, True, 1, True)
+        while True:
+            if len(rs) == 0:
+                if wrapped:
+                    return [None, True]
+                elif wrap:
+                    lastobj = self.getLastObject()
+                    # Collection does not do an inclusive search, meaning
+                    # that the start object is not part of the search.  So
+                    # we need to test the lastobj separately.  We don't have
+                    # this problem for 'Next' because the startobj is the doc
+                    # frame.
+                    #
+                    secondlastobj = self.findPreviousObject(lastobj)
+                    rs = col.getMatchesFrom(secondlastobj, matchrule, 
+                              col.SORT_ORDER_CANONICAL, 
+                              col.TREE_INORDER, 1, True)
+                    if len(rs) > 0:
+                        return [rs[0], True]
+                    else:
+                        rs = col.getMatchesTo(lastobj, matchrule, 
+                              col.SORT_ORDER_CANONICAL, 
+                              col.TREE_INORDER, True, 1, True)
+                        wrapped = True
+                 # caller doesn't want us to wrap and we haven't found anything
+                else:
+                    return [None, False]
+            elif len(rs) > 0:
+                if rs[0] in ancestors:
+                    rs = col.getMatchesTo(rs[0], matchrule, 
+                              col.SORT_ORDER_CANONICAL, 
+                              col.TREE_INORDER, True, 1, True)
+                else:
+                    return [rs[0], wrapped]
+                 
+    def findNextByMatchRule(self, col, matchrule, wrap, currentObj=None):
+        # get our current object
+        if not currentObj:
+            [currentObj, characterOffset] = self.getCaretContext()
+
+        # go find the next match
+        rs = col.getMatchesFrom(currentObj, 
+                                    matchrule,
+                                    col.SORT_ORDER_CANONICAL,
+                                    col.TREE_INORDER,
+                                    1, 
+                                    True)
+
+        if len(rs) > 0:
+            return [rs[0], False]
+        elif wrap:
+            # We didn't find anything so start at the doc frame and try again
+            rs = col.getMatchesFrom(self.getDocumentFrame(), 
+                                    matchrule,
+                                    col.SORT_ORDER_CANONICAL,
+                                    col.TREE_INORDER,
+                                    1, 
+                                    True)
+            if len(rs) > 0:
+                return [rs[0], True]
+            else:
+                return [None, True]
+        else:
+            return [None, False] 
+
     def findPrevByPredicate(self, pred, wrap, currentObj=None):
         """Finds the caret offset at the beginning of the previous object
         using the given predicate as a pattern to match.
