OLD | NEW |
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 "bindings/core/v8/ScriptValue.h" | 8 #include "bindings/core/v8/ScriptValue.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/dom/custom/CustomElementDescriptor.h" | 10 #include "core/dom/custom/CustomElementDescriptor.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 virtual HTMLElement* createElementSync(Document&, const QualifiedName&) = 0; | 51 virtual HTMLElement* createElementSync(Document&, const QualifiedName&) = 0; |
52 virtual HTMLElement* createElementSync(Document&, const QualifiedName&, Exce
ptionState&) = 0; | 52 virtual HTMLElement* createElementSync(Document&, const QualifiedName&, Exce
ptionState&) = 0; |
53 HTMLElement* createElementAsync(Document&, const QualifiedName&); | 53 HTMLElement* createElementAsync(Document&, const QualifiedName&); |
54 | 54 |
55 void upgrade(Element*); | 55 void upgrade(Element*); |
56 | 56 |
57 virtual bool hasConnectedCallback() const = 0; | 57 virtual bool hasConnectedCallback() const = 0; |
58 virtual bool hasDisconnectedCallback() const = 0; | 58 virtual bool hasDisconnectedCallback() const = 0; |
59 bool hasAttributeChangedCallback(const QualifiedName&); | 59 bool hasAttributeChangedCallback(const QualifiedName&) const; |
| 60 bool hasStyleAttributeChangedCallback() const; |
60 | 61 |
61 virtual void runConnectedCallback(Element*) = 0; | 62 virtual void runConnectedCallback(Element*) = 0; |
62 virtual void runDisconnectedCallback(Element*) = 0; | 63 virtual void runDisconnectedCallback(Element*) = 0; |
63 virtual void runAttributeChangedCallback(Element*, const QualifiedName&, | 64 virtual void runAttributeChangedCallback(Element*, const QualifiedName&, |
64 const AtomicString& oldValue, const AtomicString& newValue) = 0; | 65 const AtomicString& oldValue, const AtomicString& newValue) = 0; |
65 | 66 |
66 void enqueueUpgradeReaction(Element*); | 67 void enqueueUpgradeReaction(Element*); |
67 void enqueueConnectedCallback(Element*); | 68 void enqueueConnectedCallback(Element*); |
68 void enqueueDisconnectedCallback(Element*); | 69 void enqueueDisconnectedCallback(Element*); |
69 void enqueueAttributeChangedCallback(Element*, const QualifiedName&, | 70 void enqueueAttributeChangedCallback(Element*, const QualifiedName&, |
70 const AtomicString& oldValue, const AtomicString& newValue); | 71 const AtomicString& oldValue, const AtomicString& newValue); |
71 | 72 |
72 protected: | 73 protected: |
73 virtual bool runConstructor(Element*) = 0; | 74 virtual bool runConstructor(Element*) = 0; |
74 | 75 |
75 static void checkConstructorResult(Element*, Document&, const QualifiedName&
, ExceptionState&); | 76 static void checkConstructorResult(Element*, Document&, const QualifiedName&
, ExceptionState&); |
76 | 77 |
77 HashSet<AtomicString> m_observedAttributes; | |
78 | |
79 private: | 78 private: |
80 const CustomElementDescriptor m_descriptor; | 79 const CustomElementDescriptor m_descriptor; |
81 ConstructionStack m_constructionStack; | 80 ConstructionStack m_constructionStack; |
| 81 HashSet<AtomicString> m_observedAttributes; |
| 82 bool m_hasStyleAttributeChangedCallback; |
82 | 83 |
83 void enqueueAttributeChangedCallbackForAllAttributes(Element*); | 84 void enqueueAttributeChangedCallbackForAllAttributes(Element*); |
84 }; | 85 }; |
85 | 86 |
86 } // namespace blink | 87 } // namespace blink |
87 | 88 |
88 #endif // CustomElementDefinition_h | 89 #endif // CustomElementDefinition_h |
OLD | NEW |