diff options
Diffstat (limited to 'dom/base/ChildIterator.cpp')
-rw-r--r-- | dom/base/ChildIterator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dom/base/ChildIterator.cpp b/dom/base/ChildIterator.cpp index ae5f4665d7..7a0a705da9 100644 --- a/dom/base/ChildIterator.cpp +++ b/dom/base/ChildIterator.cpp @@ -192,17 +192,17 @@ FlattenedChildIterator::Init(bool aIgnoreXBL) } bool -ExplicitChildIterator::Seek(nsIContent* aChildToFind) +ExplicitChildIterator::Seek(const nsIContent* aChildToFind) { if (aChildToFind->GetParent() == mParent && !aChildToFind->IsRootOfAnonymousSubtree()) { // Fast path: just point ourselves to aChildToFind, which is a // normal DOM child of ours. - MOZ_ASSERT(!nsContentUtils::IsContentInsertionPoint(aChildToFind)); - mChild = aChildToFind; + mChild = const_cast<nsIContent*>(aChildToFind); mIndexInInserted = 0; mDefaultChild = nullptr; mIsFirst = false; + MOZ_ASSERT(!nsContentUtils::IsContentInsertionPoint(mChild)); return true; } @@ -348,7 +348,7 @@ AllChildrenIterator::Get() const bool -AllChildrenIterator::Seek(nsIContent* aChildToFind) +AllChildrenIterator::Seek(const nsIContent* aChildToFind) { if (mPhase == eAtBegin || mPhase == eAtBeforeKid) { mPhase = eAtExplicitKids; |