[orca] Move the Chromium script's descendantAtPoint to the web script
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Move the Chromium script's descendantAtPoint to the web script
- Date: Wed, 20 May 2020 00:09:35 +0000 (UTC)
commit 4b20f38440e85d424d5bd072b20515254432ff7d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue May 19 20:06:50 2020 -0400
Move the Chromium script's descendantAtPoint to the web script
Mozilla and Chromium now both make it possible to get the deepest
descendant at the specified point when the document is root. Yay!
src/orca/scripts/toolkits/Chromium/script_utilities.py | 15 ---------------
src/orca/scripts/web/script_utilities.py | 15 +++++++++++++++
2 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script_utilities.py
b/src/orca/scripts/toolkits/Chromium/script_utilities.py
index 50140f655..02bead6b7 100644
--- a/src/orca/scripts/toolkits/Chromium/script_utilities.py
+++ b/src/orca/scripts/toolkits/Chromium/script_utilities.py
@@ -520,21 +520,6 @@ class Utilities(web.Utilities):
result = super().accessibleAtPoint(root, x, y, coordType)
return result
- def descendantAtPoint(self, root, x, y, coordType=None):
- if coordType is None:
- coordType = pyatspi.DESKTOP_COORDS
-
- result = None
- if self.isDocument(root):
- result = self.accessibleAtPoint(root, x, y, coordType)
-
- root = result or root
- result = super().descendantAtPoint(root, x, y, coordType)
- if self.isListItemMarker(result) or self.isStaticTextLeaf(result):
- return result.parent
-
- return result
-
def _isActiveAndShowingAndNotIconified(self, obj):
if super()._isActiveAndShowingAndNotIconified(obj):
return True
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index b6012688b..c4f2d3c6b 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -823,6 +823,21 @@ class Utilities(script_utilities.Utilities):
return [ext.x, ext.y, ext.width, ext.height]
+ def descendantAtPoint(self, root, x, y, coordType=None):
+ if coordType is None:
+ coordType = pyatspi.DESKTOP_COORDS
+
+ result = None
+ if self.isDocument(root):
+ result = self.accessibleAtPoint(root, x, y, coordType)
+
+ root = result or root
+ result = super().descendantAtPoint(root, x, y, coordType)
+ if self.isListItemMarker(result) or self.isStaticTextLeaf(result):
+ return result.parent
+
+ return result
+
def _preserveTree(self, obj):
if not (obj and obj.childCount):
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]