Bug 515494 - Remove xlink support in nsGenericElement

r=sicking
sr=jst
This commit is contained in:
Shawn Wilsher
2009-09-11 09:38:36 -07:00
parent 8f9cdde969
commit b39d7e62b9
5 changed files with 119 additions and 24 deletions

View File

@@ -2694,10 +2694,6 @@ nsGenericElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
// anonymous content that the document is changing.
document->BindingManager()->ChangeDocumentFor(this, document, nsnull);
if (HasAttr(kNameSpaceID_XLink, nsGkAtoms::href)) {
document->ForgetLink(this);
}
document->ClearBoxObjectFor(this);
}
@@ -4307,20 +4303,6 @@ nsGenericElement::SetAttr(PRInt32 aNamespaceID, nsIAtom* aName,
NS_ASSERTION(aNamespaceID != kNameSpaceID_Unknown,
"Don't call SetAttr with unknown namespace");
nsIDocument* doc = GetCurrentDoc();
if (kNameSpaceID_XLink == aNamespaceID && nsGkAtoms::href == aName) {
// XLink URI(s) might be changing. Drop the link from the map. If it
// is still style relevant it will be re-added by
// nsStyleUtil::IsLink. Make sure to keep the style system
// consistent so this remains true! In particular if the style system
// were to get smarter and not restyling an XLink element if the href
// doesn't change in a "significant" way, we'd need to do the same
// significance check here.
if (doc) {
doc->ForgetLink(this);
}
}
nsAutoString oldValue;
PRBool modification = PR_FALSE;
PRBool hasListeners = aNotify &&
@@ -4635,12 +4617,6 @@ nsGenericElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIDOMMutationEvent::REMOVAL);
}
if (document && kNameSpaceID_XLink == aNameSpaceID &&
nsGkAtoms::href == aName) {
// XLink URI might be changing.
document->ForgetLink(this);
}
// When notifying, make sure to keep track of states whose value
// depends solely on the value of an attribute.
PRUint32 stateMask;