summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-05 18:47:29 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:31 -0500
commitcc05c715a78fdf33f6b519527cf1118e6fb79ae8 (patch)
tree8e98d9f870739955bb4a3ce6de4117e778da6440 /dom
parent6e9b1bc84d4e875fd1bdc25b84ea56618a01aa67 (diff)
downloadaura-central-cc05c715a78fdf33f6b519527cf1118e6fb79ae8.tar.gz
Bug 1407937 - Move mDefinition from CustomElementReacion to CustomElementUpgradeReaction;
Tag UXP Issue mcp-graveyard/UXP%1344
Diffstat (limited to 'dom')
-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