[orca] Filter out some chrome events when inferring live regions
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Filter out some chrome events when inferring live regions
- Date: Sat, 7 Dec 2013 14:07:38 +0000 (UTC)
commit 64f8ea438b78ce9d54b5ee36c4a22609c8312322
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sat Dec 7 15:04:33 2013 +0100
Filter out some chrome events when inferring live regions
src/orca/scripts/toolkits/Gecko/script.py | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index c3f79ba..dbbc81e 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -2070,6 +2070,22 @@ class Script(default.Script):
# events that are not in the document. Unfortunately, this is an
# expensive call. Instead we will do some heuristics to filter out
# chrome events with the least amount of IPC as possible.
+ chromeEventRoles = [pyatspi.ROLE_AUTOCOMPLETE,
+ pyatspi.ROLE_FRAME,
+ pyatspi.ROLE_STATUS_BAR,
+ pyatspi.ROLE_TOOL_BAR]
+
+ role = event.source.getRole()
+ if role in chromeEventRoles:
+ return False
+
+ try:
+ childRole = event.any_data.getRole()
+ except:
+ pass
+ else:
+ if childRole in chromeEventRoles:
+ return False
# event.type specific checks
if event.type.startswith('object:children-changed'):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]