Closed
Bug 391991
Opened 17 years ago
Closed 17 years ago
getCharacterExtents() is returning (0, 0, 0, 0) for text that is not on the first line of an HTML object.
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jdiggs, Assigned: ginnchen+exoracle)
References
(Blocks 1 open bug)
Details
(Keywords: access)
Attachments
(2 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
aaronlev
:
review+
damons
:
approval1.9+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Open the attached test case.
2. Resize the window to force some of the text in the paragraphs to wrap onto subsequent lines.
3. Within Accerciser, select a paragraph in the test case
4. Type the following in the iPython console:
text=acc.queryText()
[[text.getText(i, i+1), text.getCharacterExtents(i, 0) for i in range(text.characterCount)]
Expected results: Valid extents would be returned for all of the characters in the paragraph.
Actual results: Valid extents are returned only for the characters that are displayed on the first line of the paragraph. Characters that appear on subsequent lines within the paragraph will have reported extents of (0, 0, 0, 0).
This bug seems to have been introduced in the August 4th build. Another regression of the fix to bug 348901??
the command in step 4 should be
[[text.getText(i, i+1), text.getCharacterExtents(i, 0)] for i in range(text.characterCount)]
We failed at
#0 nsContinuingTextFrame::GetRenderedText (this=0xafb7fa8c, aString=0x0,
aSkipChars=0xbfa477b8, aSkipIter=0xbfa4779c, aSkippedStartOffset=0,
aSkippedMaxLength=100) at nsTextFrameThebes.cpp:3275
#1 0xb62e1d61 in nsHyperTextAccessible::RenderedToContentOffset (
aFrame=0xafb7fa8c, aRenderedOffset=100, aContentOffset=0xbfa47864)
at nsHyperTextAccessible.cpp:1485
#2 0xb62e544a in nsHyperTextAccessible::GetBoundsForString (this=0x95e6318,
aFrame=0xafb7fa8c, aStartRenderedOffset=100, aEndRenderedOffset=101)
at nsHyperTextAccessible.cpp:235
#3 0xb62e5dcf in nsHyperTextAccessible::GetPosAndText (this=0x95e6318,
aStartOffset=@0xbfa47a24, aEndOffset=@0xbfa47a28, aText=0x0,
aEndFrame=0xbfa47a00, aBoundsRect=0xbfa479d4)
at nsHyperTextAccessible.cpp:380
#4 0xb62e66a7 in nsHyperTextAccessible::GetRangeExtents (this=0x95e6318,
aStartOffset=100, aEndOffset=101, aX=0xbfa47a84, aY=0xbfa47a88,
aWidth=0xbfa47a80, aHeight=0xbfa47a7c, aCoordType=0)
at nsHyperTextAccessible.cpp:921
#5 0xb62e1c5a in nsHyperTextAccessible::GetCharacterExtents (this=0x95e6318,
aOffset=100, aX=0xbfa47a84, aY=0xbfa47a88, aWidth=0xbfa47a80,
aHeight=0xbfa47a7c, aCoordType=0) at nsHyperTextAccessible.cpp:908
because
3270 virtual nsresult GetRenderedText(nsAString* aString = nsnull,
3271 gfxSkipChars* aSkipChars = nsnull,
3272 gfxSkipCharsIterator* aSkipIter = nsnull,
3273 PRUint32 aSkippedStartOffset = 0,
3274 PRUint32 aSkippedMaxLength = PR_UINT32_MAX)
3275 { return NS_ERROR_NOT_IMPLEMENTED; } // Call on a primary text frame only
use primary frame for GetBoundsForString
also fix lines exceed 80 chars in this function
it's hard to read the code
Assignee: aaronleventhal → ginn.chen
Status: NEW → ASSIGNED
Attachment #276460 -
Flags: review?(aaronleventhal)
Updated•17 years ago
|
Attachment #276460 -
Flags: review?(aaronleventhal)
Attachment #276460 -
Flags: review+
Attachment #276460 -
Flags: approval1.9?
Updated•17 years ago
|
Attachment #276460 -
Flags: approval1.9? → approval1.9+
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•