From f50503df9c2eced785957626273ee07e5312d546 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 5 Jan 2020 12:51:10 -0500 Subject: Bug 1301024 - Part 2: Implement create an element steps. Tag UXP Issue #1344 --- dom/base/CustomElementRegistry.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'dom/base/CustomElementRegistry.cpp') diff --git a/dom/base/CustomElementRegistry.cpp b/dom/base/CustomElementRegistry.cpp index 897f7df12..27e92a56a 100644 --- a/dom/base/CustomElementRegistry.cpp +++ b/dom/base/CustomElementRegistry.cpp @@ -931,7 +931,7 @@ DoUpgrade(Element* aElement, } // anonymous namespace // https://html.spec.whatwg.org/multipage/scripting.html#upgrades -void +/* static */ void CustomElementRegistry::Upgrade(Element* aElement, CustomElementDefinition* aDefinition, ErrorResult& aRv) @@ -969,8 +969,10 @@ CustomElementRegistry::Upgrade(Element* aElement, (attrValue.IsEmpty() ? NullString() : attrValue), (namespaceURI.IsEmpty() ? NullString() : namespaceURI) }; - EnqueueLifecycleCallback(nsIDocument::eAttributeChanged, aElement, - &args, aDefinition); + nsContentUtils::EnqueueLifecycleCallback(aElement->OwnerDoc(), + nsIDocument::eAttributeChanged, + aElement, + &args, aDefinition); } } } @@ -995,7 +997,9 @@ CustomElementRegistry::Upgrade(Element* aElement, data->mState = CustomElementData::State::eCustom; // This is for old spec. - EnqueueLifecycleCallback(nsIDocument::eCreated, aElement, nullptr, aDefinition); + nsContentUtils::EnqueueLifecycleCallback(aElement->OwnerDoc(), + nsIDocument::eCreated, + aElement, nullptr, aDefinition); } //----------------------------------------------------- -- cgit v1.2.3