summaryrefslogtreecommitdiff
path: root/parser
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-19 22:59:16 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:46 -0500
commit0047bbf7453e081d3d318fc9ad5f7601af25e183 (patch)
tree5b928a47adc3834d4248e82898ae30e2fe0df43c /parser
parent92b8802e4e3517f918c537069c1570873403447a (diff)
downloaduxp-0047bbf7453e081d3d318fc9ad5f7601af25e183.tar.gz
Bug 1406325 - Part 4: Use mType for LookupCustomElementDefinition and also removing parts of v0.
Tag UXP Issue mcp-graveyard/UXP#1344
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 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<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;