[orca] Fix regression in presenting a row of links in a navbar



commit ef8e3f9cb2935db2dfc239129deeedb78c9bd49b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Feb 17 19:28:00 2020 +0100

    Fix regression in presenting a row of links in a navbar

 src/orca/scripts/web/script_utilities.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index f91248e94..a46685725 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1539,17 +1539,19 @@ class Utilities(script_utilities.Utilities):
             if xStart == xEnd:
                 return False
 
+            xExtents = self.getExtents(xObj, xStart, xStart + 1)
+
             if obj != xObj:
                 if self.isLandmark(obj) and self.isLandmark(xObj):
                     return False
-                if self.isLink(obj) and self.isLink(xObj) and self.intersectingRegion(xObj, obj):
-                    # This happens with dynamic skip links such as found on Wikipedia.
-                    return False
+                if self.isLink(obj) and self.isLink(xObj):
+                    if abs(extents[0] - xExtents[0]) <= 1 and abs(extents[1] - xExtents[1]) <= 1:
+                        # This happens with dynamic skip links such as found on Wikipedia.
+                        return False
 
             if self.isBlockListDescendant(obj) != self.isBlockListDescendant(xObj):
                 return False
 
-            xExtents = self.getExtents(xObj, xStart, xStart + 1)
             if self.isMathTopLevel(xObj) or self.isMath(obj):
                 onSameLine = self.extentsAreOnSameLine(extents, xExtents, extents[3])
             else:


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