[orca] Refine heuristic identifying author-moved off-screen, likely-broken text



commit 0a51bad3182882bd5cb4bee45ecad4cf5dd29c06
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Aug 14 09:30:15 2019 -0400

    Refine heuristic identifying author-moved off-screen, likely-broken text

 src/orca/scripts/web/script_utilities.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 0d9f9a0ae..89222dce2 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2661,8 +2661,8 @@ class Utilities(script_utilities.Utilities):
         rv = False
         if self.isTextBlockElement(obj):
             x, y, width, height = self.getExtents(obj, 0, -1)
-            if x < 0 or y < 0:
-                msg = "WEB: %s is off-screen text block (%i, %i)" % (obj, x, y)
+            if (x < 0 and x + width < 0) or (y < 0 and y + height < 0):
+                msg = "WEB: %s is off-screen text block (%i, %i)(%i x %i)" % (obj, x, y, width, height)
                 debug.println(debug.LEVEL_INFO, msg, True)
                 rv = True
             elif width == 1 or height == 1:
@@ -2684,8 +2684,8 @@ class Utilities(script_utilities.Utilities):
         rv = False
         if self.isLink(obj):
             x, y, width, height = self.getExtents(obj, 0, -1)
-            if x < 0 or y < 0:
-                msg = "WEB: %s is off-screen link (%i, %i)" % (obj, x, y)
+            if (x < 0 and x + width < 0) or (y < 0 and y + height < 0):
+                msg = "WEB: %s is off-screen link (%i, %i)(%i x %i)" % (obj, x, y, width, height)
                 debug.println(debug.LEVEL_INFO, msg, True)
                 rv = True
             elif width == 1 or height == 1:


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