summaryrefslogtreecommitdiffstats
path: root/dom/base/nsTextNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsTextNode.cpp')
-rw-r--r--dom/base/nsTextNode.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/dom/base/nsTextNode.cpp b/dom/base/nsTextNode.cpp
index df08c547be..e34b581c40 100644
--- a/dom/base/nsTextNode.cpp
+++ b/dom/base/nsTextNode.cpp
@@ -43,13 +43,13 @@ class nsAttributeTextNode final : public nsTextNode,
NS_ASSERTION(mAttrName, "Must have attr name");
}
- virtual nsresult BindToTree(BindContext&, nsINode& aParent) override;
- virtual void UnbindFromTree(bool aNullParent = true) override;
+ nsresult BindToTree(BindContext&, nsINode& aParent) override;
+ void UnbindFromTree(UnbindContext&) override;
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
- virtual already_AddRefed<CharacterData> CloneDataNode(
+ already_AddRefed<CharacterData> CloneDataNode(
mozilla::dom::NodeInfo* aNodeInfo, bool aCloneText) const override {
RefPtr<nsAttributeTextNode> it =
new (aNodeInfo->NodeInfoManager()) nsAttributeTextNode(
@@ -123,10 +123,9 @@ nsresult nsTextNode::BindToTree(BindContext& aContext, nsINode& aParent) {
return NS_OK;
}
-void nsTextNode::UnbindFromTree(bool aNullParent) {
- ResetDirectionSetByTextNode(this);
-
- CharacterData::UnbindFromTree(aNullParent);
+void nsTextNode::UnbindFromTree(UnbindContext& aContext) {
+ CharacterData::UnbindFromTree(aContext);
+ ResetDirectionSetByTextNode(this, aContext);
}
#ifdef MOZ_DOM_LIST
@@ -209,16 +208,16 @@ nsresult nsAttributeTextNode::BindToTree(BindContext& aContext,
return NS_OK;
}
-void nsAttributeTextNode::UnbindFromTree(bool aNullParent) {
+void nsAttributeTextNode::UnbindFromTree(UnbindContext& aContext) {
// UnbindFromTree can be called anytime so we have to be safe.
if (mGrandparent) {
- // aNullParent might not be true here, but we want to remove the
+ // aContext might not be true here, but we want to remove the
// mutation observer anyway since we only need it while we're
// in the document.
mGrandparent->RemoveMutationObserver(this);
mGrandparent = nullptr;
}
- nsTextNode::UnbindFromTree(aNullParent);
+ nsTextNode::UnbindFromTree(aContext);
}
void nsAttributeTextNode::AttributeChanged(Element* aElement,