[orca] Remove a now-redundant sanity check



commit d4271e310b0e18d2404ad3d965d2e081ba2f663b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Apr 22 22:04:25 2019 -0400

    Remove a now-redundant sanity check

 src/orca/scripts/web/script_utilities.py | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 95801f240..2a9ad12ec 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -3836,11 +3836,10 @@ class Utilities(script_utilities.Utilities):
                         return self.findNextCaretInOrder(child, -1)
                     if allText[i] not in (self.EMBEDDED_OBJECT_CHARACTER, self.ZERO_WIDTH_NO_BREAK_SPACE):
                         return obj, i
-            elif self._canHaveCaretContext(obj):
-                if obj.childCount and not self._treatObjectAsWhole(obj):
-                    return self.findNextCaretInOrder(obj[0], -1)
-                elif offset < 0 and not self.isTextBlockElement(obj):
-                    return obj, 0
+            elif obj.childCount and not self._treatObjectAsWhole(obj):
+                return self.findNextCaretInOrder(obj[0], -1)
+            elif offset < 0 and not self.isTextBlockElement(obj):
+                return obj, 0
 
         # If we're here, start looking up the the tree, up to the document.
         documentFrame = self.documentFrame()
@@ -3901,11 +3900,10 @@ class Utilities(script_utilities.Utilities):
                         return self.findPreviousCaretInOrder(child, -1)
                     if allText[i] not in (self.EMBEDDED_OBJECT_CHARACTER, self.ZERO_WIDTH_NO_BREAK_SPACE):
                         return obj, i
-            elif self._canHaveCaretContext(obj):
-                if obj.childCount and not self._treatObjectAsWhole(obj):
-                    return self.findPreviousCaretInOrder(obj[obj.childCount - 1], -1)
-                elif offset < 0 and not self.isTextBlockElement(obj):
-                    return obj, 0
+            elif obj.childCount and not self._treatObjectAsWhole(obj):
+                return self.findPreviousCaretInOrder(obj[obj.childCount - 1], -1)
+            elif offset < 0 and not self.isTextBlockElement(obj):
+                return obj, 0
 
         # If we're here, start looking up the the tree, up to the document.
         documentFrame = self.documentFrame()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]