mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-08 14:03:49 +00:00
Bug 362391, DOMAttrModified doesn't handle namespaced attributes properly, r+sr=sicking
This commit is contained in:
parent
3f9008b966
commit
f4e4277761
@ -3233,7 +3233,9 @@ nsGenericElement::SetAttrAndNotify(PRInt32 aNamespaceID,
|
||||
nsAutoString attrName;
|
||||
aName->ToString(attrName);
|
||||
nsCOMPtr<nsIDOMAttr> attrNode;
|
||||
GetAttributeNode(attrName, getter_AddRefs(attrNode));
|
||||
nsAutoString ns;
|
||||
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNamespaceID, ns);
|
||||
GetAttributeNodeNS(ns, attrName, getter_AddRefs(attrNode));
|
||||
mutation.mRelatedNode = attrNode;
|
||||
|
||||
mutation.mAttrName = aName;
|
||||
@ -3431,10 +3433,11 @@ nsGenericElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
||||
// Grab the attr node if needed before we remove it from the attr map
|
||||
nsCOMPtr<nsIDOMAttr> attrNode;
|
||||
if (hasMutationListeners) {
|
||||
// XXXbz namespaces, dude!
|
||||
nsAutoString attrName;
|
||||
aName->ToString(attrName);
|
||||
GetAttributeNode(attrName, getter_AddRefs(attrNode));
|
||||
nsAutoString ns;
|
||||
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNameSpaceID, ns);
|
||||
GetAttributeNodeNS(ns, attrName, getter_AddRefs(attrNode));
|
||||
}
|
||||
|
||||
// Clear binding to nsIDOMNamedNodeMap
|
||||
|
@ -1337,10 +1337,11 @@ nsXULElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNotify)
|
||||
|
||||
nsCOMPtr<nsIDOMAttr> attrNode;
|
||||
if (hasMutationListeners) {
|
||||
// XXXbz namespaces, dude!
|
||||
nsAutoString attrName;
|
||||
aName->ToString(attrName);
|
||||
GetAttributeNode(attrName, getter_AddRefs(attrNode));
|
||||
nsAutoString ns;
|
||||
nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNameSpaceID, ns);
|
||||
GetAttributeNodeNS(ns, attrName, getter_AddRefs(attrNode));
|
||||
}
|
||||
|
||||
nsDOMSlots *slots = GetExistingDOMSlots();
|
||||
|
Loading…
Reference in New Issue
Block a user