All users were logged out of Bugzilla on October 13th, 2018

Hypertext::getLinkIndex return value is one off

RESOLVED FIXED

Status

()

RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: parente, Assigned: aaronlev)

Tracking

({access})

Trunk
x86
Linux
access
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

12 years ago
The value returned by getLinkIndex appears to be off by one.

1) Visit http://www.mozilla.org/access/unix/new-atk.html
2) Inspect the html container accessible using at-poke or a similar tool.
3) Notice the first four characters in its accessible text are embed characters.
4) Call Hypertext::getLinkIndex(0) for the first embed character.
5) Note that the at-spi return value is -1. The correct result should be 0.
4) Call Hypertext::getLinkIndex(1) for the second embed character.
6) Note that the at-spi return value is 0. The correct result should be 1.

The complete result of using getLinkIndex for the first four embed characters and the first non-embed character is the following:

char offset: 0  link index: -1
char offset: 1  link index: 0
char offset: 2  link index: 1
char offset: 3  link index: 2
char offset: 4  link index: -1
(Assignee)

Updated

12 years ago
Blocks: 333492
(Assignee)

Comment 1

12 years ago
Created attachment 231787 [details] [diff] [review]
Simple patch
Attachment #231787 - Flags: review?(nian.liu)
(Assignee)

Comment 2

12 years ago
Created attachment 231788 [details] [diff] [review]
Add comment to IDL
Attachment #231787 - Attachment is obsolete: true
Attachment #231788 - Flags: review?(nian.liu)
Attachment #231787 - Flags: review?(nian.liu)
Attachment #231788 - Flags: review?(nian.liu) → review+
(Assignee)

Updated

12 years ago
Keywords: access
(Assignee)

Updated

12 years ago
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Updated

12 years ago
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 3

12 years ago
Created attachment 232718 [details] [diff] [review]
Tested, works. Change < to <=
Attachment #232718 - Flags: review?(pilgrim)
(Assignee)

Updated

12 years ago
Attachment #232718 - Flags: review?(pilgrim) → review?(parente)
(Reporter)

Updated

12 years ago
Attachment #232718 - Flags: review?(parente) → review+
(Assignee)

Updated

12 years ago
Status: REOPENED → RESOLVED
Last Resolved: 12 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.