Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a2pre) Gecko/20070102 Minefield/3.0a2pre There was some discussion a while back about implementing the hyperlink interface on embedded objects to find their start/end offset within a hypertext parent. With atk-1.12.2, I can query to the IDL:Accessibility/HyperlinkImpl:1.0 interface, but startIndex and endIndex both return -1 in all cases I've tried. Furthermore, getObject(n) returns None and getURI(n) returns an empty string. Is this interface not implemented or is it now in existence but not working properly? My test page was http://www.mozilla.org/projects/minefield/
Assignee: aaronleventhal → nian.liu
Created attachment 250422 [details] [diff] [review] patch for getURI 1.test with my local build is that getIndex, getObject works fine while getURI doesn't work. my local build is a little messed up with patches of at-poke, at-spi and atk. parente, what's your build of these? 2.rewrite getUriCB
Created attachment 250442 [details] [diff] [review] patch for getURI v2 1)thanks ginn for pointing out the g_strdup issue 2)there is memory leak for the use of new MaiHyperlink. and will be fixed in another patch. thanks ginn again here. 3)is there any cache mechanism which i can refer to?
Attachment #250442 - Flags: review?(ginn.chen)
Nian: atk-1.12.2-1.fc6 atk-devel-1.12.2-1.fc6 at-spi-1.7.11-2.fc6 at-spi-devel-1.7.11-2.fc6 at-poke-0.2.3-40 What versions do you have? What interface should I be querying for in at-spi?
memory leak bug is traced with bug 366000
(In reply to comment #3) > Nian: > > atk-1.12.2-1.fc6 > atk-devel-1.12.2-1.fc6 > at-spi-1.7.11-2.fc6 > at-spi-devel-1.7.11-2.fc6 > at-poke-0.2.3-40 > > What versions do you have? What interface should I be querying for in at-spi? > seems same with atk and at-spi. my at-poke is 0.2.2 with local patch. the interface i query is IDL:Accessibility/Hyperlink:1.0, i add below code in update_if_hyperlink in poke.c long start_index, end_index; AccessibleHyperlink_getIndexRange(hyperlink, &start_index, &end_index); printf("start index is %ld, end index is %ld\n", start_index, end_index); char* uri; uri = AccessibleHyperlink_getURI(hyperlink, 0); printf("uri is %s\n", uri); Accessible* object; object = AccessibleHyperlink_getObject(hyperlink, 0); if (object) printf("object is not null\n"); all the index is correct, uri is correct with the patch, ojbect is not null.
Fix committed. Feel free to reopen it, if it still not work.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
I'm still seeing startIndex == -1, endIndex == -1, and getURI() == '' in Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a3pre) Gecko/20070223 Minefield/3.0a3pre. I'm testing using accerciser 0.1.0 with at-spi-1.7.11-2.fc6 and atk-1.12.2-1.fc6.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I should note that accerciser is using AT-SPI through ORBit instead of using the cspi wrapper. Really, this should be a more direct route to the information so I'm not sure how you're seeing valid information and I'm not. I'm attaching the test page I'm using too. Try the get startIndex, endIndex, and URI for the first link in the list.
pls. try my test case and tell me the result.
I get the same result on your page as on mine. I'm not sure what else could possibly be different between our setups. Does Orca make use of the startIndex and endIndex hyperlink information? If so, does the bug manifest in Orca?
any chance to test it on your machine with at-poke? i guess it may a bug of accerciser
We worked around it by creating a getCharacterOffsetInParent method in Orca that finds the character offset of the link in its parent's text. Here's a comment: # [[[TODO: WDW - HACK to handle the fact that # hyperlink.startIndex and hyperlink.endIndex is broken in the # Gecko a11y implementation. This will hopefully be fixed. # If it is, one should be able to use hyperlink.startIndex.]]] I guess I forgot to file a bug on this one (I usually include the bug numbers in our HACK comments). I'm guessing maybe it was yet another crunch time for us.
Yep. We've got the exact same hack in LSR. That's why I'm looking to get it fixed. But I can't figure out why Nian says it works for him with the same version of AT-SPI, atk, and FF3 that I have. Will, can you verify that it's still broken with your Orca atspi.py?
Sometimes think Neo has magic pixie dust that makes problems disappear for her and not me. :-) But, this is not one of those cases: I have the magic pixie dust, too. I just did a check and it seems to be working for me.
Ha! OK. So some library I've got is backlevel because it even fails for me in a plain old Python script using AT-SPI directly through pyORBit. Thanks for the help. Go ahead and close. I promise not to reopen again. :)
Status: REOPENED → RESOLVED
Last Resolved: 12 years ago → 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.