From fb657f7a1e3ef326214e0c42a5a0dd6dc0109338 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 19 Jan 2020 22:59:16 -0500 Subject: Bug 1406325 - Part 4: Use mType for LookupCustomElementDefinition and also removing parts of v0. Tag UXP Issue #1344 --- parser/html/nsHtml5TreeOperation.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'parser') diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp index a7d3da2595..d530cbba3a 100644 --- a/parser/html/nsHtml5TreeOperation.cpp +++ b/parser/html/nsHtml5TreeOperation.cpp @@ -429,9 +429,12 @@ nsHtml5TreeOperation::CreateHTMLElement( isCustomElement = (aCreator == NS_NewCustomElement || !isValue.IsEmpty()); if (isCustomElement && aFromParser != dom::FROM_PARSER_FRAGMENT) { + RefPtr tagAtom = nodeInfo->NameAtom(); + RefPtr typeAtom = + isValue.IsEmpty() ? tagAtom : NS_Atomize(isValue); + definition = nsContentUtils::LookupCustomElementDefinition(document, - nodeInfo->LocalName(), nodeInfo->NamespaceID(), - (isValue.IsEmpty() ? nullptr : &isValue)); + nodeInfo->LocalName(), nodeInfo->NamespaceID(), typeAtom); if (definition) { willExecuteScript = true; -- cgit v1.2.3