summaryrefslogtreecommitdiffstats
path: root/dom/base/ChildIterator.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 07:20:06 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 07:20:06 -0400
commitee4857f2098163c1355716944753ab1da1b09611 (patch)
tree7312278ab091377dcf5ebca50bdbd2ba53b38d04 /dom/base/ChildIterator.cpp
parent352fe83985e4a251a96fb5260d923a36c9ed56b4 (diff)
downloadUXP-ee4857f2098163c1355716944753ab1da1b09611.tar
UXP-ee4857f2098163c1355716944753ab1da1b09611.tar.gz
UXP-ee4857f2098163c1355716944753ab1da1b09611.tar.lz
UXP-ee4857f2098163c1355716944753ab1da1b09611.tar.xz
UXP-ee4857f2098163c1355716944753ab1da1b09611.zip
Bug 1413619 - Fix insertion point computation when display: contents pseudos are involved.
Tag #1375
Diffstat (limited to 'dom/base/ChildIterator.cpp')
-rw-r--r--dom/base/ChildIterator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/dom/base/ChildIterator.cpp b/dom/base/ChildIterator.cpp
index ae5f4665d..7a0a705da 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;