[orca] Detect and attempt to work around yet another Gecko text bug
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Detect and attempt to work around yet another Gecko text bug
- Date: Mon, 9 Jan 2017 15:11:35 +0000 (UTC)
commit e70d5b6cde6f1e88339e266fb4e4f705c27220b5
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Jan 9 10:10:42 2017 -0500
Detect and attempt to work around yet another Gecko text bug
src/orca/scripts/web/script_utilities.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index eab223d..1b8db13 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -951,6 +951,15 @@ class Utilities(script_utilities.Utilities):
% (offset, obj, boundary, s1, start, end)
debug.println(debug.LEVEL_INFO, msg, True)
needSadHack = True
+ elif len(string) < end - start:
+ s1 = string.replace(self.EMBEDDED_OBJECT_CHARACTER, "[OBJ]").replace("\n", "\\n")
+ msg = "FAIL: Bad results for text at offset %i for %s using %s:\n" \
+ " String: '%s', Start: %i, End: %i.\n" \
+ " The bug is that the length of string is less than the text range.\n" \
+ " This very likely needs to be fixed by the toolkit." \
+ % (offset, obj, boundary, s1, start, end)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ needSadHack = True
if needSadHack:
sadString, sadStart, sadEnd = self.__findRange(text, offset, start, end, boundary)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]