[orca] Chromium: Remove the hack for the missing hyperlink interface



commit 8ad54a0e899c69b76fc555a4d541c156ff1c091e
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Jul 13 18:19:49 2019 -0400

    Chromium: Remove the hack for the missing hyperlink interface
    
    This hack isn't reliable and introduces regressions. And it was meant to
    be temporary anyway. We'll fix the real problem in Chromium.

 .../scripts/toolkits/Chromium/script_utilities.py  | 22 ----------------------
 1 file changed, 22 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script_utilities.py 
b/src/orca/scripts/toolkits/Chromium/script_utilities.py
index 11fea1a94..fdd2193a9 100644
--- a/src/orca/scripts/toolkits/Chromium/script_utilities.py
+++ b/src/orca/scripts/toolkits/Chromium/script_utilities.py
@@ -333,25 +333,3 @@ class Utilities(web.Utilities):
             msg = "CHROMIUM: HACK: Grabbing focus on %s's ancestor %s" % (obj, link)
             debug.println(debug.LEVEL_INFO, msg, True)
             self.grabFocus(link)
-
-    def getHyperlinkRange(self, obj):
-        """Returns the text range in parent associated with obj."""
-
-        start, end = super().getHyperlinkRange(obj)
-        if (start, end) != (-1, -1):
-            return start, end
-
-        if not (obj.parent and "Text" in pyatspi.listInterfaces(obj.parent)):
-            return start, end
-
-        # At the present time, Chromium is only implementing the hyperlink interface
-        # for actual links. We need that fixed. This hack may or may not be reliable.
-        parentText = obj.parent.queryText().getText(0, -1)
-        eocs = [x.span() for x in re.finditer("\ufffc", parentText)]
-        index = obj.getIndexInParent()
-        if 0 <= index < len(eocs):
-            start, end = eocs[index]
-            msg = "CHROMIUM: HACK: Hyperlink range of %s is (%i,%i)" % (obj, start, end)
-            debug.println(debug.LEVEL_INFO, msg, True)
-
-        return start, end


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