From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/base/nsTextNode.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'dom/base/nsTextNode.cpp') 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 CloneDataNode( + already_AddRefed CloneDataNode( mozilla::dom::NodeInfo* aNodeInfo, bool aCloneText) const override { RefPtr 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, -- cgit v1.2.3