[orca] Don't present busy-changed events from pages which have no URI
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't present busy-changed events from pages which have no URI
- Date: Fri, 10 Apr 2020 21:35:20 +0000 (UTC)
commit 661e0a23a216890c9dfb8b46aea26f6e70a346cc
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Apr 10 17:31:44 2020 -0400
Don't present busy-changed events from pages which have no URI
When browsers spew object:state-changed:busy events for documents
with are either zombies and/or lack an obtainable URI we should
ignore these events. A bunch of loading messages without info is
just noise.
src/orca/scripts/web/script.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 6fef561d9..e286a188f 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1341,7 +1341,16 @@ class Script(default.Script):
if not obj or self.utilities.isZombie(obj):
self.utilities.clearCaretContext()
- shouldPresent = self.utilities.isShowingOrVisible(event.source)
+ shouldPresent = True
+ if not self.utilities.isShowingOrVisible(event.source):
+ shouldPresent = False
+ msg = "WEB: Not presenting because source is not showing or visible"
+ debug.println(debug.LEVEL_INFO, msg, True)
+ elif not self.utilities.documentFrameURI(event.source):
+ shouldPresent = False
+ msg = "WEB: Not presenting because source lacks URI"
+ debug.println(debug.LEVEL_INFO, msg, True)
+
if not _settingsManager.getSetting('onlySpeakDisplayedText') and shouldPresent:
if event.detail1:
self.presentMessage(messages.PAGE_LOADING_START)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]