[orca] Web: Do not skip over blank lines in browse mode for <pre> or <code>
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Web: Do not skip over blank lines in browse mode for <pre> or <code>
- Date: Wed, 6 Jan 2021 12:10:00 +0000 (UTC)
commit b1b4c8d74d81a97814de6f9bfd771327481506bd
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Jan 6 13:08:25 2021 +0100
Web: Do not skip over blank lines in browse mode for <pre> or <code>
In <pre> and <code> blank lines are presumably there for a reason.
Thus skipping over them is a bug.
src/orca/scripts/web/script_utilities.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 1ee44a722..741ce7f67 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1814,12 +1814,13 @@ class Utilities(script_utilities.Utilities):
msg = "WEB: First context on line is: %s, %i" % (firstObj, firstOffset)
debug.println(debug.LEVEL_INFO, msg, True)
- obj, offset = self.previousContext(firstObj, firstOffset, True)
+ skipSpace = not self.elementIsPreformattedText(firstObj)
+ obj, offset = self.previousContext(firstObj, firstOffset, skipSpace)
if not obj and firstObj:
msg = "WEB: Previous context is: %s, %i. Trying again." % (obj, offset)
debug.println(debug.LEVEL_INFO, msg, True)
self.clearCachedObjects()
- obj, offset = self.previousContext(firstObj, firstOffset, True)
+ obj, offset = self.previousContext(firstObj, firstOffset, skipSpace)
msg = "WEB: Previous context is: %s, %i" % (obj, offset)
debug.println(debug.LEVEL_INFO, msg, True)
@@ -1861,12 +1862,13 @@ class Utilities(script_utilities.Utilities):
msg = "WEB: Last context on line is: %s, %i" % (lastObj, lastOffset)
debug.println(debug.LEVEL_INFO, msg, True)
- obj, offset = self.nextContext(lastObj, lastOffset, True)
+ skipSpace = not self.elementIsPreformattedText(lastObj)
+ obj, offset = self.nextContext(lastObj, lastOffset, skipSpace)
if not obj and lastObj:
msg = "WEB: Next context is: %s, %i. Trying again." % (obj, offset)
debug.println(debug.LEVEL_INFO, msg, True)
self.clearCachedObjects()
- obj, offset = self.nextContext(lastObj, lastOffset, True)
+ obj, offset = self.nextContext(lastObj, lastOffset, skipSpace)
msg = "WEB: Next context is: %s, %i" % (obj, offset)
debug.println(debug.LEVEL_INFO, msg, True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]