Notify before firing mutation events. Bug 387460, r+sr=sicking

This commit is contained in:
2007-07-10 18:14:55 -07:00
parent a9f6c49183
commit 3661b32936
2 changed files with 16 additions and 16 deletions

View File

@@ -3626,6 +3626,10 @@ nsGenericElement::SetAttrAndNotify(PRInt32 aNamespaceID,
}
}
if (aNotify) {
nsNodeUtils::AttributeChanged(this, aNamespaceID, aName, modType);
}
if (aFireMutation) {
nsMutationEvent mutation(PR_TRUE, NS_MUTATION_ATTRMODIFIED);
@@ -3651,10 +3655,6 @@ nsGenericElement::SetAttrAndNotify(PRInt32 aNamespaceID,
nsEventDispatcher::Dispatch(this, nsnull, &mutation);
}
if (aNotify) {
nsNodeUtils::AttributeChanged(this, aNamespaceID, aName, modType);
}
if (aNamespaceID == kNameSpaceID_XMLEvents &&
aName == nsGkAtoms::event && mNodeInfo->GetDocument()) {
mNodeInfo->GetDocument()->AddXMLEventsContent(this);