Closed Bug 357625 Opened 18 years ago Closed 18 years ago

getTextAtOffset doesn't seem to work well with text with <br> in it

Categories

(Core :: Disability Access APIs, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: wwalker, Assigned: aaronlev)

References

Details

(Keywords: access)

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20061016 Minefield/3.0a1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20061016 Minefield/3.0a1

I did a search and saw a similar problem in bug 349909 https://bugzilla.mozilla.org/show_bug.cgi?id=349909.  It was marked as fixed, but I either don't have the fix in my version from Oct 16 (the ftp site is down for me to be able to get the latest nightly) or a different bug still exists.  


Reproducible: Always

Steps to Reproduce:
1. Open the attached URL as the only content in firefox (i.e., don't open any other tabs)
2. Run the attached standalone app
3. Turn on caret navigation and arrow up/down in the content (the caret is just a way to trigger the analysis code in the standalone app).



Actual Results:  
Text (len=304): 1This sentence is in Comic Sans MSl font.
2This sentence is in Courier New Font.
3This sentence is in Garamondl font.
4This sentence is in Impact font.
5This sentence is in Lucida Console font.
6This sentence is in Sydnie font.
7This sentence is in Tahoma font.
8This sentence is in Times New Roman font.
CHAR AT OFFSET 0: '1'
LINE AT OFFSET 0: (0:41) 1This sentence is in Comic Sans MSl font.
CHAR AT OFFSET 41: '
'
CHAR AT OFFSET 42: '2'
LINE AT OFFSET 42: (0:41) 1This sentence is in Comic Sans MSl font.
END OFFSET < OFFSET!!!!


Expected Results:  
The getTextAtOffset for a line at character 42 should not be for the text range (0:41).  In this case, it should start at 42.
Keywords: access, sec508
Component: Disability Access → General
Product: Firefox → Core
QA Contact: disability.access → general
Version: unspecified → Trunk
The last component change looks like an error.
Assignee: nobody → aaronleventhal
Component: General → Disability Access APIs
QA Contact: general → accessibility-apis
Blocks: newatk
Using TEXT_BOUNDARY_LINE_START
We should be getting 0,42 for the first line, and 42, whatever for the second line. Right?
Correct!  In the output, you'll see that character 42 is '2', which is the beginning of the next line. Thanks!
Attachment #244487 - Flags: review?(ginn.chen) → review+
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: