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 4c7626d3171b1e9405d056961fc2d425cf1a3e6d..b261c80514f8de4966a4f07f43eb41362d471fe0 100644 |
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp |
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp |
@@ -24,6 +24,11 @@ DEFINE_TRACE(CustomElementDefinition) |
// https://html.spec.whatwg.org/multipage/scripting.html#concept-upgrade-an-element |
void CustomElementDefinition::upgrade(Element* element) |
{ |
+ // TODO(dominicc): When the attributeChangedCallback is implemented, |
+ // enqueue reactions for attributes here. |
+ // TODO(dominicc): When the connectedCallback is implemented, enqueue |
+ // reactions here, if applicable. |
+ |
m_constructionStack.append(element); |
size_t depth = m_constructionStack.size(); |
@@ -38,20 +43,7 @@ void CustomElementDefinition::upgrade(Element* element) |
if (!succeeded) |
return; |
- // TODO(dominicc): Turn this into an assertion when setting |
- // 'custom' moves to the HTMLElement constructor. We will need to |
- // add a bit for MARQUEE to be custom-gets-callbacks-yet-not-custom. |
- element->setCustomElementState(CustomElementState::Custom); |
- |
- // TODO(dominicc): When the attributeChangedCallback is implemented, |
- // enqueue reactions for attributes here. |
- // TODO(dominicc): When the connectedCallback is implemented, enqueue |
- // reactions here, if applicable. |
-} |
- |
-bool CustomElementDefinition::runConstructor(Element*) |
-{ |
- return true; |
+ CHECK(element->getCustomElementState() == CustomElementState::Custom); |
} |
} // namespace blink |