Bug 1392970 - Part 2: Get CustomElementDefinition from CustomElementData when possible.

Tag UXP Issue #1344
This commit is contained in:
Gaming4JC 2020-01-05 15:37:32 -05:00 committed by Roy Tam
commit d1a1106760
2 changed files with 26 additions and 46 deletions

View file

@ -9642,13 +9642,8 @@ nsContentUtils::GetElementDefinitionIfObservingAttr(Element* aCustomElement,
nsIAtom* aExtensionType,
nsIAtom* aAttrName)
{
nsString extType = nsDependentAtomString(aExtensionType);
NodeInfo *ni = aCustomElement->NodeInfo();
CustomElementDefinition* definition =
LookupCustomElementDefinition(aCustomElement->OwnerDoc(), ni->LocalName(),
ni->NamespaceID(),
extType.IsEmpty() ? nullptr : &extType);
aCustomElement->GetCustomElementDefinition();
// Custom element not defined yet or attribute is not in the observed
// attribute list.