diff options
Diffstat (limited to 'dom/base/Element.cpp')
-rw-r--r-- | dom/base/Element.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index 81cc41210..247fbe79e 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -2590,11 +2590,15 @@ Element::SetAttrAndNotify(int32_t aNamespaceID, if (ownerDoc && GetCustomElementData()) { nsCOMPtr<nsIAtom> oldValueAtom = oldValue->GetAsAtom(); nsCOMPtr<nsIAtom> newValueAtom = valueForAfterSetAttr.GetAsAtom(); + nsAutoString ns; + nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNamespaceID, ns); + LifecycleCallbackArgs args = { nsDependentAtomString(aName), aModType == nsIDOMMutationEvent::ADDITION ? NullString() : nsDependentAtomString(oldValueAtom), - nsDependentAtomString(newValueAtom) + nsDependentAtomString(newValueAtom), + (ns.IsEmpty() ? NullString() : ns) }; nsContentUtils::EnqueueLifecycleCallback( @@ -2845,11 +2849,14 @@ Element::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aName, nsIDocument* ownerDoc = OwnerDoc(); if (ownerDoc && GetCustomElementData()) { + nsAutoString ns; + nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNameSpaceID, ns); nsCOMPtr<nsIAtom> oldValueAtom = oldValue.GetAsAtom(); LifecycleCallbackArgs args = { nsDependentAtomString(aName), nsDependentAtomString(oldValueAtom), - NullString() + NullString(), + (ns.IsEmpty() ? NullString() : ns) }; nsContentUtils::EnqueueLifecycleCallback( |