orca r3615 - in trunk: . src/orca
- From: joanied svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r3615 - in trunk: . src/orca
- Date: Wed, 20 Feb 2008 22:39:10 +0000 (GMT)
Author: joanied
Date: Wed Feb 20 22:39:10 2008
New Revision: 3615
URL: http://svn.gnome.org/viewvc/orca?rev=3615&view=rev
Log:
* src/orca/Gecko.py:
Fix for bug #515571 - FF3 form field structural navigation
should handle form fields that are not in forms.
Modified:
trunk/ChangeLog
trunk/src/orca/Gecko.py
Modified: trunk/src/orca/Gecko.py
==============================================================================
--- trunk/src/orca/Gecko.py (original)
+++ trunk/src/orca/Gecko.py Wed Feb 20 22:39:10 2008
@@ -5782,16 +5782,21 @@
def isFormField(self, obj):
"""Returns True if the given object is a field inside of a form."""
- containingForm = self.getAncestor(obj,
- [pyatspi.ROLE_FORM],
- [pyatspi.ROLE_DOCUMENT_FRAME])
- isField = containingForm \
- and not obj.getRole() in [pyatspi.ROLE_LINK,
- pyatspi.ROLE_MENU_ITEM,
- pyatspi.ROLE_LIST_ITEM,
- pyatspi.ROLE_UNKNOWN] \
- and obj.getState().contains(pyatspi.STATE_FOCUSABLE) \
- and obj.getState().contains(pyatspi.STATE_SENSITIVE)
+ if not obj or not self.inDocumentContent(obj):
+ return False
+
+ formRoles = [pyatspi.ROLE_CHECK_BOX,
+ pyatspi.ROLE_RADIO_BUTTON,
+ pyatspi.ROLE_COMBO_BOX,
+ pyatspi.ROLE_LIST,
+ pyatspi.ROLE_ENTRY,
+ pyatspi.ROLE_PASSWORD_TEXT,
+ pyatspi.ROLE_PUSH_BUTTON]
+
+ state = obj.getState()
+ isField = obj.getRole() in formRoles \
+ and state.contains(pyatspi.STATE_FOCUSABLE) \
+ and state.contains(pyatspi.STATE_SENSITIVE)
return isField
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]