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