Index: Source/core/dom/custom/CustomElement.cpp |
diff --git a/Source/core/dom/custom/CustomElement.cpp b/Source/core/dom/custom/CustomElement.cpp |
index eea313cd8340b815bc6c77029916406bfa2c9059..3608a191cea887eb7a85f58107fd1c198a036fd7 100644 |
--- a/Source/core/dom/custom/CustomElement.cpp |
+++ b/Source/core/dom/custom/CustomElement.cpp |
@@ -101,7 +101,9 @@ void CustomElement::define(Element* element, PassRefPtr<CustomElementDefinition> |
case Element::WaitingForUpgrade: |
definitions().add(element, definition); |
- CustomElementCallbackScheduler::scheduleCreatedCallback(definition->callbacks(), element); |
+ if (element->inDocument() && element->document().domWindow()) |
+ CustomElementCallbackScheduler::scheduleEnteredViewCallback(definition->callbacks(), element); |
+ definition->callbacks()->created(element); |
dominicc (has gone to gerrit)
2013/12/20 05:36:35
This is a neat simplification.
I guess we were pu
|
break; |
} |
} |