Orca ports 3rd commit.

This commit is contained in:
Storm Dragon
2026-01-06 16:59:30 -05:00
parent 1d23060353
commit 17c9eee4a1
2 changed files with 16 additions and 1 deletions
+4
View File
@@ -2350,6 +2350,10 @@ class Script(default.Script):
if prevDocument != document:
tokens = ["WEB: document changed from", prevDocument, "to", document]
debug.printTokens(debug.LEVEL_INFO, tokens, True)
elif document == event.source:
msg = "WEB: Ignoring focus change to document ancestor of focus"
debug.printMessage(debug.LEVEL_INFO, msg, True)
return True
if self.utilities.isWebAppDescendant(event.source):
if self._browseModeIsSticky:
+12 -1
View File
@@ -991,7 +991,7 @@ class Utilities(script_utilities.Utilities):
rv = False
elif rv and not self.isLiveRegion(obj):
doNotQuery = [Atspi.Role.LIST_BOX]
doNotQuery = [Atspi.Role.LIST_BOX, Atspi.Role.TABLE, Atspi.Role.TABLE_ROW]
role = AXObject.get_role(obj)
if rv and role in doNotQuery:
tokens = ["WEB: Treating", obj, "as non-text due to role."]
@@ -1773,6 +1773,7 @@ class Utilities(script_utilities.Utilities):
extents = self.getExtents(container, 0, 1)
objBanner = AXObject.find_ancestor(obj, self.isLandmarkBanner)
objRow = AXObject.find_ancestor(obj, AXUtilities.is_table_row)
def _include(x):
if x in objects:
@@ -1844,6 +1845,9 @@ class Utilities(script_utilities.Utilities):
and firstObj == prevObj:
break
if objRow != AXObject.find_ancestor(prevObj, AXUtilities.is_table_row):
break
onLeft = self._getContentsForObj(prevObj, pOffset, boundary)
onLeft = list(filter(_include, onLeft))
if not onLeft:
@@ -1871,6 +1875,9 @@ class Utilities(script_utilities.Utilities):
and lastObj == nextObj:
break
if objRow != AXObject.find_ancestor(nextObj, AXUtilities.is_table_row):
break
onRight = self._getContentsForObj(nextObj, nOffset, boundary)
if onRight and self._contentIsSubsetOf(objects[0], onRight[-1]):
onRight = onRight[0:-1]
@@ -4758,6 +4765,10 @@ class Utilities(script_utilities.Utilities):
tokens = ["WEB: Landmark can have caret context", obj]
debug.printTokens(debug.LEVEL_INFO, tokens, True)
rv = True
elif AXUtilities.is_table_related(obj, True):
tokens = ["WEB: Table-related object can have caret context", obj]
debug.printTokens(debug.LEVEL_INFO, tokens, True)
rv = True
elif self.isStaticTextLeaf(obj):
tokens = ["WEB: Static text leaf cannot have caret context", obj]
debug.printTokens(debug.LEVEL_INFO, tokens, True)