зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
c4baa4f267
Коммит
1dd11c9d1d
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче