[orca] Fix for bug #640377 - Structural navigation sometimes fails to work with WebKitGtk content
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug #640377 - Structural navigation sometimes fails to work with WebKitGtk content
- Date: Mon, 24 Jan 2011 06:38:57 +0000 (UTC)
commit ca276073f3cfdf5b34eb4ea115f0563d1f65660f
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Mon Jan 24 01:34:11 2011 -0500
Fix for bug #640377 - Structural navigation sometimes fails to work with WebKitGtk content
src/orca/structural_navigation.py | 26 +++++---------------------
1 files changed, 5 insertions(+), 21 deletions(-)
---
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index cc99609..0c352e6 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -1244,28 +1244,12 @@ class StructuralNavigation:
interest is contained.
"""
- # This is script-specific and will need to be defined in the
- # script's custom StructuralNavigation class. But if this
- # method does nothing, pylint complains. So... We might as
- # well take a guess for a generic version to make pylint
- # happy. :-) In some initial experimentation with OOo, this
- # method seemed to reliably return the child of the document
- # view, so it might not be too far off. It's also being
- # overridden by Gecko, so one should feel free to modify this
- # one.
- #
- obj = self.getCurrentObject()
- lastTextObj = obj
- while obj and obj.getRole() != pyatspi.ROLE_FRAME:
- try:
- obj.queryText()
- except:
- pass
- else:
- lastTextObj = obj
- obj = obj.parent
+ docRoles = [pyatspi.ROLE_DOCUMENT_FRAME]
+ stopRoles = [pyatspi.ROLE_FRAME, pyatspi.ROLE_SCROLL_PANE]
+ document = self._script.utilities.ancestorWithRole(
+ orca_state.locusOfFocus, docRoles, stopRoles)
- return lastTextObj
+ return document
def _isInDocument(self, obj):
"""Returns True if the accessible object obj is inside of
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]