summaryrefslogtreecommitdiffstats
path: root/dom/base/CustomElementRegistry.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/CustomElementRegistry.h')
-rw-r--r--dom/base/CustomElementRegistry.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/dom/base/CustomElementRegistry.h b/dom/base/CustomElementRegistry.h
index 867c92647..d3dfef682 100644
--- a/dom/base/CustomElementRegistry.h
+++ b/dom/base/CustomElementRegistry.h
@@ -130,24 +130,16 @@ struct CustomElementData
// e.g., create an element, insert a node.
AutoTArray<UniquePtr<CustomElementReaction>, 3> mReactionQueue;
- RefPtr<CustomElementDefinition> mCustomElementDefinition;
-
- void
- SetCustomElementDefinition(CustomElementDefinition* aDefinition)
- {
- MOZ_ASSERT(!mCustomElementDefinition);
-
- mCustomElementDefinition = aDefinition;
- }
+ void SetCustomElementDefinition(CustomElementDefinition* aDefinition);
+ CustomElementDefinition* GetCustomElementDefinition();
- CustomElementDefinition*
- GetCustomElementDefinition()
- {
- return mCustomElementDefinition;
- }
+ void Traverse(nsCycleCollectionTraversalCallback& aCb) const;
+ void Unlink();
private:
virtual ~CustomElementData() {}
+
+ RefPtr<CustomElementDefinition> mCustomElementDefinition;
};
#define ALEADY_CONSTRUCTED_MARKER nullptr
@@ -167,7 +159,8 @@ struct CustomElementDefinition
mozilla::dom::LifecycleCallbacks* aCallbacks,
uint32_t aDocOrder);
- // The type (name) for this custom element.
+ // The type (name) for this custom element, for <button is="x-foo"> or <x-foo>
+ // this would be x-foo.
nsCOMPtr<nsIAtom> mType;
// The localname to (e.g. <button is=type> -- this would be button).