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

Unified Diff: Source/core/dom/custom/CustomElementCallbackInvocation.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/CustomElementCallbackInvocation.cpp
diff --git a/Source/core/dom/custom/CustomElementCallbackInvocation.cpp b/Source/core/dom/custom/CustomElementCallbackInvocation.cpp
index e4fb331b654ef6d2e5c65b7518ed08c079607cca..d4d3140e2de15d5425040ac381c4242d2c178bac 100644
--- a/Source/core/dom/custom/CustomElementCallbackInvocation.cpp
+++ b/Source/core/dom/custom/CustomElementCallbackInvocation.cpp
@@ -36,25 +36,6 @@
namespace WebCore {
-class CreatedInvocation : public CustomElementCallbackInvocation {
-public:
- CreatedInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callbacks)
- : CustomElementCallbackInvocation(callbacks)
- {
- }
-
-private:
- virtual void dispatch(Element*) OVERRIDE;
- virtual bool isCreated() const OVERRIDE { return true; }
-};
-
-void CreatedInvocation::dispatch(Element* element)
-{
- if (element->inDocument() && element->document().domWindow())
- CustomElementCallbackScheduler::scheduleAttachedCallback(callbacks(), element);
- callbacks()->created(element);
-}
-
class AttachedDetachedInvocation : public CustomElementCallbackInvocation {
public:
AttachedDetachedInvocation(PassRefPtr<CustomElementLifecycleCallbacks>, CustomElementLifecycleCallbacks::CallbackType which);
@@ -114,13 +95,9 @@ void AttributeChangedInvocation::dispatch(Element* element)
PassOwnPtr<CustomElementCallbackInvocation> CustomElementCallbackInvocation::createInvocation(PassRefPtr<CustomElementLifecycleCallbacks> callbacks, CustomElementLifecycleCallbacks::CallbackType which)
{
switch (which) {
- case CustomElementLifecycleCallbacks::Created:
- return adoptPtr(new CreatedInvocation(callbacks));
-
case CustomElementLifecycleCallbacks::Attached:
case CustomElementLifecycleCallbacks::Detached:
return adoptPtr(new AttachedDetachedInvocation(callbacks, which));
-
default:
ASSERT_NOT_REACHED();
return PassOwnPtr<CustomElementCallbackInvocation>();
« no previous file with comments | « Source/core/dom/custom/CustomElementCallbackInvocation.h ('k') | Source/core/dom/custom/CustomElementCallbackQueue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698