summaryrefslogtreecommitdiffstats
path: root/parser
diff options
context:
space:
mode:
Diffstat (limited to 'parser')
-rw-r--r--parser/html/nsHtml5TreeOperation.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp
index a7d3da259..d530cbba3 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<nsIAtom> tagAtom = nodeInfo->NameAtom();
+ RefPtr<nsIAtom> 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;