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

NEW
Unassigned

Status

()

Core
Disability Access APIs
10 years ago
4 years ago

People

(Reporter: MarcoZ, Unassigned)

Tracking

(Blocks: 2 bugs, {access})

Trunk
x86
Windows XP
access
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
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.

Comment 1

10 years ago
Marco, our bug is we should return 0 and 0 for offsets?
(Reporter)

Comment 2

10 years ago
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.

Comment 3

10 years ago
Created attachment 321019 [details]
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?
(Reporter)

Comment 4

10 years ago
Pete, what type of BoundaryType are you passing into the call to get_TextBefore?

Comment 5

10 years ago
I used 1 for WORD.  Alexander might have been using 0 for CHAR.
Blocks: 493354

Updated

7 years ago
Depends on: 613857

Updated

7 years ago
Blocks: 368895

Updated

6 years ago
No longer blocks: 391535

Updated

5 years ago
No longer blocks: 493354

Updated

5 years ago
Blocks: 613857
No longer depends on: 613857

Updated

5 years ago
No longer blocks: 368895

Updated

5 years ago
Blocks: 368873
You need to log in before you can comment on or make changes to this bug.