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

Unified Diff: Source/core/dom/CustomElementLifecycleCallbacks.h

Issue 18167006: Implement Custom Elements' entered and left document callbacks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Feedback. Created 7 years, 5 months 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/dom/CustomElementCallbackQueue.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/CustomElementLifecycleCallbacks.h
diff --git a/Source/core/dom/CustomElementLifecycleCallbacks.h b/Source/core/dom/CustomElementLifecycleCallbacks.h
index 11838feeb5339ab186d53e1d1fc808d8e51fbfa2..e48628d488fb3bf8b45e59041496dcd1d160b257 100644
--- a/Source/core/dom/CustomElementLifecycleCallbacks.h
+++ b/Source/core/dom/CustomElementLifecycleCallbacks.h
@@ -42,16 +42,24 @@ class CustomElementLifecycleCallbacks : public RefCounted<CustomElementLifecycle
public:
virtual ~CustomElementLifecycleCallbacks() { }
- bool hasCreated() const { return m_which & Created; }
+ bool hasCreatedCallback() const { return m_which & Created; }
virtual void created(Element*) = 0;
- bool hasAttributeChanged() const { return m_which & AttributeChanged; }
+ bool hasEnteredDocumentCallback() const { return m_which & EnteredDocument; }
+ virtual void enteredDocument(Element*) = 0;
+
+ bool hasLeftDocumentCallback() const { return m_which & LeftDocument; }
+ virtual void leftDocument(Element*) = 0;
+
+ bool hasAttributeChangedCallback() const { return m_which & AttributeChanged; }
virtual void attributeChanged(Element*, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue) = 0;
enum CallbackType {
None = 0,
Created = 1 << 0,
- AttributeChanged = 1 << 1
+ EnteredDocument = 1 << 1,
+ LeftDocument = 1 << 2,
+ AttributeChanged = 1 << 3
};
protected:
« no previous file with comments | « Source/core/dom/CustomElementCallbackQueue.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698