| Index: third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
|
| index 6e2242b3a7aebbb1310e4bc0fc4185ce2e7bd8f1..1d61be0136149fd398c1a622cd6c729d9d45b69f 100644
|
| --- a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
|
| @@ -5,6 +5,7 @@
|
| #include "core/dom/custom/CustomElement.h"
|
|
|
| #include "core/dom/Document.h"
|
| +#include "core/dom/ElementRareData.h"
|
| #include "core/dom/QualifiedName.h"
|
| #include "core/dom/custom/CEReactionsScope.h"
|
| #include "core/dom/custom/CustomElementDefinition.h"
|
| @@ -36,9 +37,7 @@ CustomElementsRegistry* CustomElement::registry(const Document& document)
|
| static CustomElementDefinition* definitionForElementWithoutCheck(const Element& element)
|
| {
|
| DCHECK_EQ(element.getCustomElementState(), CustomElementState::Custom);
|
| - if (CustomElementsRegistry* registry = CustomElement::registry(element))
|
| - return registry->definitionForName(element.localName());
|
| - return nullptr;
|
| + return element.customElementDefinition();
|
| }
|
|
|
| CustomElementDefinition* CustomElement::definitionForElement(const Element* element)
|
| @@ -218,6 +217,13 @@ void CustomElement::enqueueDisconnectedCallback(Element* element)
|
| definition->enqueueDisconnectedCallback(element);
|
| }
|
|
|
| +void CustomElement::enqueueAdoptedCallback(Element* element)
|
| +{
|
| + DCHECK_EQ(element->getCustomElementState(), CustomElementState::Custom);
|
| + CustomElementDefinition* definition = definitionForElementWithoutCheck(*element);
|
| + if (definition->hasAdoptedCallback())
|
| + definition->enqueueAdoptedCallback(element);
|
| +}
|
|
|
| void CustomElement::enqueueAttributeChangedCallback(Element* element,
|
| const QualifiedName& name,
|
|
|