[orca/gnome-3-34] Use the simplified expandEOCs in the web script
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-34] Use the simplified expandEOCs in the web script
- Date: Thu, 26 Sep 2019 12:38:47 +0000 (UTC)
commit addb55592097c06a7f9f4577a8c8ffa93e0efc03
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Sep 26 14:37:04 2019 +0200
Use the simplified expandEOCs in the web script
src/orca/scripts/web/script_utilities.py | 25 +------------------------
1 file changed, 1 insertion(+), 24 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index e265c4e5c..d9e3dee17 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -877,30 +877,7 @@ class Utilities(script_utilities.Utilities):
utterances = self._script.speechGenerator.generateSpeech(obj)
return self._script.speechGenerator.utterancesToString(utterances)
- string = text.getText(startOffset, endOffset)
- if self.EMBEDDED_OBJECT_CHARACTER in string:
- # If we're not getting the full text of this object, but
- # rather a substring, we need to figure out the offset of
- # the first child within this substring.
- childOffset = 0
- for child in obj:
- if self.characterOffsetInParent(child) >= startOffset:
- break
- childOffset += 1
-
- toBuild = list(string)
- count = toBuild.count(self.EMBEDDED_OBJECT_CHARACTER)
- for i in range(count):
- try:
- child = obj[i + childOffset]
- except:
- continue
- index = toBuild.index(self.EMBEDDED_OBJECT_CHARACTER)
- toBuild[index] = "%s " % self.expandEOCs(child)
-
- string = "".join(toBuild).strip()
-
- return string
+ return super().expandEOCs(obj, startOffset, endOffset).strip()
def substring(self, obj, startOffset, endOffset):
if not self.inDocumentContent(obj):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]