From aee46efef952991cff087704147d4ccbda50446c Mon Sep 17 00:00:00 2001 From: Mirko Brodesser Date: Mon, 20 Jul 2020 01:35:57 +0000 Subject: [PATCH] Bug 1649121: part 48) Rename `MakeEmpty` in `ContentIteratorBase::InitInternal`. r=masayuki Differential Revision: https://phabricator.services.mozilla.com/D83951 --- dom/base/ContentIterator.cpp | 18 +++++++++--------- dom/base/ContentIterator.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dom/base/ContentIterator.cpp b/dom/base/ContentIterator.cpp index ca7a6f2e7e67..7edddab31e14 100644 --- a/dom/base/ContentIterator.cpp +++ b/dom/base/ContentIterator.cpp @@ -200,7 +200,7 @@ nsresult ContentIteratorBase::InitInternal(const RawRangeBoundary& aStart, // of a range. if (!startIsCharacterData && aStart == aEnd) { - MakeEmpty(); + SetEmpty(); return NS_OK; } @@ -365,7 +365,7 @@ nsresult ContentIteratorBase::InitInternal(const RawRangeBoundary& aStart, return NS_OK; } -void ContentIteratorBase::MakeEmpty() { +void ContentIteratorBase::SetEmpty() { mCurNode = nullptr; mFirst = nullptr; mLast = nullptr; @@ -545,8 +545,8 @@ void ContentIteratorBase::First() { } void ContentIteratorBase::Last() { - // Note that mLast can be nullptr if MakeEmpty() is called in Init() since - // at that time, Init() returns NS_OK. + // Note that mLast can be nullptr if SetEmpty() is called in Init() + // since at that time, Init() returns NS_OK. if (!mLast) { MOZ_ASSERT(mIsDone); return; @@ -727,7 +727,7 @@ nsresult ContentSubtreeIterator::InitWithRange() { if (!child || startOffset == endOffset) { // Text node, empty container, or collapsed - MakeEmpty(); + SetEmpty(); return NS_OK; } } @@ -767,7 +767,7 @@ nsresult ContentSubtreeIterator::InitWithRange() { firstCandidate = GetNextSibling(node); if (!firstCandidate) { - MakeEmpty(); + SetEmpty(); return NS_OK; } } @@ -782,7 +782,7 @@ nsresult ContentSubtreeIterator::InitWithRange() { &nodeBefore, &nodeAfter)); if (nodeBefore || nodeAfter) { - MakeEmpty(); + SetEmpty(); return NS_OK; } @@ -814,7 +814,7 @@ nsresult ContentSubtreeIterator::InitWithRange() { } if (!lastCandidate) { - MakeEmpty(); + SetEmpty(); return NS_OK; } @@ -827,7 +827,7 @@ nsresult ContentSubtreeIterator::InitWithRange() { &nodeBefore, &nodeAfter)); if (nodeBefore || nodeAfter) { - MakeEmpty(); + SetEmpty(); return NS_OK; } diff --git a/dom/base/ContentIterator.h b/dom/base/ContentIterator.h index 3957349c088b..db8c128759ca 100644 --- a/dom/base/ContentIterator.h +++ b/dom/base/ContentIterator.h @@ -83,7 +83,7 @@ class ContentIteratorBase { nsINode* NextNode(nsINode* aNode); nsINode* PrevNode(nsINode* aNode); - void MakeEmpty(); + void SetEmpty(); nsCOMPtr mCurNode; nsCOMPtr mFirst;