Bug 1419662 - Fix incorrect custom element type in CustomElementData. f=echen, r=smaug

This commit is contained in:
John Dai
2018-01-07 18:45:00 +02:00
parent f250c2d92e
commit b2052d3ac6
8 changed files with 121 additions and 7 deletions

View File

@@ -409,7 +409,7 @@ nsHtml5TreeOperation::CreateHTMLElement(
if (isCustomElement && aFromParser != dom::FROM_PARSER_FRAGMENT) {
RefPtr<nsAtom> tagAtom = nodeInfo->NameAtom();
RefPtr<nsAtom> typeAtom =
isValue.IsEmpty() ? tagAtom : NS_Atomize(isValue);
(aCreator == NS_NewCustomElement) ? tagAtom : NS_Atomize(isValue);
definition = nsContentUtils::LookupCustomElementDefinition(document,
nodeInfo->LocalName(), nodeInfo->NamespaceID(), typeAtom);