mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1049758 - fixup copy and move ctors for children iterators r=wchen
This commit is contained in:
parent
04c90e50f6
commit
1338ffb134
@ -44,6 +44,20 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
ExplicitChildIterator(const ExplicitChildIterator& aOther)
|
||||
: mParent(aOther.mParent), mChild(aOther.mChild),
|
||||
mDefaultChild(aOther.mDefaultChild),
|
||||
mShadowIterator(aOther.mShadowIterator ?
|
||||
new ExplicitChildIterator(*aOther.mShadowIterator) :
|
||||
nullptr),
|
||||
mIndexInInserted(aOther.mIndexInInserted), mIsFirst(aOther.mIsFirst) {}
|
||||
|
||||
ExplicitChildIterator(ExplicitChildIterator&& aOther)
|
||||
: mParent(aOther.mParent), mChild(aOther.mChild),
|
||||
mDefaultChild(aOther.mDefaultChild),
|
||||
mShadowIterator(Move(aOther.mShadowIterator)),
|
||||
mIndexInInserted(aOther.mIndexInInserted), mIsFirst(aOther.mIsFirst) {}
|
||||
|
||||
nsIContent* GetNextChild();
|
||||
|
||||
// Looks for aChildToFind respecting insertion points until aChildToFind
|
||||
@ -118,6 +132,12 @@ public:
|
||||
Init(false);
|
||||
}
|
||||
|
||||
FlattenedChildIterator(FlattenedChildIterator&& aOther)
|
||||
: ExplicitChildIterator(Move(aOther)), mXBLInvolved(aOther.mXBLInvolved) {}
|
||||
|
||||
FlattenedChildIterator(const FlattenedChildIterator& aOther)
|
||||
: ExplicitChildIterator(aOther), mXBLInvolved(aOther.mXBLInvolved) {}
|
||||
|
||||
bool XBLInvolved() { return mXBLInvolved; }
|
||||
|
||||
protected:
|
||||
@ -126,7 +146,7 @@ protected:
|
||||
* doesn't want to consider XBL.
|
||||
*/
|
||||
FlattenedChildIterator(nsIContent* aParent, bool aIgnoreXBL)
|
||||
: ExplicitChildIterator(aParent), mXBLInvolved(false)
|
||||
: ExplicitChildIterator(aParent), mXBLInvolved(false)
|
||||
{
|
||||
Init(aIgnoreXBL);
|
||||
}
|
||||
@ -152,6 +172,12 @@ public:
|
||||
mOriginalContent(aNode), mFlags(aFlags),
|
||||
mPhase(eNeedBeforeKid) {}
|
||||
|
||||
AllChildrenIterator(AllChildrenIterator&& aOther)
|
||||
: FlattenedChildIterator(Move(aOther)),
|
||||
mOriginalContent(aOther.mOriginalContent),
|
||||
mAnonKids(Move(aOther.mAnonKids)), mFlags(aOther.mFlags),
|
||||
mPhase(aOther.mPhase), mMutationGuard(aOther.mMutationGuard) {}
|
||||
|
||||
#ifdef DEBUG
|
||||
~AllChildrenIterator() { MOZ_ASSERT(!mMutationGuard.Mutated(0)); }
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user