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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h

Issue 2023093003: Upgrade in-document custom elements when an element is defined. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses feedback. Created 4 years, 7 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
Index: third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
index e410349ac24f66484daacbb7c199e68be1822b60..b5b11b542aa302a056a5e21c2b161587f7a67b1f 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
@@ -8,23 +8,38 @@
#include "core/CoreExport.h"
#include "core/dom/custom/CustomElementDescriptor.h"
#include "platform/heap/Handle.h"
-#include "wtf/Noncopyable.h"
namespace blink {
+class Element;
+
class CORE_EXPORT CustomElementDefinition
: public GarbageCollectedFinalized<CustomElementDefinition> {
- WTF_MAKE_NONCOPYABLE(CustomElementDefinition);
+ DISALLOW_COPY_AND_ASSIGN(CustomElementDefinition);
public:
CustomElementDefinition(const CustomElementDescriptor&);
virtual ~CustomElementDefinition();
const CustomElementDescriptor& descriptor() { return m_descriptor; }
- DEFINE_INLINE_VIRTUAL_TRACE() { }
+ DECLARE_VIRTUAL_TRACE();
+
+ using ConstructionStack = HeapVector<Member<Element>, 1>;
+ ConstructionStack& constructionStack()
+ {
+ return m_constructionStack;
+ }
+
+ void upgrade(Element*);
+
+protected:
+ // TODO(dominicc): Make this pure virtual when the script side is
+ // implemented.
+ virtual bool runConstructor(Element*);
private:
const CustomElementDescriptor m_descriptor;
+ ConstructionStack m_constructionStack;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698