[orca] Revert "Try to prevent some chattiness when composing messages in gmail"



commit 3fac960e3b0d0494646344c695627f645beecb76
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Mar 2 23:00:30 2020 +0100

    Revert "Try to prevent some chattiness when composing messages in gmail"
    
    This reverts commit df7202dd4f16d2d0e88474edd0e95b5958aed94e.

 src/orca/scripts/web/script_utilities.py | 8 +++-----
 src/orca/scripts/web/speech_generator.py | 5 -----
 2 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 809783140..2cfcb695e 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4124,11 +4124,9 @@ class Utilities(script_utilities.Utilities):
             debug.println(debug.LEVEL_INFO, msg, True)
             return rv
 
-        hasTextBlockRole = lambda x: x and x.getRole() in self._textBlockElementRoles()
-        if role == pyatspi.ROLE_ENTRY and state.contains(pyatspi.STATE_MULTI_LINE):
-            rv = pyatspi.findDescendant(obj, hasTextBlockRole)
-        elif state.contains(pyatspi.STATE_EDITABLE):
-            rv = hasTextBlockRole(obj) or self.isLink(obj)
+        isTextBlockRole = role in self._textBlockElementRoles() or self.isLink(obj)
+        if state.contains(pyatspi.STATE_EDITABLE):
+            rv = isTextBlockRole
         elif not self.isDocument(obj):
             document = self.getDocumentForObject(obj)
             rv = self.isContentEditableWithEmbeddedObjects(document)
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index 4c1b55031..47e9d89d6 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -315,11 +315,6 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
            and not self._script.utilities.isContentSuggestion(obj):
             return []
 
-        if self._script.utilities.isContentEditableWithEmbeddedObjects(obj):
-            lastKey, mods = self._script.utilities.lastKeyAndModifiers()
-            if lastKey in ["Home", "End", "Up", "Down", "Left", "Right", "Page_Up", "Page_Down"]:
-                return []
-
         if obj.name:
             name = obj.name
             if not self._script.utilities.hasExplicitName(obj):


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