[orca] Handle authoring which causes parent extents to not include children
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Handle authoring which causes parent extents to not include children
- Date: Wed, 20 Nov 2019 16:09:04 +0000 (UTC)
commit 130ee506b1448ae1cb6a017fe5388e675191d58c
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Nov 20 11:07:11 2019 -0500
Handle authoring which causes parent extents to not include children
src/orca/script_utilities.py | 3 +++
src/orca/scripts/web/script_utilities.py | 17 +++++++++++++++++
2 files changed, 20 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 9d39bb96b..4fbc6e5bb 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -4096,6 +4096,9 @@ class Utilities:
except:
return False
+ if coordType is None:
+ coordType = pyatspi.DESKTOP_COORDS
+
if component.contains(x, y, coordType):
return True
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 46ba0597e..d293f048b 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4553,3 +4553,20 @@ class Utilities(script_utilities.Utilities):
return True
return False
+
+ def descendantAtPoint(self, root, x, y, coordType=None):
+ if not (root and self.inDocumentContent(root)):
+ return super().descendantAtPoint(root, x, y, coordType)
+
+ if self.containsPoint(root, x, y, coordType):
+ return super().descendantAtPoint(root, x, y, coordType)
+
+ # Authoring can cause user agents to expose containers with a bounding
+ # box that doesn't contain the child container at the specified point.
+ obj = root
+ for child in root:
+ if self.containsPoint(child, x, y, coordType):
+ obj = child
+ break
+
+ return super().descendantAtPoint(obj, x, y, coordType)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]