[orca] Remove hackaround related to pages whose authoring messes up bounding boxes
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Remove hackaround related to pages whose authoring messes up bounding boxes
- Date: Fri, 22 Nov 2019 19:10:53 +0000 (UTC)
commit 73e0266fcaad47e5d8abafde90b89625ee810812
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Nov 22 14:09:06 2019 -0500
Remove hackaround related to pages whose authoring messes up bounding boxes
The custom descendant at point was designed to work around authoring
which results in parent elements not containing their children as far
as the bounding boxes are concerned. But we keep finding more and more
edge cases. And the tree-dive solution was not working. Therefore, we
need to get this fixed in the user agent.
src/orca/scripts/web/script_utilities.py | 31 -------------------------------
1 file changed, 31 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 03764e437..47d1c617d 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4582,34 +4582,3 @@ class Utilities(script_utilities.Utilities):
return True
return False
-
- def descendantAtPoint(self, root, x, y, coordType=None):
- if coordType is None:
- coordType = pyatspi.DESKTOP_COORDS
-
- if not (root and self.inDocumentContent(root)):
- return super().descendantAtPoint(root, x, y, coordType)
-
- if self.isDocument(root):
- active = self.activeDocument()
- if active and root != active:
- msg = "WEB: %s is not active. Updating to %s." % (root, active)
- debug.println(debug.LEVEL_INFO, msg, True)
- root = active
-
- 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
- else:
- child = root.queryComponent().getAccessibleAtPoint(x, y, coordType)
- if child and self.containsPoint(child, x, y, coordType):
- return child
-
- return super().descendantAtPoint(obj, x, y, coordType)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]