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

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: 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..6a75c8821f41f4202f071647cb79f98e51afbcd6 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
@@ -12,6 +12,8 @@
namespace blink {
+class Element;
+
class CORE_EXPORT CustomElementDefinition
: public GarbageCollectedFinalized<CustomElementDefinition> {
WTF_MAKE_NONCOPYABLE(CustomElementDefinition);
@@ -21,10 +23,24 @@ public:
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*) { return true; }
yosin_UTC9 2016/06/01 06:15:44 virtual function should be in .cpp file. http://de
private:
const CustomElementDescriptor m_descriptor;
+ ConstructionStack m_constructionStack;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698