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

Unified Diff: Source/core/dom/custom/CustomElementCallbackScheduler.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
Index: Source/core/dom/custom/CustomElementCallbackScheduler.cpp
diff --git a/Source/core/dom/custom/CustomElementCallbackScheduler.cpp b/Source/core/dom/custom/CustomElementCallbackScheduler.cpp
index fc3c90ca63d1a425a3cf29bab44acf5f7564a017..f6ab5c9f6f43d5d5f56220f6d110c72e10a324d5 100644
--- a/Source/core/dom/custom/CustomElementCallbackScheduler.cpp
+++ b/Source/core/dom/custom/CustomElementCallbackScheduler.cpp
@@ -33,7 +33,10 @@
#include "core/dom/Element.h"
#include "core/dom/custom/CustomElementCallbackDispatcher.h"
+#include "core/dom/custom/CustomElementCallbackInvocation.h"
#include "core/dom/custom/CustomElementLifecycleCallbacks.h"
+#include "core/dom/custom/CustomElementRegistrationContext.h"
+#include "core/dom/custom/CustomElementResolutionStep.h"
namespace WebCore {
@@ -46,15 +49,6 @@ void CustomElementCallbackScheduler::scheduleAttributeChangedCallback(PassRefPtr
queue->append(CustomElementCallbackInvocation::createAttributeChangedInvocation(callbacks, name, oldValue, newValue));
}
-void CustomElementCallbackScheduler::scheduleCreatedCallback(PassRefPtr<CustomElementLifecycleCallbacks> callbacks, PassRefPtr<Element> element)
-{
- if (!callbacks->hasCreatedCallback())
- return;
-
- CustomElementCallbackQueue* queue = instance().scheduleInCurrentElementQueue(element);
- queue->append(CustomElementCallbackInvocation::createInvocation(callbacks, CustomElementLifecycleCallbacks::Created));
-}
-
void CustomElementCallbackScheduler::scheduleAttachedCallback(PassRefPtr<CustomElementLifecycleCallbacks> callbacks, PassRefPtr<Element> element)
{
if (!callbacks->hasAttachedCallback())
@@ -73,6 +67,13 @@ void CustomElementCallbackScheduler::scheduleDetachedCallback(PassRefPtr<CustomE
queue->append(CustomElementCallbackInvocation::createInvocation(callbacks, CustomElementLifecycleCallbacks::Detached));
}
+void CustomElementCallbackScheduler::scheduleResolutionStep(const CustomElementDescriptor& descriptor, PassRefPtr<Element> element)
+{
+ RefPtr<CustomElementRegistrationContext> context = element->document().registrationContext();
+ CustomElementCallbackQueue* queue = instance().schedule(element);
+ queue->append(CustomElementResolutionStep::create(context.release(), descriptor));
+}
+
CustomElementCallbackScheduler& CustomElementCallbackScheduler::instance()
{
DEFINE_STATIC_LOCAL(CustomElementCallbackScheduler, instance, ());
« no previous file with comments | « Source/core/dom/custom/CustomElementCallbackScheduler.h ('k') | Source/core/dom/custom/CustomElementProcessingStep.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698