[orca] Attempt to identify and navigate around non-navigable embedded documents
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Attempt to identify and navigate around non-navigable embedded documents
- Date: Fri, 27 Oct 2017 19:01:54 +0000 (UTC)
commit 07cd264aa9edd250e8b8384bab8a4b32fb282c7f
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Oct 27 15:00:56 2017 -0400
Attempt to identify and navigate around non-navigable embedded documents
src/orca/scripts/web/script_utilities.py | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 87cb2d9..8b1fc86 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -83,6 +83,7 @@ class Utilities(script_utilities.Utilities):
self._isNonEntryTextWidget = {}
self._isImageMap = {}
self._isUselessImage = {}
+ self._isNonNavigableEmbeddedDocument = {}
self._isParentOfNullChild = {}
self._inferredLabels = {}
self._actualLabels = {}
@@ -147,6 +148,7 @@ class Utilities(script_utilities.Utilities):
self._isNonEntryTextWidget = {}
self._isImageMap = {}
self._isUselessImage = {}
+ self._isNonNavigableEmbeddedDocument = {}
self._isParentOfNullChild = {}
self._inferredLabels = {}
self._actualLabels = {}
@@ -852,6 +854,8 @@ class Utilities(script_utilities.Utilities):
rv = None
if rv and (self.isHidden(obj) or self.isOffScreenLabel(obj)):
rv = None
+ if rv and self.isNonNavigableEmbeddedDocument(obj):
+ rv = None
if rv and role == pyatspi.ROLE_LINK \
and (self.hasExplicitName(obj) or self.hasUselessCanvasDescendant(obj)):
rv = None
@@ -2751,6 +2755,23 @@ class Utilities(script_utilities.Utilities):
self._isImageMap[hash(obj)] = rv
return rv
+ def isNonNavigableEmbeddedDocument(self, obj):
+ rv = self._isNonNavigableEmbeddedDocument.get(hash(obj))
+ if rv is not None:
+ return rv
+
+ rv = False
+ if self.isDocument(obj) and self.getDocumentForObject(obj):
+ try:
+ name = obj.name
+ except:
+ rv = True
+ else:
+ rv = "doubleclick" in name
+
+ self._isNonNavigableEmbeddedDocument[hash(obj)] = rv
+ return rv
+
def isUselessImage(self, obj):
if not (obj and self.inDocumentContent(obj)):
return False
@@ -3277,6 +3298,9 @@ class Utilities(script_utilities.Utilities):
if self.isHidden(obj) or self.isOffScreenLabel(obj):
return True
+ if self.isNonNavigableEmbeddedDocument(obj):
+ return True
+
role = obj.getRole()
if role == pyatspi.ROLE_LINK \
and (self.hasExplicitName(obj) or self.hasUselessCanvasDescendant(obj)):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]