Open Bug 433667 Opened 16 years ago Updated 2 years ago

IAText::TextBeforeOffset does not return proper return values with invalid offsets

Categories

(Core :: Disability Access APIs, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: MarcoZ, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: access)

Attachments

(1 file)

When IAText::TextBeforeOffset is called with invalid offset parameters (for example the text "test" with an offset of 0), Firefox returns wrong values. According to Pete Brunet and the IA2 meeting attendees: The return code should be S_FALSE, both out offsets 0, and the out string NULL.   

Pete's result is:
textBeforeOffset using "test" and offset 0: start offset = 0, end offset = 1,617,404,570 , string is "test".  Note: I get various large numbers for the
end offset. 

The other methods are fine.
Marco, our bug is we should return 0 and 0 for offsets?
Yes, 0 and 0 for offsets, and NULL for the string. Currently, if we get the string "test", an offset of 0 into textBefore, we return the string "test", a starting offset of 0, and an arbitrary number for endoffset. The other methods are fine.
Attached file mochitest based test
Marco, please look at mochitest-based test. For every constant and aOffset = 0 I always get 0, 1 and 't'. Can you modify it to reproduce the bug?
Pete, what type of BoundaryType are you passing into the call to get_TextBefore?
I used 1 for WORD.  Alexander might have been using 0 for CHAR.
Depends on: getText*a11y
No longer blocks: 191a11y
No longer blocks: 493354
Blocks: getText*a11y
No longer depends on: getText*a11y
No longer blocks: texta11y
Blocks: ia2
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: