[orca] Chromium: Remove hack for no embeds/embedded relationship
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Chromium: Remove hack for no embeds/embedded relationship
- Date: Tue, 12 Feb 2019 15:32:22 +0000 (UTC)
commit 209f6f56360ae0ba70c422ab1f40e98239c4fb9d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Feb 12 10:31:39 2019 -0500
Chromium: Remove hack for no embeds/embedded relationship
.../scripts/toolkits/Chromium/script_utilities.py | 31 ----------------------
1 file changed, 31 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script_utilities.py
b/src/orca/scripts/toolkits/Chromium/script_utilities.py
index 9b18c0140..e22bb2969 100644
--- a/src/orca/scripts/toolkits/Chromium/script_utilities.py
+++ b/src/orca/scripts/toolkits/Chromium/script_utilities.py
@@ -43,40 +43,9 @@ class Utilities(web.Utilities):
def __init__(self, script):
super().__init__(script)
- self._documentsEmbeddedBy = {} # Needed for HACK
def clearCachedObjects(self):
super().clearCachedObjects()
- self._documentsEmbeddedBy = {} # Needed for HACK
-
- def _getDocumentsEmbeddedBy(self, frame):
- result = super()._getDocumentsEmbeddedBy(frame)
- if result:
- return result
-
- # HACK: This tree dive is not efficient and should be removed once Chromium
- # implements support for the embeds/embedded-by relation pair.
- cached = self._documentsEmbeddedBy.get(hash(frame), [])
- result = list(filter(self.isShowingAndVisible, cached))
- if not result:
- def _include(x):
- if x and x.getRole() == pyatspi.ROLE_DOCUMENT_WEB:
- return self.isShowingAndVisible(x)
- return False
-
- def _exclude(x):
- roles = [pyatspi.ROLE_DOCUMENT_FRAME, pyatspi.ROLE_INTERNAL_FRAME]
- if not x or x.getRole() in roles:
- return True
- return False
-
- startTime = time.time()
- result = self.findAllDescendants(frame, _include, _exclude)
- msg = "CHROMIUM: NO EMBEDDED RELATION HACK - %.4fs" % (time.time()-startTime)
- debug.println(debug.LEVEL_INFO, msg, True)
-
- self._documentsEmbeddedBy[hash(frame)] = result
- return result
def selectedChildCount(self, obj):
count = super().selectedChildCount(obj)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]