[orca] Don't treat whitespace-only range extents as suspect even if no size



commit 26b17bcf6b34d6087e8e94f011d3037c111e9227
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Feb 20 20:17:06 2020 +0100

    Don't treat whitespace-only range extents as suspect even if no size
    
    Because sometimes a single newline char gets exposed to us with zero size

 src/orca/scripts/web/script_utilities.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index d52778b51..306cb08d2 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -777,7 +777,8 @@ 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 and result[3] == 0:
+            if result[0] and result[1] and result[2] == 0 and result[3] == 0 \
+               and text.getText(startOffset, endOffset).strip():
                 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]