mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Fix bug 393802 for HTML links: remove them from the link map when they stop being links due to removeAttribute. r+sr=bz
This commit is contained in:
parent
9e72e6554f
commit
10a4553f65
@ -664,6 +664,10 @@ nsHTMLAnchorElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRBool aNotify)
|
||||
{
|
||||
if (aAttribute == nsGkAtoms::href && kNameSpaceID_None == aNameSpaceID) {
|
||||
nsIDocument* doc = GetCurrentDoc();
|
||||
if (doc) {
|
||||
doc->ForgetLink(this);
|
||||
}
|
||||
SetLinkState(eLinkState_Unknown);
|
||||
}
|
||||
|
||||
|
@ -279,6 +279,14 @@ nsresult
|
||||
nsHTMLAreaElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRBool aNotify)
|
||||
{
|
||||
if (aAttribute == nsGkAtoms::href && kNameSpaceID_None == aNameSpaceID) {
|
||||
nsIDocument* doc = GetCurrentDoc();
|
||||
if (doc) {
|
||||
doc->ForgetLink(this);
|
||||
}
|
||||
SetLinkState(eLinkState_Unknown);
|
||||
}
|
||||
|
||||
if (aAttribute == nsGkAtoms::accesskey &&
|
||||
aNameSpaceID == kNameSpaceID_None) {
|
||||
RegUnRegAccessKey(PR_FALSE);
|
||||
|
@ -322,6 +322,14 @@ nsresult
|
||||
nsHTMLLinkElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRBool aNotify)
|
||||
{
|
||||
if (aAttribute == nsGkAtoms::href && kNameSpaceID_None == aNameSpaceID) {
|
||||
nsIDocument* doc = GetCurrentDoc();
|
||||
if (doc) {
|
||||
doc->ForgetLink(this);
|
||||
}
|
||||
SetLinkState(eLinkState_Unknown);
|
||||
}
|
||||
|
||||
nsresult rv = nsGenericHTMLElement::UnsetAttr(aNameSpaceID, aAttribute,
|
||||
aNotify);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
Loading…
Reference in New Issue
Block a user