[orca] Remove hack around for text issue
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Remove hack around for text issue
- Date: Wed, 24 Jan 2018 17:29:24 +0000 (UTC)
commit ba519001b19f4b047ddb2ceaa7881871e434abd0
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Jan 24 12:28:04 2018 -0500
Remove hack around for text issue
src/orca/scripts/web/script_utilities.py | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index dfbb8e4..a4ccfb6 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -883,6 +883,10 @@ class Utilities(script_utilities.Utilities):
# We can't have nice things.
allText = text.getText(0, -1)
+ if boundary == pyatspi.TEXT_BOUNDARY_CHAR:
+ string = allText[offset]
+ return string, offset, offset + len(string.encode())
+
extents = list(text.getRangeExtents(offset, offset + 1, 0))
def _inThisSpan(span):
@@ -952,14 +956,6 @@ class Utilities(script_utilities.Utilities):
debug.println(debug.LEVEL_INFO, msg, True)
return '', 0, 1
- if boundary == pyatspi.TEXT_BOUNDARY_CHAR:
- string, start, end = text.getText(offset, offset + 1), offset, offset + 1
- s = string.replace(self.EMBEDDED_OBJECT_CHARACTER, "[OBJ]").replace("\n", "\\n")
- msg = "WEB: Results for text at offset %i for %s using %s:\n" \
- " String: '%s', Start: %i, End: %i." % (offset, obj, boundary, s, start, end)
- debug.println(debug.LEVEL_INFO, msg, True)
- return string, start, end
-
if boundary is None:
string, start, end = text.getText(offset, -1), offset, text.characterCount
s = string.replace(self.EMBEDDED_OBJECT_CHARACTER, "[OBJ]").replace("\n", "\\n")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]