summaryrefslogtreecommitdiffstats
path: root/dom/base/nsTextNode.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/base/nsTextNode.cpp
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz
firefox-adbda400be353e676059e335c3c0aaf99e719475.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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,