Bug 1301024 - Part 2: Implement create an element steps.

Tag UXP Issue #1344
This commit is contained in:
Gaming4JC 2020-01-05 12:51:10 -05:00 committed by Roy Tam
commit b0285ef3f7
5 changed files with 129 additions and 5 deletions

View file

@ -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);
}
//-----------------------------------------------------