summaryrefslogtreecommitdiffstats
path: root/dom/base/Element.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-05 11:25:37 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:25 -0500
commit08fc057471e0f74a558de887e6f9ea9e19d42876 (patch)
treeb74b8260f562f73b5979ca839b4dc1a38f72c3da /dom/base/Element.cpp
parent704318ea0a9f55cad18c4ea7f2a6805485a33d39 (diff)
downloadUXP-08fc057471e0f74a558de887e6f9ea9e19d42876.tar
UXP-08fc057471e0f74a558de887e6f9ea9e19d42876.tar.gz
UXP-08fc057471e0f74a558de887e6f9ea9e19d42876.tar.lz
UXP-08fc057471e0f74a558de887e6f9ea9e19d42876.tar.xz
UXP-08fc057471e0f74a558de887e6f9ea9e19d42876.zip
Bug 1334051 - Part 1: Include namespace in attributeChangedCallback.
Per spec [1], we should include namesapce in attributeChangedCallback argurment list. [1] https://html.spec.whatwg.org/multipage/custom-elements.html#concept-upgrade-an-element, step 3 Tag UXP Issue #1344
Diffstat (limited to 'dom/base/Element.cpp')
-rw-r--r--dom/base/Element.cpp11
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(