bug 395923. The whole page is repeated in a single node following the ordered list with 8 items on this page. Correct fix that doesn't change role for links with onclicks. r=surkov, a=dsicore

This commit is contained in:
aaronleventhal@moonset.net 2007-10-06 09:52:04 -07:00
Родитель 12985bbd4a
Коммит 33d7f33147
1 изменённых файлов: 7 добавлений и 5 удалений

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

@ -226,11 +226,7 @@ void nsLinkableAccessible::CacheActionContent()
for (nsCOMPtr<nsIContent> walkUpContent(do_QueryInterface(mDOMNode));
walkUpContent;
walkUpContent = walkUpContent->GetParent()) {
if (nsAccUtils::HasListener(walkUpContent, NS_LITERAL_STRING("click"))) {
mActionContent = walkUpContent;
mIsOnclick = PR_TRUE;
break;
}
PRBool isOnclick = nsAccUtils::HasListener(walkUpContent, NS_LITERAL_STRING("click"));
nsIAtom *tag = walkUpContent->Tag();
if ((tag == nsAccessibilityAtoms::a || tag == nsAccessibilityAtoms::area) &&
walkUpContent->IsNodeOfType(nsINode::eHTML)) {
@ -252,9 +248,15 @@ void nsLinkableAccessible::CacheActionContent()
// Don't let it keep walking up, otherwise we may report the wrong container
// as the action node
mActionContent = walkUpContent;
mIsOnclick = isOnclick;
break;
}
}
if (isOnclick) {
mActionContent = walkUpContent;
mIsOnclick = PR_TRUE;
break;
}
}
}