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

Side by Side 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, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CustomElementDefinition_h 5 #ifndef CustomElementDefinition_h
6 #define CustomElementDefinition_h 6 #define CustomElementDefinition_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/dom/custom/CustomElementDescriptor.h" 9 #include "core/dom/custom/CustomElementDescriptor.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
11 #include "wtf/Noncopyable.h"
12 11
13 namespace blink { 12 namespace blink {
14 13
14 class Element;
15
15 class CORE_EXPORT CustomElementDefinition 16 class CORE_EXPORT CustomElementDefinition
16 : public GarbageCollectedFinalized<CustomElementDefinition> { 17 : public GarbageCollectedFinalized<CustomElementDefinition> {
17 WTF_MAKE_NONCOPYABLE(CustomElementDefinition); 18 DISALLOW_COPY_AND_ASSIGN(CustomElementDefinition);
18 public: 19 public:
19 CustomElementDefinition(const CustomElementDescriptor&); 20 CustomElementDefinition(const CustomElementDescriptor&);
20 virtual ~CustomElementDefinition(); 21 virtual ~CustomElementDefinition();
21 22
22 const CustomElementDescriptor& descriptor() { return m_descriptor; } 23 const CustomElementDescriptor& descriptor() { return m_descriptor; }
23 24
24 DEFINE_INLINE_VIRTUAL_TRACE() { } 25 DECLARE_VIRTUAL_TRACE();
26
27 using ConstructionStack = HeapVector<Member<Element>, 1>;
28 ConstructionStack& constructionStack()
29 {
30 return m_constructionStack;
31 }
32
33 void upgrade(Element*);
34
35 protected:
36 // TODO(dominicc): Make this pure virtual when the script side is
37 // implemented.
38 virtual bool runConstructor(Element*);
25 39
26 private: 40 private:
27 const CustomElementDescriptor m_descriptor; 41 const CustomElementDescriptor m_descriptor;
42 ConstructionStack m_constructionStack;
28 }; 43 };
29 44
30 } // namespace blink 45 } // namespace blink
31 46
32 #endif // CustomElementDefinition_h 47 #endif // CustomElementDefinition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698