Closed
Bug 493354
Opened 15 years ago
Closed 11 years ago
Incorrect results returned by getTextBeforeOffset
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: jdiggs, Unassigned)
References
(Blocks 2 open bugs)
Details
(Keywords: access)
Attachments
(1 file)
(deleted),
text/html
|
Details |
Steps to reproduce:
1. Load the attached test case.
2. In Accerciser, select the accessible associated with the text object from the tree on the left.
3. In Accerciser's IPython Console, use getTextBeforeOffset to obtain the word and the character at any specified offset within the text.
Expected results: A string of the specified boundary type (i.e. word or character) would be returned along with the correct start and end offsets for that string. For example: ('silly ', 17, 23) or ('s', 17, 18).
Actual results: The start offset appears to be correct, but the string and end offset are bogus:
In [1]:text = acc.queryText()
In [2]:for i in range(text.characterCount): text.getTextBeforeOffset(i, TEXT_BOUNDARY_WORD_START)
Out[2]: ('This is another, silly test. ', 0, -39238599)
Out[2]: ('This is another, silly test. ', 0, -39238599)
Out[2]: ('This is another, silly test. ', 0, -39238599)
Out[2]: ('This is another, silly test. ', 0, -39238599)
Out[2]: ('This is another, silly test. ', 0, -39238599)
Out[2]: ('This is another, silly test. ', 0, -39238599)
Out[2]: ('is another, silly test. ', 5, -39238599)
Out[2]: ('is another, silly test. ', 5, -39238599)
Out[2]: ('is another, silly test. ', 5, -39238599)
Out[2]: ('another, silly test. ', 8, -39238599)
Out[2]: ('another, silly test. ', 8, -39238599)
Out[2]: ('another, silly test. ', 8, -39238599)
Out[2]: ('another, silly test. ', 8, -39238599)
Out[2]: ('another, silly test. ', 8, -39238599)
Out[2]: ('another, silly test. ', 8, -39238599)
Out[2]: ('another, silly test. ', 8, -39238599)
Out[2]: ('another, silly test. ', 8, -39238599)
Out[2]: ('another, silly test. ', 8, -39238599)
Out[2]: ('silly test. ', 17, -39238599)
Out[2]: ('silly test. ', 17, -39238599)
Out[2]: ('silly test. ', 17, -39238599)
Out[2]: ('silly test. ', 17, -39238599)
Out[2]: ('silly test. ', 17, -39238599)
Out[2]: ('silly test. ', 17, -39238599)
Out[2]: ('test. ', 23, -39238599)
Out[2]: ('test. ', 23, -39238599)
Out[2]: ('test. ', 23, -39238599)
Out[2]: ('test. ', 23, -39238599)
Out[2]: ('test. ', 23, -39238599)
In [3]:for i in range(text.characterCount): text.getTextBeforeOffset(i, TEXT_BOUNDARY_CHAR)
Out[3]: ('This is another, silly test. ', 0, -39238599)
Out[3]: ('This is another, silly test. ', 0, -39238599)
Out[3]: ('his is another, silly test. ', 1, -39238599)
Out[3]: ('is is another, silly test. ', 2, -39238599)
Out[3]: ('s is another, silly test. ', 3, -39238599)
Out[3]: (' is another, silly test. ', 4, -39238599)
Out[3]: ('is another, silly test. ', 5, -39238599)
Out[3]: ('s another, silly test. ', 6, -39238599)
Out[3]: (' another, silly test. ', 7, -39238599)
Out[3]: ('another, silly test. ', 8, -39238599)
Out[3]: ('nother, silly test. ', 9, -39238599)
Out[3]: ('other, silly test. ', 10, -39238599)
Out[3]: ('ther, silly test. ', 11, -39238599)
Out[3]: ('her, silly test. ', 12, -39238599)
Out[3]: ('er, silly test. ', 13, -39238599)
Out[3]: ('r, silly test. ', 14, -39238599)
Out[3]: (', silly test. ', 15, -39238599)
Out[3]: (' silly test. ', 16, -39238599)
Out[3]: ('silly test. ', 17, -39238599)
Out[3]: ('illy test. ', 18, -39238599)
Out[3]: ('lly test. ', 19, -39238599)
Out[3]: ('ly test. ', 20, -39238599)
Out[3]: ('y test. ', 21, -39238599)
Out[3]: (' test. ', 22, -39238599)
Out[3]: ('test. ', 23, -39238599)
Out[3]: ('est. ', 24, -39238599)
Out[3]: ('st. ', 25, -39238599)
Out[3]: ('t. ', 26, -39238599)
Out[3]: ('. ', 27, -39238599)
Comment 1•15 years ago
|
||
This is probably a dupe of bug 433667, but I'm marking 433667 a dependancy until we are sure. Besides, this is a great report. Thanks Joanmarie. Is this bug causing lots of pain? (Feel free to tweak Importance fields)
Depends on: 433667
Comment 2•14 years ago
|
||
Just to be sure. The proper output should be something like:
- for TEXT_BOUNDARY_WORD_START
Out[5]: ('', 0, 0)
Out[5]: ('', 0, 0)
Out[5]: ('', 0, 0)
Out[5]: ('', 0, 0)
Out[5]: ('', 0, 0)
Out[5]: ('This ', 0, 5)
Out[5]: ('This ', 0, 5)
Out[5]: ('This ', 0, 5)
Out[5]: ('is ', 5, 8)
Out[5]: ('is ', 5, 8)
Out[5]: ('is ', 5, 8)
Out[5]: ('is ', 5, 8)
Out[5]: ('is ', 5, 8)
Out[5]: ('is ', 5, 8)
Out[5]: ('is ', 5, 8)
Out[5]: ('is ', 5, 8)
Out[5]: ('is ', 5, 8)
Out[5]: ('another, ', 8, 17)
Out[5]: ('another, ', 8, 17)
Out[5]: ('another, ', 8, 17)
Out[5]: ('another, ', 8, 17)
Out[5]: ('another, ', 8, 17)
Out[5]: ('another, ', 8, 17)
Out[5]: ('silly ', 17, 23)
Out[5]: ('silly ', 17, 23)
Out[5]: ('silly ', 17, 23)
Out[5]: ('silly ', 17, 23)
Out[5]: ('silly ', 17, 23)
Out[5]: ('silly ', 17, 23)
- for TEXT_BOUNDARY_CHAR:
Out[6]: ('', 0, 0)
Out[6]: ('T', 0, 1)
Out[6]: ('h', 1, 2)
Out[6]: ('i', 2, 3)
Out[6]: ('s', 3, 4)
Out[6]: (' ', 4, 5)
Out[6]: ('i', 5, 6)
Out[6]: ('s', 6, 7)
Out[6]: (' ', 7, 8)
Out[6]: ('a', 8, 9)
Out[6]: ('n', 9, 10)
Out[6]: ('o', 10, 11)
Out[6]: ('t', 11, 12)
Out[6]: ('h', 12, 13)
Out[6]: ('e', 13, 14)
Out[6]: ('r', 14, 15)
Out[6]: (',', 15, 16)
Out[6]: (' ', 16, 17)
Out[6]: ('s', 17, 18)
Out[6]: ('i', 18, 19)
Out[6]: ('l', 19, 20)
Out[6]: ('l', 20, 21)
Out[6]: ('y', 21, 22)
Out[6]: (' ', 22, 23)
Out[6]: ('t', 23, 24)
Out[6]: ('e', 24, 25)
Out[6]: ('s', 25, 26)
Out[6]: ('t', 26, 27)
Out[6]: ('.', 27, 28)
Updated•12 years ago
|
Blocks: getText*a11y
No longer depends on: 433667
Comment 3•11 years ago
|
||
all blocking were fixed (moz24), marking this one as fixed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•