[orca] Fix a regression introduced by incomplete merge of web script
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix a regression introduced by incomplete merge of web script
- Date: Sat, 27 Jun 2015 17:15:51 +0000 (UTC)
commit 5e093739fddd1bf540aa251f64c1f88f5100af70
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sat Jun 27 13:15:02 2015 -0400
Fix a regression introduced by incomplete merge of web script
src/orca/script_utilities.py | 12 ++++++++++++
.../scripts/toolkits/WebKitGtk/script_utilities.py | 2 +-
.../scripts/toolkits/WebKitGtk/speech_generator.py | 5 ++---
3 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index ad88296..8cda3da 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -2431,6 +2431,18 @@ class Utilities:
def getObjectContentsAtOffset(self, obj, offset=0, useCache=True):
return []
+ def previousContext(self, obj=None, offset=-1, skipSpace=False):
+ if not obj:
+ obj, offset = self.getCaretContext()
+
+ return obj, offset - 1
+
+ def nextContext(self, obj=None, offset=-1, skipSpace=False):
+ if not obj:
+ obj, offset = self.getCaretContext()
+
+ return obj, offset + 1
+
@staticmethod
def getHyperlinkRange(obj):
"""Returns the start and end indices associated with the embedded
diff --git a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
index a4aefe3..02064a0 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
@@ -115,7 +115,7 @@ class Utilities(script_utilities.Utilities):
return text
- def getLineContentsAtOffset(self, obj, offset, layoutMode=True):
+ def getLineContentsAtOffset(self, obj, offset, layoutMode=True, useCache=True):
return self.getObjectsFromEOCs(
obj, offset, pyatspi.TEXT_BOUNDARY_LINE_START)
diff --git a/src/orca/scripts/toolkits/WebKitGtk/speech_generator.py
b/src/orca/scripts/toolkits/WebKitGtk/speech_generator.py
index c01e5e4..672adfc 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/speech_generator.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/speech_generator.py
@@ -57,9 +57,8 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
return voice
def _generateLabel(self, obj, **args):
- result = \
- speech_generator.SpeechGenerator._generateLabel(self, obj, **args)
- if result:
+ result = super()._generateLabel(obj, **args)
+ if result or not self._script.utilities.isWebKitGtk(obj):
return result
role = args.get('role', obj.getRole())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]