Index: third_party/WebKit/Source/core/dom/Element.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
index 6da31da76d47fc37693792d15e6383f21ab1fba7..6efc5c680d78abe6d42e5f669b0af66cd3a0ca26 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -1424,14 +1424,12 @@ Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio |
} |
if (inShadowIncludingDocument()) { |
- if (getCustomElementState() == CustomElementState::Custom) { |
+ if (getCustomElementState() == CustomElementState::Custom) |
CustomElement::enqueueConnectedCallback(this); |
- } else if (isUpgradedV0CustomElement()) { |
+ else if (isUpgradedV0CustomElement()) |
V0CustomElement::didAttach(this, document()); |
- } else if (getCustomElementState() == CustomElementState::Undefined) { |
- if (CustomElementsRegistry* registry = CustomElement::registry(*this)) |
- registry->addCandidate(this); |
- } |
+ else if (getCustomElementState() == CustomElementState::Undefined) |
+ CustomElement::tryToUpgrade(this); |
} |
TreeScope& scope = insertionPoint->treeScope(); |