[orca] Ensure we do not clear cache on non-chromium windows in chromium script
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Ensure we do not clear cache on non-chromium windows in chromium script
- Date: Wed, 18 Mar 2020 18:31:42 +0000 (UTC)
commit b300f8ec16c9cd46fd4e49ac23b9558814cc5788
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Mar 18 14:27:36 2020 -0400
Ensure we do not clear cache on non-chromium windows in chromium script
src/orca/scripts/toolkits/Chromium/script_utilities.py | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script_utilities.py
b/src/orca/scripts/toolkits/Chromium/script_utilities.py
index 380c279d3..62dbb8c65 100644
--- a/src/orca/scripts/toolkits/Chromium/script_utilities.py
+++ b/src/orca/scripts/toolkits/Chromium/script_utilities.py
@@ -527,11 +527,16 @@ class Utilities(web.Utilities):
if super()._isActiveAndShowingAndNotIconified(obj):
return True
+ if obj and obj.getApplication() != self._script.app:
+ return False
+
# FIXME: This can potentially be non-performant because AT-SPI2 will recursively
# clear the cache of all descendants. This is an attempt to work around what may
# be a lack of window:activate and object:state-changed events from Chromium
# windows in at least some environments.
try:
+ msg = "CHROMIUM: Clearing cache for %s" % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
obj.clearCache()
except:
msg = "CHROMIUM: Exception clearing cache for %s" % obj
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]