After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 469686 - Sanity check needed in gecko.getHeadingLevel/getNodeLevel
Sanity check needed in gecko.getHeadingLevel/getNodeLevel
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Orca Maintainers
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-23 19:04 UTC by Scott Haeger
Modified: 2007-08-30 17:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first version of Sanity check needed in gecko.getHeadingLevel/getNodeLevel (787 bytes, patch)
2007-08-23 19:10 UTC, Scott Haeger
none Details | Review
second patch for Sanity check needed in gecko.getHeadingLevel/getNodeLevel (1.04 KB, patch)
2007-08-23 19:32 UTC, Scott Haeger
accepted-commit_now Details | Review

Description Scott Haeger 2007-08-23 19:04:02 UTC
gecko.getHeadingLevel() and gecko.getNodeLevel() do not check for cases where obj.attributes is None.  As a result, there is no output when obj.attributes is None.  http://www.brailcom.org/~pdm/test.xul illustrates the problem.  I am certain that this fix needs to go in, but I am confused as to why I am getting no attributes.  According to Accerciser, each of the four objects on the test page has a object.  Is Firefox recreating an object for us?  There are also other problems with this page, but I have not identified the source of the problem(s) yet.  Some peculiarities with the page include the second label not being output and the buttons not implementing IText.  Patch for this problem to follow soon.
Comment 1 Scott Haeger 2007-08-23 19:10:09 UTC
Created attachment 94211 [details] [review]
first version of Sanity check needed in gecko.getHeadingLevel/getNodeLevel

first patch
Comment 2 Scott Haeger 2007-08-23 19:32:52 UTC
Created attachment 94214 [details] [review]
second patch for Sanity check needed in gecko.getHeadingLevel/getNodeLevel

This second patch also tests if the object is None.  This is a test that certainly should be in place, but why is it needed?
Comment 3 Joanmarie Diggs (IRC: joanie) 2007-08-23 19:49:37 UTC
Looking at orca.py's setLocusOfFocus(), it seems we do some checks and set the old and/or new locusOfFocus to None:

    oldLocusOfFocus = orca_state.locusOfFocus
    if oldLocusOfFocus and not oldLocusOfFocus.valid:
        oldLocusOfFocus = None

    orca_state.locusOfFocus = obj
    if orca_state.locusOfFocus and not orca_state.locusOfFocus.valid:
        orca_state.locusOfFocus = None

Not sure why the obj.valid is failing though -- assuming it's failing there and not somewhere else. (Haven't actually debugged anything; merely looking at the code).
Comment 4 Scott Haeger 2007-08-23 21:00:52 UTC
I believe one of the problems with this test page is due to 'document frame' being an 'embedded component'.  A new bug is posted here http://bugzilla.gnome.org/show_bug.cgi?id=469718
Comment 5 Willie Walker 2007-08-30 16:09:55 UTC
This patch looks good, and we've noticed the problem in bug 462883.  Please commit to gnome-2-20 branch and trunk.
Comment 6 Scott Haeger 2007-08-30 17:22:41 UTC
Committed to both trunk and gnome-2-20.  Please note that getNodeLevel() was an ARIA only addition so the getNodeLevel() fix only appears in trunk.