summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dom/base/CustomElementRegistry.cpp7
-rw-r--r--dom/base/CustomElementRegistry.h19
2 files changed, 7 insertions, 19 deletions
diff --git a/dom/base/CustomElementRegistry.cpp b/dom/base/CustomElementRegistry.cpp
index 7fd295201..fc6ac2877 100644
--- a/dom/base/CustomElementRegistry.cpp
+++ b/dom/base/CustomElementRegistry.cpp
@@ -442,8 +442,7 @@ CustomElementRegistry::EnqueueLifecycleCallback(nsIDocument::ElementCallbackType
CustomElementReactionsStack* reactionsStack =
docGroup->CustomElementReactionsStack();
- reactionsStack->EnqueueCallbackReaction(aCustomElement, definition,
- Move(callback));
+ reactionsStack->EnqueueCallbackReaction(aCustomElement, Move(callback));
}
void
@@ -1025,11 +1024,9 @@ CustomElementReactionsStack::EnqueueUpgradeReaction(Element* aElement,
void
CustomElementReactionsStack::EnqueueCallbackReaction(Element* aElement,
- CustomElementDefinition* aDefinition,
UniquePtr<CustomElementCallback> aCustomElementCallback)
{
- Enqueue(aElement, new CustomElementCallbackReaction(aDefinition,
- Move(aCustomElementCallback)));
+ Enqueue(aElement, new CustomElementCallbackReaction(Move(aCustomElementCallback)));
}
void
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