[orca] Prevent descent into elements which should be treated as a whole
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Prevent descent into elements which should be treated as a whole
- Date: Thu, 5 Jul 2018 20:13:37 +0000 (UTC)
commit 74aaa8456264aaa5bf77197bdab26423b38be8d9
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Jul 5 16:12:11 2018 -0400
Prevent descent into elements which should be treated as a whole
src/orca/scripts/web/script_utilities.py | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index c982e4a4f..f6bedec9f 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -857,6 +857,9 @@ class Utilities(script_utilities.Utilities):
if not characterCount:
rv = None
+ if self._treatTextObjectAsWhole(obj):
+ rv = None
+
if not self.isLiveRegion(obj):
doNotQuery = [pyatspi.ROLE_TABLE_ROW,
pyatspi.ROLE_TOOL_BAR]
@@ -3598,6 +3601,8 @@ class Utilities(script_utilities.Utilities):
allText = text.getText(0, -1)
for i in range(offset + 1, len(allText)):
child = self.getChildAtOffset(obj, i)
+ if child and self._treatTextObjectAsWhole(child):
+ return child, 0
if child and not self.isZombie(child) and not self.isEmptyAnchor(child) \
and not self.isUselessImage(child):
return self.findNextCaretInOrder(child, -1)
@@ -3662,6 +3667,8 @@ class Utilities(script_utilities.Utilities):
offset = len(allText)
for i in range(offset - 1, -1, -1):
child = self.getChildAtOffset(obj, i)
+ if child and self._treatTextObjectAsWhole(child):
+ return child, 0
if child and not self.isZombie(child) and not self.isEmptyAnchor(child) \
and not self.isUselessImage(child):
return self.findPreviousCaretInOrder(child, -1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]