| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 8df5e79ab407fa858be4c1cfe83b049e1602ea14..b9b47ed1333105f2b1cd84ceb4c412c6ff0c0db0 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -939,9 +939,8 @@ void Element::attributeChanged(const QualifiedName& name, const AtomicString& ne
|
|
|
| inline void Element::attributeChangedFromParserOrByCloning(const QualifiedName& name, const AtomicString& newValue, AttributeModificationReason reason)
|
| {
|
| - if (RuntimeEnabledFeatures::customDOMElementsEnabled() && name == isAttr) {
|
| - document()->ensureCustomElementRegistry()->didGiveTypeExtension(this, newValue);
|
| - }
|
| + if (RuntimeEnabledFeatures::customDOMElementsEnabled() && name == isAttr)
|
| + document()->ensureCustomElementRegistry()->didGiveTypeExtension(this, newValue, true);
|
| attributeChanged(name, newValue, reason);
|
| }
|
|
|
| @@ -1255,6 +1254,11 @@ Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio
|
| if (hasRareData())
|
| elementRareData()->clearClassListValueForQuirksMode();
|
|
|
| + if (isCustomElement()) {
|
| + if (CustomElementRegistry* registry = document()->registry())
|
| + registry->customElementWasInsertedIntoDocument(this);
|
| + }
|
| +
|
| TreeScope* scope = insertionPoint->treeScope();
|
| if (scope != treeScope())
|
| return InsertionDone;
|
| @@ -1311,8 +1315,15 @@ void Element::removedFrom(ContainerNode* insertionPoint)
|
| }
|
|
|
| ContainerNode::removedFrom(insertionPoint);
|
| - if (wasInDocument && hasPendingResources())
|
| - document()->accessSVGExtensions()->removeElementFromPendingResources(this);
|
| + if (wasInDocument) {
|
| + if (hasPendingResources())
|
| + document()->accessSVGExtensions()->removeElementFromPendingResources(this);
|
| +
|
| + if (isCustomElement()) {
|
| + if (CustomElementRegistry* registry = document()->registry())
|
| + registry->customElementWasRemovedFromDocument(this);
|
| + }
|
| + }
|
| }
|
|
|
| void Element::createRendererIfNeeded(const AttachContext& context)
|
|
|