Bug 357056 Accessible hyperlink startIndex == endIndex == -1 instead of

actual caret offset in parent
patch by Evan.yan at sun.com r=aaronleventhal
This commit is contained in:
ginn.chen%sun.com 2006-10-25 06:06:58 +00:00
Родитель c4baa4f267
Коммит 1dd11c9d1d
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -2752,10 +2752,11 @@ nsresult nsAccessible::GetLinkOffset(PRInt32* aStartOffset, PRInt32* aEndOffset)
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIAccessible> accessible;
nsCOMPtr<nsIAccessible> accessible, nextSibling;
PRInt32 characterCount = 0;
parent->GetFirstChild(getter_AddRefs(accessible));
while (NextChild(accessible)) {
while (accessible) {
if (IsText(accessible)) {
characterCount += TextLength(accessible);
}
@ -2767,6 +2768,8 @@ nsresult nsAccessible::GetLinkOffset(PRInt32* aStartOffset, PRInt32* aEndOffset)
else {
++ characterCount;
}
accessible->GetNextSibling(getter_AddRefs(nextSibling));
accessible.swap(nextSibling);
}
return NS_ERROR_FAILURE;