[orca] Renable preservation of MathML tree when expanding EOCs
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Renable preservation of MathML tree when expanding EOCs
- Date: Thu, 24 May 2018 02:47:39 +0000 (UTC)
commit 97cbafdefea6b620ba39757bb229ba90f8f639f0
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed May 23 19:45:44 2018 -0700
Renable preservation of MathML tree when expanding EOCs
Add sanity check to ensure we have a tree before trying to preserve it
src/orca/scripts/web/script_utilities.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 5734113..afc7160 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -727,6 +727,9 @@ class Utilities(script_utilities.Utilities):
return [ext.x, ext.y, ext.width, ext.height]
def _preserveTree(self, obj):
+ if not (obj and obj.childCount):
+ return False
+
if self.isMathTopLevel(obj):
return True
@@ -762,7 +765,7 @@ class Utilities(script_utilities.Utilities):
continue
childText = ""
- if True or not self._preserveTree(child):
+ if not self._preserveTree(child):
childText = self.expandEOCs(child)
else:
utterances = self._script.speechGenerator.generateSpeech(child)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]