Bug 1797011 Part 1 - Delete nsFrameList's copy constructor. r=layout-reviewers,emilio

This patch doesn't change behavior, and eliminates copy construction of
nsFrameList via utilizing const-references to store the return value of
`GetChildList()`. This is the first step toward making nsFrameList a move-only
class.

Differential Revision: https://phabricator.services.mozilla.com/D160013
This commit is contained in:
Ting-Yu Lin
2022-10-24 19:14:32 +00:00
parent 8542416766
commit cc03ecf544
10 changed files with 28 additions and 25 deletions

View File

@@ -10161,10 +10161,12 @@ static bool CompareTrees(nsPresContext* aFirstPresContext,
auto iterLists1 = childLists1.begin();
auto iterLists2 = childLists2.begin();
do {
const nsFrameList& kids1 =
iterLists1 != childLists1.end() ? iterLists1->mList : nsFrameList();
const nsFrameList& kids2 =
iterLists2 != childLists2.end() ? iterLists2->mList : nsFrameList();
const nsFrameList& kids1 = iterLists1 != childLists1.end()
? iterLists1->mList
: nsFrameList::EmptyList();
const nsFrameList& kids2 = iterLists2 != childLists2.end()
? iterLists2->mList
: nsFrameList::EmptyList();
int32_t l1 = kids1.GetLength();
int32_t l2 = kids2.GetLength();
if (l1 != l2) {