[orca] Chromium: More work on live region support
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Chromium: More work on live region support
- Date: Thu, 18 Jul 2019 14:04:17 +0000 (UTC)
commit d59d0e233988945ef15ad9f8b13e9b68fc301cb2
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Jul 18 10:04:02 2019 -0400
Chromium: More work on live region support
src/orca/scripts/toolkits/Chromium/script_utilities.py | 13 ++++++-------
src/orca/scripts/web/script_utilities.py | 3 ---
2 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script_utilities.py
b/src/orca/scripts/toolkits/Chromium/script_utilities.py
index 54f8b0488..a753af831 100644
--- a/src/orca/scripts/toolkits/Chromium/script_utilities.py
+++ b/src/orca/scripts/toolkits/Chromium/script_utilities.py
@@ -346,12 +346,11 @@ class Utilities(web.Utilities):
# followed by children-changed events to tell us that the object whose text
# changed is now being added to the accessibility tree. Furthermore the
# additions are not always coming to us in presentational order, whereas
- # the text changes appear to be.
- if isinstance(event.any_data, pyatspi.Accessible):
- pEvent, pTime = self._mostRecentLiveRegionEvent.get(hash(event.any_data), ("", 0))
- if pEvent.startswith("object-text-changed:insert") and time.time() - pTime < 0.5:
- msg = "CHROMIUM: Event is believed to be redundant live region notification"
- debug.println(debug.LEVEL_INFO, msg, True)
- return False
+ # the text changes appear to be. Since testing thus far suggests we can rely
+ # upon the text insertions, ignore the children-changed events.
+ if event.type.startswith("object:children-changed:add"):
+ msg = "CHROMIUM: Event is believed to be redundant live region notification"
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
return super().handleAsLiveRegion(event)
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index b39e8445b..d5d4af7d9 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -87,7 +87,6 @@ class Utilities(script_utilities.Utilities):
self._isInlineListDescendant = {}
self._isLandmark = {}
self._isLiveRegion = {}
- self._mostRecentLiveRegionEvent = {}
self._isLink = {}
self._isNonNavigablePopup = {}
self._isNonEntryTextWidget = {}
@@ -166,7 +165,6 @@ class Utilities(script_utilities.Utilities):
self._isInlineListDescendant = {}
self._isLandmark = {}
self._isLiveRegion = {}
- self._mostRecentLiveRegionEvent = {}
self._isLink = {}
self._isNonNavigablePopup = {}
self._isNonEntryTextWidget = {}
@@ -4288,7 +4286,6 @@ class Utilities(script_utilities.Utilities):
return False
self._lastQueuedLiveRegionEvent = event
- self._mostRecentLiveRegionEvent[hash(event.source)] = (event.type, time.time())
return True
def getPageObjectCount(self, obj):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]