[orca] Chromium: Add another workaround for not being able to ascend the hierarchy
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Chromium: Add another workaround for not being able to ascend the hierarchy
- Date: Sat, 1 Dec 2018 01:16:54 +0000 (UTC)
commit ab568db5db57f08f178f1d45ea45c28ed1a0406d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Nov 30 20:15:20 2018 -0500
Chromium: Add another workaround for not being able to ascend the hierarchy
src/orca/scripts/toolkits/Chromium/script_utilities.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script_utilities.py
b/src/orca/scripts/toolkits/Chromium/script_utilities.py
index 7f739f6a4..fdc4c5552 100644
--- a/src/orca/scripts/toolkits/Chromium/script_utilities.py
+++ b/src/orca/scripts/toolkits/Chromium/script_utilities.py
@@ -215,9 +215,26 @@ class Utilities(web.Utilities):
startTime = time.time()
descendant = pyatspi.findDescendant(topLevel, 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)
+ if frame or dialog:
+ return frame, dialog
+
+ frame = self.topLevelObject(obj)
+ if not frame and not self.inDocumentContent(obj) \
+ and self.canBeActiveWindow(orca_state.activeWindow) \
+ and orca_state.activeWindow.getApplication() == self._script.app:
+ frame = orca_state.activeWindow
+
+ msg = "CHROMIUM: CAN'T ASCEND TREE HACK: Returning %s as frame" % frame
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return frame, dialog
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]