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.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/dom/base/CustomElementRegistry.h b/dom/base/CustomElementRegistry.h
index e9b2bee56..674c653ab 100644
--- a/dom/base/CustomElementRegistry.h
+++ b/dom/base/CustomElementRegistry.h
@@ -212,40 +212,32 @@ private:
class CustomElementReaction
{
public:
- explicit CustomElementReaction(CustomElementDefinition* aDefinition)
- : mDefinition(aDefinition)
- {
- }
-
virtual ~CustomElementReaction() = default;
virtual void Invoke(Element* aElement, ErrorResult& aRv) = 0;
virtual void Traverse(nsCycleCollectionTraversalCallback& aCb) const
{
}
-
-protected:
- CustomElementDefinition* mDefinition;
};
class CustomElementUpgradeReaction final : public CustomElementReaction
{
public:
explicit CustomElementUpgradeReaction(CustomElementDefinition* aDefinition)
- : CustomElementReaction(aDefinition)
+ : mDefinition(aDefinition)
{
}
private:
virtual void Invoke(Element* aElement, ErrorResult& aRv) override;
+
+ CustomElementDefinition* mDefinition;
};
class CustomElementCallbackReaction final : public CustomElementReaction
{
public:
- CustomElementCallbackReaction(CustomElementDefinition* aDefinition,
- UniquePtr<CustomElementCallback> aCustomElementCallback)
- : CustomElementReaction(aDefinition)
- , mCustomElementCallback(Move(aCustomElementCallback))
+ explicit CustomElementCallbackReaction(UniquePtr<CustomElementCallback> aCustomElementCallback)
+ : mCustomElementCallback(Move(aCustomElementCallback))
{
}
@@ -289,7 +281,6 @@ public:
* https://html.spec.whatwg.org/multipage/scripting.html#enqueue-a-custom-element-callback-reaction
*/
void EnqueueCallbackReaction(Element* aElement,
- CustomElementDefinition* aDefinition,
UniquePtr<CustomElementCallback> aCustomElementCallback);
// [CEReactions] Before executing the algorithm's steps