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

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 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 2d36478ea86e92a6136e7c272fe8f44fb9d635e8..a6783327a481f2f668138d30366bcf008711f135 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::scheduleEnteredViewCallback(PassRefPtr<CustomElementLifecycleCallbacks> callbacks, PassRefPtr<Element> element)
{
if (!callbacks->hasEnteredViewCallback())
@@ -73,6 +67,13 @@ void CustomElementCallbackScheduler::scheduleLeftViewCallback(PassRefPtr<CustomE
queue->append(CustomElementCallbackInvocation::createInvocation(callbacks, CustomElementLifecycleCallbacks::LeftView));
}
+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, ());

Powered by Google App Engine
This is Rietveld 408576698