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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.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/custom/CustomElementDefinition.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
index bf8acd6fe36eabce44f76102a7394b91cb2ee86e..3c950fd707b4ea66a9a89f7ea875688a1f562fc8 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
@@ -102,6 +102,8 @@ HTMLElement* CustomElementDefinition::createElementAsync(Document& document, con
// https://html.spec.whatwg.org/multipage/scripting.html#concept-upgrade-an-element
void CustomElementDefinition::upgrade(Element* element)
{
+ DCHECK_EQ(element->getCustomElementState(), CustomElementState::Undefined);
+
if (!m_observedAttributes.isEmpty())
enqueueAttributeChangedCallbackForAllAttributes(element);

Powered by Google App Engine
This is Rietveld 408576698