[orca] Chromium: Remove hack for not being able to ascend ancestry to top level
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Chromium: Remove hack for not being able to ascend ancestry to top level
- Date: Mon, 14 Jan 2019 18:10:24 +0000 (UTC)
commit 2bdda7821f93af7abfcf2132a1a03501ac5c6aa4
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Jan 14 13:09:39 2019 -0500
Chromium: Remove hack for not being able to ascend ancestry to top level
.../scripts/toolkits/Chromium/script_utilities.py | 23 ----------------------
1 file changed, 23 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script_utilities.py
b/src/orca/scripts/toolkits/Chromium/script_utilities.py
index 5f76ea1ea..4bc299669 100644
--- a/src/orca/scripts/toolkits/Chromium/script_utilities.py
+++ b/src/orca/scripts/toolkits/Chromium/script_utilities.py
@@ -262,29 +262,6 @@ class Utilities(web.Utilities):
debug.println(debug.LEVEL_INFO, msg, True)
return True
- def topLevelObject(self, obj):
- # HACK: Remove this once we can ascend ancestry and get top level
- # object from within web content.
- topLevel = super().topLevelObject(obj)
- if not topLevel or topLevel.getRole() in self._topLevelRoles():
- return topLevel
-
- msg = "CHROMIUM: ERROR: Top level object for %s is %s" % (obj, topLevel)
- debug.println(debug.LEVEL_INFO, msg, True)
-
- if self.isDocument(topLevel) and orca_state.activeWindow \
- and orca_state.activeWindow.getApplication() == self._script.app:
- startTime = time.time()
- descendant = pyatspi.findDescendant(orca_state.activeWindow, lambda x: x == topLevel)
- msg = "CHROMIUM: findDescendant() - %.4fs" % (time.time()-startTime)
- debug.println(debug.LEVEL_INFO, msg, True)
- if descendant:
- msg = "CHROMIUM: HACK: Returning %s as top level" % orca_state.activeWindow
- debug.println(debug.LEVEL_INFO, msg, True)
- return orca_state.activeWindow
-
- return topLevel
-
def frameAndDialog(self, obj):
# HACK: Remove this once we can ascend the ancestry.
frame, dialog = super().frameAndDialog(obj)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]