[orca] Move handling of showing events for alerts from Gecko code to Web code



commit 88c1ec9e798230010736036321bf6a892578246d
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Feb 18 16:33:31 2020 +0100

    Move handling of showing events for alerts from Gecko code to Web code
    
    Then it will also work with Chromium -- once some Chromium issues are
    fixed.

 src/orca/scripts/toolkits/Gecko/script.py | 6 ------
 src/orca/scripts/web/script.py            | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index b5ffae340..3b99c2a2d 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -271,12 +271,6 @@ class Script(web.Script):
         if super().onShowingChanged(event):
             return
 
-        if event.detail1 and self.utilities.isTopLevelBrowserUIAlert(event.source):
-            msg = "GECKO: Event handled: Presenting event source"
-            debug.println(debug.LEVEL_INFO, msg, True)
-            self.presentObject(event.source)
-            return True
-
         msg = "GECKO: Passing along event to default script"
         debug.println(debug.LEVEL_INFO, msg, True)
         default.Script.onShowingChanged(self, event)
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 923c3a2a0..747360f85 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1999,6 +1999,12 @@ class Script(default.Script):
     def onShowingChanged(self, event):
         """Callback for object:state-changed:showing accessibility events."""
 
+        if event.detail1 and self.utilities.isTopLevelBrowserUIAlert(event.source):
+            msg = "WEB: Event handled: Presenting event source"
+            debug.println(debug.LEVEL_INFO, msg, True)
+            self.presentObject(event.source)
+            return True
+
         if not self.utilities.inDocumentContent(event.source):
             msg = "WEB: Event source is not in document content"
             debug.println(debug.LEVEL_INFO, msg, True)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]