mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 423603 - A elements with no HREF should not have state_linked, regression from bug 421066, patch=marco, aaronlev, r=aaronlev, marco, a=beltzner
This commit is contained in:
parent
74bbe79eb1
commit
009b028516
@ -272,7 +272,8 @@ nsLinkableAccessible::CacheActionContent()
|
||||
GetAccService()->GetAccessibleInWeakShell(walkUpNode, mWeakShell,
|
||||
getter_AddRefs(walkUpAcc));
|
||||
|
||||
if (walkUpAcc && Role(walkUpAcc) == nsIAccessibleRole::ROLE_LINK) {
|
||||
if (walkUpAcc && Role(walkUpAcc) == nsIAccessibleRole::ROLE_LINK &&
|
||||
(State(walkUpAcc) & nsIAccessibleStates::STATE_LINKED)) {
|
||||
mIsLink = PR_TRUE;
|
||||
mActionContent = walkUpContent;
|
||||
return;
|
||||
|
@ -97,12 +97,18 @@ nsHTMLLinkAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
|
||||
*aState |= nsIAccessibleStates::STATE_SELECTABLE;
|
||||
}
|
||||
|
||||
*aState |= nsIAccessibleStates::STATE_LINKED;
|
||||
nsCOMPtr<nsILink> link = do_QueryInterface(mDOMNode);
|
||||
NS_ENSURE_STATE(link);
|
||||
|
||||
nsLinkState linkState;
|
||||
link->GetLinkState(linkState);
|
||||
if (linkState == eLinkState_NotLink) {
|
||||
// This is a named anchor, not a link with also a name attribute. bail out.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*aState |= nsIAccessibleStates::STATE_LINKED;
|
||||
|
||||
if (linkState == eLinkState_Visited)
|
||||
*aState |= nsIAccessibleStates::STATE_TRAVERSED;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user