Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2067853002: Upgrade custom elements when inserting a node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dominicc nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698