зеркало из https://github.com/mozilla/pjs.git
Bug 395923. The whole page's contents are repeated inside an anchor with no href. r=evan.yan, a=dsicore
This commit is contained in:
Родитель
4f8174f700
Коммит
7b769473fb
|
@ -226,6 +226,11 @@ 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;
|
||||
}
|
||||
nsIAtom *tag = walkUpContent->Tag();
|
||||
if ((tag == nsAccessibilityAtoms::a || tag == nsAccessibilityAtoms::area) &&
|
||||
walkUpContent->IsNodeOfType(nsINode::eHTML)) {
|
||||
|
@ -242,14 +247,16 @@ void nsLinkableAccessible::CacheActionContent()
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nsAccUtils::HasListener(walkUpContent, NS_LITERAL_STRING("click"))) {
|
||||
if (SameCOMIdentity(mDOMNode, walkUpContent)) {
|
||||
// This is the element that caused the creation of a linkable accessible
|
||||
// Don't let it keep walking up, otherwise we may report the wrong container
|
||||
// as the action node
|
||||
mActionContent = walkUpContent;
|
||||
mIsOnclick = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// nsIAccessibleHyperLink::GetURI()
|
||||
NS_IMETHODIMP nsLinkableAccessible::GetURI(PRInt32 aIndex, nsIURI **aURI)
|
||||
|
|
Загрузка…
Ссылка в новой задаче