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

Unified Diff: Source/core/dom/custom/CustomElement.cpp

Issue 106903007: Let unresolved custom element go through CustomElementCallbackQueue. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated test. Landing again. Created 7 years 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/custom/CustomElementCallbackInvocation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/custom/CustomElement.cpp
diff --git a/Source/core/dom/custom/CustomElement.cpp b/Source/core/dom/custom/CustomElement.cpp
index 0dc1683ca39eb1d0e8fcddc8178b5413e162af22..27cdde94795e0876efbc0430334d8888317a4eb8 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::scheduleAttachedCallback(definition->callbacks(), element);
+ definition->callbacks()->created(element);
break;
}
}
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/custom/CustomElementCallbackInvocation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698