[orca] Only treat range extents as suspect if they have zero size



commit 2981ede63b538a07cc8f25692a749747c735773d
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Feb 20 18:47:11 2020 +0100

    Only treat range extents as suspect if they have zero size
    
    Newline chars are sometimes exposed to us with 0 width but have a height.

 src/orca/scripts/web/script_utilities.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 8442b62a2..d52778b51 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -777,7 +777,7 @@ class Utilities(script_utilities.Utilities):
             debug.println(debug.LEVEL_INFO, msg, True)
             return [0, 0, 0, 0]
         else:
-            if result[0] and result[1] and (result[2] == 0 or result[3] == 0):
+            if result[0] and result[1] and result[2] == 0 and result[3] == 0:
                 msg = "WEB: Suspected bogus range extents for %s (chars: %i, %i): %s" % \
                     (obj, startOffset, endOffset, result)
                 debug.println(debug.LEVEL_INFO, msg, True)


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