Bug 1798373 Part 5 - Change nsContainerFrame::SetInitialChildList() to take rvalue reference of nsFrameList. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D160841
This commit is contained in:
Ting-Yu Lin 2022-11-01 21:15:54 +00:00
parent fc3719b5aa
commit 4787078c5c
52 changed files with 141 additions and 136 deletions

View File

@ -533,8 +533,7 @@ static bool ParentIsWrapperAnonBox(nsIFrame* aParent) {
inline void SetInitialSingleChild(nsContainerFrame* aParent, nsIFrame* aFrame) { inline void SetInitialSingleChild(nsContainerFrame* aParent, nsIFrame* aFrame) {
MOZ_ASSERT(!aFrame->GetNextSibling(), "Should be using a frame list"); MOZ_ASSERT(!aFrame->GetNextSibling(), "Should be using a frame list");
nsFrameList temp(aFrame, aFrame); aParent->SetInitialChildList(kPrincipalList, nsFrameList(aFrame, aFrame));
aParent->SetInitialChildList(kPrincipalList, temp);
} }
// ----------------------------------------------------------- // -----------------------------------------------------------
@ -1117,8 +1116,8 @@ void nsFrameConstructorState::ConstructBackdropFrameFor(nsIContent* aContent,
nsIFrame* placeholder = nsCSSFrameConstructor::CreatePlaceholderFrameFor( nsIFrame* placeholder = nsCSSFrameConstructor::CreatePlaceholderFrameFor(
mPresShell, aContent, backdropFrame, frame, nullptr, placeholderType); mPresShell, aContent, backdropFrame, frame, nullptr, placeholderType);
nsFrameList temp(placeholder, placeholder); frame->SetInitialChildList(nsIFrame::kBackdropList,
frame->SetInitialChildList(nsIFrame::kBackdropList, temp); nsFrameList(placeholder, placeholder));
frameList->AppendFrame(nullptr, backdropFrame); frameList->AppendFrame(nullptr, backdropFrame);
} }
@ -1219,7 +1218,7 @@ MOZ_NEVER_INLINE void nsFrameConstructorState::ProcessFrameInsertions(
containingBlock->GetAbsoluteContainingBlock()->SetInitialChildList( containingBlock->GetAbsoluteContainingBlock()->SetInitialChildList(
containingBlock, aChildListID, aFrameList); containingBlock, aChildListID, aFrameList);
} else { } else {
containingBlock->SetInitialChildList(aChildListID, aFrameList); containingBlock->SetInitialChildList(aChildListID, std::move(aFrameList));
} }
} else if (aChildListID == nsIFrame::kFixedList || } else if (aChildListID == nsIFrame::kFixedList ||
aChildListID == nsIFrame::kAbsoluteList) { aChildListID == nsIFrame::kAbsoluteList) {
@ -1363,7 +1362,7 @@ static void MoveChildrenTo(nsIFrame* aOldParent, nsContainerFrame* aNewParent,
if (aNewParent->PrincipalChildList().IsEmpty() && if (aNewParent->PrincipalChildList().IsEmpty() &&
aNewParent->HasAnyStateBits(NS_FRAME_FIRST_REFLOW)) { aNewParent->HasAnyStateBits(NS_FRAME_FIRST_REFLOW)) {
aNewParent->SetInitialChildList(kPrincipalList, aFrameList); aNewParent->SetInitialChildList(kPrincipalList, std::move(aFrameList));
} else { } else {
aNewParent->AppendFrames(kPrincipalList, aFrameList); aNewParent->AppendFrames(kPrincipalList, aFrameList);
} }
@ -2038,12 +2037,13 @@ nsIFrame* nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
PullOutCaptionFrames(childList, captionList); PullOutCaptionFrames(childList, captionList);
// Set the inner table frame's initial primary list // Set the inner table frame's initial primary list
innerFrame->SetInitialChildList(kPrincipalList, childList); innerFrame->SetInitialChildList(kPrincipalList, std::move(childList));
// Set the table wrapper frame's secondary childlist lists // Set the table wrapper frame's secondary childlist lists
if (captionList.NotEmpty()) { if (captionList.NotEmpty()) {
captionList.ApplySetParent(newFrame); captionList.ApplySetParent(newFrame);
newFrame->SetInitialChildList(nsIFrame::kCaptionList, captionList); newFrame->SetInitialChildList(nsIFrame::kCaptionList,
std::move(captionList));
} }
return newFrame; return newFrame;
@ -2110,7 +2110,7 @@ nsIFrame* nsCSSFrameConstructor::ConstructTableRowOrRowGroup(
false); false);
} }
newFrame->SetInitialChildList(kPrincipalList, childList); newFrame->SetInitialChildList(kPrincipalList, std::move(childList));
aFrameList.AppendFrame(nullptr, newFrame); aFrameList.AppendFrame(nullptr, newFrame);
return newFrame; return newFrame;
} }
@ -2210,7 +2210,7 @@ nsIFrame* nsCSSFrameConstructor::ConstructTableCell(
childList, !isMathMLContent); childList, !isMathMLContent);
} }
cellInnerFrame->SetInitialChildList(kPrincipalList, childList); cellInnerFrame->SetInitialChildList(kPrincipalList, std::move(childList));
SetInitialSingleChild(newFrame, cellInnerFrame); SetInitialSingleChild(newFrame, cellInnerFrame);
aFrameList.AppendFrame(nullptr, newFrame); aFrameList.AppendFrame(nullptr, newFrame);
return newFrame; return newFrame;
@ -2528,7 +2528,7 @@ nsIFrame* nsCSSFrameConstructor::ConstructDocElementFrame(
childList, false); childList, false);
// Set the initial child lists // Set the initial child lists
contentFrame->SetInitialChildList(kPrincipalList, childList); contentFrame->SetInitialChildList(kPrincipalList, std::move(childList));
} }
nsIFrame* newFrame = frameList.FirstChild(); nsIFrame* newFrame = frameList.FirstChild();
@ -2987,7 +2987,7 @@ nsIFrame* nsCSSFrameConstructor::ConstructSelectFrame(
/* aParentIsWrapperAnonBox = */ false, /* aParentIsWrapperAnonBox = */ false,
childList); childList);
comboboxFrame->SetInitialChildList(kPrincipalList, childList); comboboxFrame->SetInitialChildList(kPrincipalList, std::move(childList));
aState.mFrameState = historyState; aState.mFrameState = historyState;
if (aState.mFrameState) { if (aState.mFrameState) {
@ -3045,7 +3045,7 @@ void nsCSSFrameConstructor::InitializeListboxSelect(
childList, false); childList, false);
// Set the scrolled frame's initial child lists // Set the scrolled frame's initial child lists
scrolledFrame->SetInitialChildList(kPrincipalList, childList); scrolledFrame->SetInitialChildList(kPrincipalList, std::move(childList));
} }
nsIFrame* nsCSSFrameConstructor::ConstructFieldSetFrame( nsIFrame* nsCSSFrameConstructor::ConstructFieldSetFrame(
@ -3141,13 +3141,14 @@ nsIFrame* nsCSSFrameConstructor::ConstructFieldSetFrame(
if (!MayNeedToCreateColumnSpanSiblings(contentFrame, childList)) { if (!MayNeedToCreateColumnSpanSiblings(contentFrame, childList)) {
// Set the inner frame's initial child lists. // Set the inner frame's initial child lists.
contentFrame->SetInitialChildList(kPrincipalList, childList); contentFrame->SetInitialChildList(kPrincipalList, std::move(childList));
} else { } else {
// Extract any initial non-column-span kids, and put them in inner frame's // Extract any initial non-column-span kids, and put them in inner frame's
// child list. // child list.
nsFrameList initialNonColumnSpanKids = nsFrameList initialNonColumnSpanKids =
childList.Split([](nsIFrame* f) { return f->IsColumnSpan(); }); childList.Split([](nsIFrame* f) { return f->IsColumnSpan(); });
contentFrame->SetInitialChildList(kPrincipalList, initialNonColumnSpanKids); contentFrame->SetInitialChildList(kPrincipalList,
std::move(initialNonColumnSpanKids));
if (childList.NotEmpty()) { if (childList.NotEmpty()) {
nsFrameList columnSpanSiblings = CreateColumnSpanSiblings( nsFrameList columnSpanSiblings = CreateColumnSpanSiblings(
@ -3234,7 +3235,7 @@ nsIFrame* nsCSSFrameConstructor::ConstructBlockRubyFrame(
nsFrameList childList; nsFrameList childList;
ProcessChildren(aState, content, rubyStyle, rubyFrame, true, childList, false, ProcessChildren(aState, content, rubyStyle, rubyFrame, true, childList, false,
nullptr); nullptr);
rubyFrame->SetInitialChildList(kPrincipalList, childList); rubyFrame->SetInitialChildList(kPrincipalList, std::move(childList));
return newFrame; return newFrame;
} }
@ -3853,14 +3854,15 @@ void nsCSSFrameConstructor::ConstructFrameFromItemInternal(
!MayNeedToCreateColumnSpanSiblings(newFrameAsContainer, childList)) { !MayNeedToCreateColumnSpanSiblings(newFrameAsContainer, childList)) {
// Set the frame's initial child list. Note that MathML depends on this // Set the frame's initial child list. Note that MathML depends on this
// being called even if childList is empty! // being called even if childList is empty!
newFrameAsContainer->SetInitialChildList(kPrincipalList, childList); newFrameAsContainer->SetInitialChildList(kPrincipalList,
std::move(childList));
} else { } else {
// Extract any initial non-column-span kids, and put them in inner // Extract any initial non-column-span kids, and put them in inner
// frame's child list. // frame's child list.
nsFrameList initialNonColumnSpanKids = nsFrameList initialNonColumnSpanKids =
childList.Split([](nsIFrame* f) { return f->IsColumnSpan(); }); childList.Split([](nsIFrame* f) { return f->IsColumnSpan(); });
newFrameAsContainer->SetInitialChildList(kPrincipalList, newFrameAsContainer->SetInitialChildList(
initialNonColumnSpanKids); kPrincipalList, std::move(initialNonColumnSpanKids));
if (childList.NotEmpty()) { if (childList.NotEmpty()) {
nsFrameList columnSpanSiblings = CreateColumnSpanSiblings( nsFrameList columnSpanSiblings = CreateColumnSpanSiblings(
@ -4233,7 +4235,7 @@ already_AddRefed<ComputedStyle> nsCSSFrameConstructor::BeginBuildingScrollFrame(
styleSet->ResolveInheritingAnonymousBoxStyle(aScrolledPseudo, styleSet->ResolveInheritingAnonymousBoxStyle(aScrolledPseudo,
aContentStyle); aContentStyle);
gfxScrollFrame->SetInitialChildList(kPrincipalList, anonymousList); gfxScrollFrame->SetInitialChildList(kPrincipalList, std::move(anonymousList));
return scrolledChildStyle.forget(); return scrolledChildStyle.forget();
} }
@ -4671,9 +4673,7 @@ void nsCSSFrameConstructor::FlushAccumulatedBlock(
} }
// abs-pos and floats are disabled in MathML children so we don't have to // abs-pos and floats are disabled in MathML children so we don't have to
// worry about messing up those. // worry about messing up those.
blockFrame->SetInitialChildList(kPrincipalList, aBlockList); blockFrame->SetInitialChildList(kPrincipalList, std::move(aBlockList));
NS_ASSERTION(aBlockList.IsEmpty(), "What happened?");
aBlockList.Clear();
aNewList.AppendFrame(nullptr, blockFrame); aNewList.AppendFrame(nullptr, blockFrame);
} }
@ -4821,7 +4821,7 @@ nsContainerFrame* nsCSSFrameConstructor::ConstructFrameWithAnonymousChild(
} }
// Set the inner wrapper frame's initial primary list // Set the inner wrapper frame's initial primary list
innerFrame->SetInitialChildList(kPrincipalList, childList); innerFrame->SetInitialChildList(kPrincipalList, std::move(childList));
return newFrame; return newFrame;
} }
@ -7830,7 +7830,7 @@ nsIFrame* nsCSSFrameConstructor::CreateContinuingOuterTableFrame(
} }
// Set the table wrapper's initial child list // Set the table wrapper's initial child list
newFrame->SetInitialChildList(kPrincipalList, newChildFrames); newFrame->SetInitialChildList(kPrincipalList, std::move(newChildFrames));
return newFrame; return newFrame;
} }
@ -7880,7 +7880,8 @@ nsIFrame* nsCSSFrameConstructor::CreateContinuingTableFrame(
ProcessChildren(state, headerFooter, rowGroupFrame->Style(), ProcessChildren(state, headerFooter, rowGroupFrame->Style(),
headerFooterFrame, true, childList, false, nullptr); headerFooterFrame, true, childList, false, nullptr);
NS_ASSERTION(state.mFloatedList.IsEmpty(), "unexpected floated element"); NS_ASSERTION(state.mFloatedList.IsEmpty(), "unexpected floated element");
headerFooterFrame->SetInitialChildList(kPrincipalList, childList); headerFooterFrame->SetInitialChildList(kPrincipalList,
std::move(childList));
headerFooterFrame->SetRepeatable(true); headerFooterFrame->SetRepeatable(true);
// Table specific initialization // Table specific initialization
@ -7892,7 +7893,7 @@ nsIFrame* nsCSSFrameConstructor::CreateContinuingTableFrame(
} }
// Set the table frame's initial child list // Set the table frame's initial child list
newFrame->SetInitialChildList(kPrincipalList, childFrames); newFrame->SetInitialChildList(kPrincipalList, std::move(childFrames));
return newFrame; return newFrame;
} }
@ -7967,7 +7968,7 @@ nsIFrame* nsCSSFrameConstructor::CreateContinuingFrame(
cellFrame = cellFrame->GetNextSibling(); cellFrame = cellFrame->GetNextSibling();
} }
rowFrame->SetInitialChildList(kPrincipalList, newChildList); rowFrame->SetInitialChildList(kPrincipalList, std::move(newChildList));
newFrame = rowFrame; newFrame = rowFrame;
} else if (LayoutFrameType::TableCell == frameType) { } else if (LayoutFrameType::TableCell == frameType) {
@ -8119,7 +8120,8 @@ nsresult nsCSSFrameConstructor::ReplicateFixedFrames(
// broken auto-positioning. Oh, well. // broken auto-positioning. Oh, well.
NS_ASSERTION(!canvasFrame->PrincipalChildList().FirstChild(), NS_ASSERTION(!canvasFrame->PrincipalChildList().FirstChild(),
"leaking frames; doc root continuation must be empty"); "leaking frames; doc root continuation must be empty");
canvasFrame->SetInitialChildList(kPrincipalList, fixedPlaceholders); canvasFrame->SetInitialChildList(kPrincipalList,
std::move(fixedPlaceholders));
return NS_OK; return NS_OK;
} }
@ -9857,7 +9859,8 @@ void nsCSSFrameConstructor::WrapFramesInFirstLineFrame(
ReparentFrames(this, aLineFrame, firstLineChildren, true); ReparentFrames(this, aLineFrame, firstLineChildren, true);
if (aLineFrame->PrincipalChildList().IsEmpty() && if (aLineFrame->PrincipalChildList().IsEmpty() &&
aLineFrame->HasAnyStateBits(NS_FRAME_FIRST_REFLOW)) { aLineFrame->HasAnyStateBits(NS_FRAME_FIRST_REFLOW)) {
aLineFrame->SetInitialChildList(kPrincipalList, firstLineChildren); aLineFrame->SetInitialChildList(kPrincipalList,
std::move(firstLineChildren));
} else { } else {
AppendFrames(aLineFrame, kPrincipalList, firstLineChildren); AppendFrames(aLineFrame, kPrincipalList, firstLineChildren);
} }
@ -10611,7 +10614,7 @@ void nsCSSFrameConstructor::ConstructBlock(
if (!MayNeedToCreateColumnSpanSiblings(blockFrame, childList)) { if (!MayNeedToCreateColumnSpanSiblings(blockFrame, childList)) {
// No need to create column-span siblings. // No need to create column-span siblings.
blockFrame->SetInitialChildList(kPrincipalList, childList); blockFrame->SetInitialChildList(kPrincipalList, std::move(childList));
return; return;
} }
@ -10619,7 +10622,8 @@ void nsCSSFrameConstructor::ConstructBlock(
// child list. // child list.
nsFrameList initialNonColumnSpanKids = nsFrameList initialNonColumnSpanKids =
childList.Split([](nsIFrame* f) { return f->IsColumnSpan(); }); childList.Split([](nsIFrame* f) { return f->IsColumnSpan(); });
blockFrame->SetInitialChildList(kPrincipalList, initialNonColumnSpanKids); blockFrame->SetInitialChildList(kPrincipalList,
std::move(initialNonColumnSpanKids));
if (childList.IsEmpty()) { if (childList.IsEmpty()) {
// No more kids to process (there weren't any column-span kids). // No more kids to process (there weren't any column-span kids).
@ -10797,7 +10801,8 @@ nsFrameList nsCSSFrameConstructor::CreateColumnSpanSiblings(
nsFrameList columnSpanKids = nsFrameList columnSpanKids =
aChildList.Split([](nsIFrame* f) { return !f->IsColumnSpan(); }); aChildList.Split([](nsIFrame* f) { return !f->IsColumnSpan(); });
columnSpanKids.ApplySetParent(columnSpanWrapper); columnSpanKids.ApplySetParent(columnSpanWrapper);
columnSpanWrapper->SetInitialChildList(kPrincipalList, columnSpanKids); columnSpanWrapper->SetInitialChildList(kPrincipalList,
std::move(columnSpanKids));
if (aPositionedFrame) { if (aPositionedFrame) {
aState.ReparentAbsoluteItems(columnSpanWrapper); aState.ReparentAbsoluteItems(columnSpanWrapper);
} }
@ -10819,7 +10824,7 @@ nsFrameList nsCSSFrameConstructor::CreateColumnSpanSiblings(
nonColumnSpanKids.ApplySetParent(nonColumnSpanWrapper); nonColumnSpanKids.ApplySetParent(nonColumnSpanWrapper);
nonColumnSpanWrapper->SetInitialChildList(kPrincipalList, nonColumnSpanWrapper->SetInitialChildList(kPrincipalList,
nonColumnSpanKids); std::move(nonColumnSpanKids));
if (aPositionedFrame) { if (aPositionedFrame) {
aState.ReparentAbsoluteItems(nonColumnSpanWrapper); aState.ReparentAbsoluteItems(nonColumnSpanWrapper);
} }
@ -11023,7 +11028,7 @@ nsIFrame* nsCSSFrameConstructor::ConstructInline(
// acquired one when ancestor inline frames and {ib} splits got // acquired one when ancestor inline frames and {ib} splits got
// constructed). Just put all the kids into the single inline frame and // constructed). Just put all the kids into the single inline frame and
// bail. // bail.
newFrame->SetInitialChildList(kPrincipalList, childList); newFrame->SetInitialChildList(kPrincipalList, std::move(childList));
aState.AddChild(newFrame, aFrameList, content, aParentFrame); aState.AddChild(newFrame, aFrameList, content, aParentFrame);
return newFrame; return newFrame;
} }
@ -11033,7 +11038,7 @@ nsIFrame* nsCSSFrameConstructor::ConstructInline(
// Grab the first inline's kids // Grab the first inline's kids
nsFrameList firstInlineKids = childList.TakeFramesBefore(firstBlock); nsFrameList firstInlineKids = childList.TakeFramesBefore(firstBlock);
newFrame->SetInitialChildList(kPrincipalList, firstInlineKids); newFrame->SetInitialChildList(kPrincipalList, std::move(firstInlineKids));
aFrameList.AppendFrame(nullptr, newFrame); aFrameList.AppendFrame(nullptr, newFrame);

View File

@ -836,8 +836,8 @@ nsIFrame* nsComboboxControlFrame::CreateFrameForDisplayNode() {
textFrame->Init(mDisplayContent, mDisplayFrame, nullptr); textFrame->Init(mDisplayContent, mDisplayFrame, nullptr);
mDisplayContent->SetPrimaryFrame(textFrame); mDisplayContent->SetPrimaryFrame(textFrame);
nsFrameList textList(textFrame, textFrame); mDisplayFrame->SetInitialChildList(kPrincipalList,
mDisplayFrame->SetInitialChildList(kPrincipalList, textList); nsFrameList(textFrame, textFrame));
return mDisplayFrame; return mDisplayFrame;
} }
@ -864,7 +864,7 @@ void nsComboboxControlFrame::GetChildLists(nsTArray<ChildList>* aLists) const {
} }
void nsComboboxControlFrame::SetInitialChildList(ChildListID aListID, void nsComboboxControlFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
for (nsIFrame* f : aChildList) { for (nsIFrame* f : aChildList) {
MOZ_ASSERT(f->GetParent() == this, "Unexpected parent"); MOZ_ASSERT(f->GetParent() == this, "Unexpected parent");
nsCOMPtr<nsIFormControl> formControl = do_QueryInterface(f->GetContent()); nsCOMPtr<nsIFormControl> formControl = do_QueryInterface(f->GetContent());
@ -874,7 +874,7 @@ void nsComboboxControlFrame::SetInitialChildList(ChildListID aListID,
break; break;
} }
} }
nsBlockFrame::SetInitialChildList(aListID, aChildList); nsBlockFrame::SetInitialChildList(aListID, std::move(aChildList));
} }
namespace mozilla { namespace mozilla {

View File

@ -107,7 +107,7 @@ class nsComboboxControlFrame final : public nsBlockFrame,
#endif #endif
void DestroyFrom(nsIFrame* aDestructRoot, void DestroyFrom(nsIFrame* aDestructRoot,
PostDestroyData& aPostDestroyData) final; PostDestroyData& aPostDestroyData) final;
void SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) final; void SetInitialChildList(ChildListID aListID, nsFrameList&& aChildList) final;
const nsFrameList& GetChildList(ChildListID aListID) const final; const nsFrameList& GetChildList(ChildListID aListID) const final;
void GetChildLists(nsTArray<ChildList>* aLists) const final; void GetChildLists(nsTArray<ChildList>* aLists) const final;

View File

@ -782,8 +782,8 @@ void nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
} }
void nsFieldSetFrame::SetInitialChildList(ChildListID aListID, void nsFieldSetFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
if (nsBlockFrame* legend = do_QueryFrame(GetLegend())) { if (nsBlockFrame* legend = do_QueryFrame(GetLegend())) {
// A rendered legend always establish a new formatting context. // A rendered legend always establish a new formatting context.
// https://html.spec.whatwg.org/multipage/rendering.html#rendered-legend // https://html.spec.whatwg.org/multipage/rendering.html#rendered-legend

View File

@ -50,8 +50,8 @@ class nsFieldSetFrame final : public nsContainerFrame {
gfxContext& aRenderingContext, nsPoint aPt, gfxContext& aRenderingContext, nsPoint aPt,
const nsRect& aDirtyRect); const nsRect& aDirtyRect);
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override; nsFrameList& aFrameList) override;
virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,

View File

@ -668,7 +668,7 @@ nsresult nsListControlFrame::HandleEvent(nsPresContext* aPresContext,
//--------------------------------------------------------- //---------------------------------------------------------
void nsListControlFrame::SetInitialChildList(ChildListID aListID, void nsListControlFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
if (aListID == kPrincipalList) { if (aListID == kPrincipalList) {
// First check to see if all the content has been added // First check to see if all the content has been added
mIsAllContentHere = mContent->IsDoneAddingChildren(); mIsAllContentHere = mContent->IsDoneAddingChildren();
@ -677,7 +677,7 @@ void nsListControlFrame::SetInitialChildList(ChildListID aListID,
mHasBeenInitialized = false; mHasBeenInitialized = false;
} }
} }
nsHTMLScrollFrame::SetInitialChildList(aListID, aChildList); nsHTMLScrollFrame::SetInitialChildList(aListID, std::move(aChildList));
// If all the content is here now check // If all the content is here now check
// to see if all the frames have been created // to see if all the frames have been created

View File

@ -60,7 +60,7 @@ class nsListControlFrame final : public nsHTMLScrollFrame,
mozilla::WidgetGUIEvent* aEvent, mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) final; nsEventStatus* aEventStatus) final;
void SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) final; void SetInitialChildList(ChildListID aListID, nsFrameList&& aChildList) final;
nscoord GetPrefISize(gfxContext* aRenderingContext) final; nscoord GetPrefISize(gfxContext* aRenderingContext) final;
nscoord GetMinISize(gfxContext* aRenderingContext) final; nscoord GetMinISize(gfxContext* aRenderingContext) final;

View File

@ -1191,8 +1191,8 @@ static nsIFrame* FindRootNodeFrame(const nsFrameList& aChildList,
} }
void nsTextControlFrame::SetInitialChildList(ChildListID aListID, void nsTextControlFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
if (aListID != kPrincipalList) { if (aListID != kPrincipalList) {
return; return;
} }

View File

@ -138,7 +138,7 @@ class nsTextControlFrame : public nsContainerFrame,
void AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements, void AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,
uint32_t aFilter) override; uint32_t aFilter) override;
void SetInitialChildList(ChildListID, nsFrameList&) override; void SetInitialChildList(ChildListID, nsFrameList&&) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder, void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override; const nsDisplayListSet& aLists) override;

View File

@ -7480,7 +7480,7 @@ void nsBlockFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
} }
void nsBlockFrame::SetInitialChildList(ChildListID aListID, void nsBlockFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
if (kFloatList == aListID) { if (kFloatList == aListID) {
mFloats = std::move(aChildList); mFloats = std::move(aChildList);
} else if (kPrincipalList == aListID) { } else if (kPrincipalList == aListID) {
@ -7513,7 +7513,7 @@ void nsBlockFrame::SetInitialChildList(ChildListID aListID,
AddFrames(aChildList, nullptr, nullptr); AddFrames(aChildList, nullptr, nullptr);
} else { } else {
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
} }
} }

View File

@ -116,7 +116,7 @@ class nsBlockFrame : public nsContainerFrame {
void Init(nsIContent* aContent, nsContainerFrame* aParent, void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override;
void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
const nsLineList::iterator* aPrevFrameLine, const nsLineList::iterator* aPrevFrameLine,

View File

@ -264,11 +264,11 @@ nsCanvasFrame::SetHasFocus(bool aHasFocus) {
} }
void nsCanvasFrame::SetInitialChildList(ChildListID aListID, void nsCanvasFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
NS_ASSERTION(aListID != kPrincipalList || aChildList.IsEmpty() || NS_ASSERTION(aListID != kPrincipalList || aChildList.IsEmpty() ||
aChildList.OnlyChild(), aChildList.OnlyChild(),
"Primary child list can have at most one frame in it"); "Primary child list can have at most one frame in it");
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
} }
void nsCanvasFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { void nsCanvasFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) {

View File

@ -54,8 +54,8 @@ class nsCanvasFrame final : public nsContainerFrame,
virtual void DestroyFrom(nsIFrame* aDestructRoot, virtual void DestroyFrom(nsIFrame* aDestructRoot,
PostDestroyData& aPostDestroyData) override; PostDestroyData& aPostDestroyData) override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override; nsFrameList& aFrameList) override;
virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,

View File

@ -1258,10 +1258,10 @@ void nsColumnSetFrame::AppendDirectlyOwnedAnonBoxes(
#ifdef DEBUG #ifdef DEBUG
void nsColumnSetFrame::SetInitialChildList(ChildListID aListID, void nsColumnSetFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
MOZ_ASSERT(aListID != kPrincipalList || aChildList.OnlyChild(), MOZ_ASSERT(aListID != kPrincipalList || aChildList.OnlyChild(),
"initial principal child list must have exactly one child"); "initial principal child list must have exactly one child");
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
} }
void nsColumnSetFrame::AppendFrames(ChildListID aListID, void nsColumnSetFrame::AppendFrames(ChildListID aListID,

View File

@ -31,7 +31,7 @@ class nsColumnSetFrame final : public nsContainerFrame {
#ifdef DEBUG #ifdef DEBUG
void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override;
void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
const nsLineList::iterator* aPrevFrameLine, const nsLineList::iterator* aPrevFrameLine,

View File

@ -75,7 +75,7 @@ void nsContainerFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
} }
void nsContainerFrame::SetInitialChildList(ChildListID aListID, void nsContainerFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
#ifdef DEBUG #ifdef DEBUG
nsIFrame::VerifyDirtyBitSet(aChildList); nsIFrame::VerifyDirtyBitSet(aChildList);
for (nsIFrame* f : aChildList) { for (nsIFrame* f : aChildList) {

View File

@ -90,7 +90,7 @@ class nsContainerFrame : public nsSplittableFrame {
* @see #Init() * @see #Init()
*/ */
virtual void SetInitialChildList(ChildListID aListID, virtual void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList); nsFrameList&& aChildList);
/** /**
* This method is responsible for appending frames to the frame * This method is responsible for appending frames to the frame

View File

@ -67,7 +67,7 @@ void nsFirstLetterFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
} }
void nsFirstLetterFrame::SetInitialChildList(ChildListID aListID, void nsFirstLetterFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
MOZ_ASSERT(aListID == kPrincipalList, MOZ_ASSERT(aListID == kPrincipalList,
"Principal child list is the only " "Principal child list is the only "
"list that nsFirstLetterFrame should set via this function"); "list that nsFirstLetterFrame should set via this function");

View File

@ -26,8 +26,8 @@ class nsFirstLetterFrame final : public nsContainerFrame {
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
#ifdef DEBUG_FRAME_DUMP #ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override; virtual nsresult GetFrameName(nsAString& aResult) const override;
#endif #endif

View File

@ -336,7 +336,7 @@ void nsHTMLFramesetFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
} }
void nsHTMLFramesetFrame::SetInitialChildList(ChildListID aListID, void nsHTMLFramesetFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
// We do this weirdness where we create our child frames in Init(). On the // We do this weirdness where we create our child frames in Init(). On the
// other hand, we're going to get a SetInitialChildList() with an empty list // other hand, we're going to get a SetInitialChildList() with an empty list
// and null list name after the frame constructor is done creating us. So // and null list name after the frame constructor is done creating us. So
@ -345,7 +345,7 @@ void nsHTMLFramesetFrame::SetInitialChildList(ChildListID aListID,
return; return;
} }
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
} }
// XXX should this try to allocate twips based on an even pixel boundary? // XXX should this try to allocate twips based on an even pixel boundary?

View File

@ -73,8 +73,8 @@ class nsHTMLFramesetFrame final : public nsContainerFrame {
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
static bool gDragInProgress; static bool gDragInProgress;

View File

@ -245,8 +245,8 @@ void nsHTMLScrollFrame::DestroyFrom(nsIFrame* aDestructRoot,
} }
void nsHTMLScrollFrame::SetInitialChildList(ChildListID aListID, void nsHTMLScrollFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
mHelper.ReloadChildFrames(); mHelper.ReloadChildFrames();
} }
@ -1857,8 +1857,8 @@ void nsXULScrollFrame::DestroyFrom(nsIFrame* aDestructRoot,
} }
void nsXULScrollFrame::SetInitialChildList(ChildListID aListID, void nsXULScrollFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
nsBoxFrame::SetInitialChildList(aListID, aChildList); nsBoxFrame::SetInitialChildList(aListID, std::move(aChildList));
if (aListID == kPrincipalList) { if (aListID == kPrincipalList) {
mHelper.ReloadChildFrames(); mHelper.ReloadChildFrames();
} }

View File

@ -993,7 +993,7 @@ class nsHTMLScrollFrame : public nsContainerFrame,
// Called to set the child frames. We typically have three: the scroll area, // Called to set the child frames. We typically have three: the scroll area,
// the vertical scrollbar, and the horizontal scrollbar. // the vertical scrollbar, and the horizontal scrollbar.
void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) final; void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) final;
void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
const nsLineList::iterator* aPrevFrameLine, const nsLineList::iterator* aPrevFrameLine,
@ -1450,7 +1450,7 @@ class nsXULScrollFrame final : public nsBoxFrame,
// Called to set the child frames. We typically have three: the scroll area, // Called to set the child frames. We typically have three: the scroll area,
// the vertical scrollbar, and the horizontal scrollbar. // the vertical scrollbar, and the horizontal scrollbar.
void SetInitialChildList(ChildListID aListID, nsFrameList& aChildList) final; void SetInitialChildList(ChildListID aListID, nsFrameList&& aChildList) final;
void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) final; void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) final;
void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
const nsLineList::iterator* aPrevFrameLine, const nsLineList::iterator* aPrevFrameLine,

View File

@ -9736,14 +9736,14 @@ void nsGridContainerFrame::StoreUsedTrackSizes(
#ifdef DEBUG #ifdef DEBUG
void nsGridContainerFrame::SetInitialChildList(ChildListID aListID, void nsGridContainerFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
ChildListIDs supportedLists = {kPrincipalList}; ChildListIDs supportedLists = {kPrincipalList};
// We don't handle the kBackdropList frames in any way, but it only contains // We don't handle the kBackdropList frames in any way, but it only contains
// a placeholder for ::backdrop which is OK to not reflow (for now anyway). // a placeholder for ::backdrop which is OK to not reflow (for now anyway).
supportedLists += kBackdropList; supportedLists += kBackdropList;
MOZ_ASSERT(supportedLists.contains(aListID), "unexpected child list"); MOZ_ASSERT(supportedLists.contains(aListID), "unexpected child list");
return nsContainerFrame::SetInitialChildList(aListID, aChildList); return nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
} }
void nsGridContainerFrame::TrackSize::DumpStateBits(StateBits aState) { void nsGridContainerFrame::TrackSize::DumpStateBits(StateBits aState) {

View File

@ -170,7 +170,7 @@ class nsGridContainerFrame final : public nsContainerFrame,
#ifdef DEBUG #ifdef DEBUG
void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
#endif #endif
/** /**

View File

@ -57,8 +57,8 @@ bool nsRubyTextContainerFrame::IsFrameOfType(uint32_t aFlags) const {
/* virtual */ /* virtual */
void nsRubyTextContainerFrame::SetInitialChildList(ChildListID aListID, void nsRubyTextContainerFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
if (aListID == kPrincipalList) { if (aListID == kPrincipalList) {
UpdateSpanFlag(); UpdateSpanFlag();
} }

View File

@ -38,8 +38,8 @@ class nsRubyTextContainerFrame final : public nsContainerFrame {
#endif #endif
// nsContainerFrame overrides // nsContainerFrame overrides
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override; nsFrameList& aFrameList) override;
virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,

View File

@ -385,11 +385,11 @@ class nsMathMLmathBlockFrame final : public nsBlockFrame {
// beware, mFrames is not set by nsBlockFrame // beware, mFrames is not set by nsBlockFrame
// cannot use mFrames{.FirstChild()|.etc} since the block code doesn't set // cannot use mFrames{.FirstChild()|.etc} since the block code doesn't set
// mFrames // mFrames
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override { nsFrameList&& aChildList) override {
MOZ_ASSERT(aListID == kPrincipalList || aListID == kBackdropList, MOZ_ASSERT(aListID == kPrincipalList || aListID == kBackdropList,
"unexpected frame list"); "unexpected frame list");
nsBlockFrame::SetInitialChildList(aListID, aChildList); nsBlockFrame::SetInitialChildList(aListID, std::move(aChildList));
if (aListID == kPrincipalList) { if (aListID == kPrincipalList) {
// re-resolve our subtree to set any mathml-expected data // re-resolve our subtree to set any mathml-expected data
nsMathMLContainerFrame::RebuildAutomaticDataForChildren(this); nsMathMLContainerFrame::RebuildAutomaticDataForChildren(this);
@ -455,10 +455,10 @@ class nsMathMLmathInlineFrame final : public nsInlineFrame,
friend nsContainerFrame* NS_NewMathMLmathInlineFrame( friend nsContainerFrame* NS_NewMathMLmathInlineFrame(
mozilla::PresShell* aPresShell, ComputedStyle* aStyle); mozilla::PresShell* aPresShell, ComputedStyle* aStyle);
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override { nsFrameList&& aChildList) override {
NS_ASSERTION(aListID == kPrincipalList, "unexpected frame list"); NS_ASSERTION(aListID == kPrincipalList, "unexpected frame list");
nsInlineFrame::SetInitialChildList(aListID, aChildList); nsInlineFrame::SetInitialChildList(aListID, std::move(aChildList));
// re-resolve our subtree to set any mathml-expected data // re-resolve our subtree to set any mathml-expected data
nsMathMLContainerFrame::RebuildAutomaticDataForChildren(this); nsMathMLContainerFrame::RebuildAutomaticDataForChildren(this);
} }

View File

@ -42,8 +42,8 @@ nsresult nsMathMLSelectedFrame::ChildListChanged(int32_t aModType) {
} }
void nsMathMLSelectedFrame::SetInitialChildList(ChildListID aListID, void nsMathMLSelectedFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
nsMathMLContainerFrame::SetInitialChildList(aListID, aChildList); nsMathMLContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
// This very first call to GetSelectedFrame() will cause us to be marked as an // This very first call to GetSelectedFrame() will cause us to be marked as an
// embellished operator if the selected child is an embellished operator // embellished operator if the selected child is an embellished operator
GetSelectedFrame(); GetSelectedFrame();

View File

@ -16,8 +16,8 @@ class nsMathMLSelectedFrame : public nsMathMLContainerFrame {
NS_IMETHOD NS_IMETHOD
TransmitAutomaticData() override; TransmitAutomaticData() override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual nsresult ChildListChanged(int32_t aModType) override; virtual nsresult ChildListChanged(int32_t aModType) override;

View File

@ -89,9 +89,9 @@ void nsMathMLTokenFrame::MarkTextFramesAsTokenMathML() {
} }
void nsMathMLTokenFrame::SetInitialChildList(ChildListID aListID, void nsMathMLTokenFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
// First, let the base class do its work // First, let the base class do its work
nsMathMLContainerFrame::SetInitialChildList(aListID, aChildList); nsMathMLContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
MarkTextFramesAsTokenMathML(); MarkTextFramesAsTokenMathML();
} }

View File

@ -40,8 +40,8 @@ class nsMathMLTokenFrame : public nsMathMLContainerFrame {
virtual eMathMLFrameType GetMathMLFrameType() override; virtual eMathMLFrameType GetMathMLFrameType() override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList& aChildList) override;

View File

@ -164,8 +164,8 @@ nsIFrame* nsMathMLmactionFrame::GetSelectedFrame() {
} }
void nsMathMLmactionFrame::SetInitialChildList(ChildListID aListID, void nsMathMLmactionFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
nsMathMLSelectedFrame::SetInitialChildList(aListID, aChildList); nsMathMLSelectedFrame::SetInitialChildList(aListID, std::move(aChildList));
if (!mSelectedFrame) { if (!mSelectedFrame) {
mActionType = NS_MATHML_ACTION_TYPE_NONE; mActionType = NS_MATHML_ACTION_TYPE_NONE;

View File

@ -30,8 +30,8 @@ class nsMathMLmactionFrame final : public nsMathMLSelectedFrame {
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual nsresult ChildListChanged(int32_t aModType) override; virtual nsresult ChildListChanged(int32_t aModType) override;

View File

@ -907,9 +907,9 @@ nsMathMLmoFrame::TransmitAutomaticData() {
} }
void nsMathMLmoFrame::SetInitialChildList(ChildListID aListID, void nsMathMLmoFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
// First, let the parent class do its work // First, let the parent class do its work
nsMathMLTokenFrame::SetInitialChildList(aListID, aChildList); nsMathMLTokenFrame::SetInitialChildList(aListID, std::move(aChildList));
ProcessTextData(); ProcessTextData();
} }

View File

@ -39,8 +39,8 @@ class nsMathMLmoFrame final : public nsMathMLTokenFrame {
NS_IMETHOD NS_IMETHOD
TransmitAutomaticData() override; TransmitAutomaticData() override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize, virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput, const ReflowInput& aReflowInput,

View File

@ -879,8 +879,8 @@ NS_IMPL_FRAMEARENA_HELPERS(nsMathMLmtableFrame)
nsMathMLmtableFrame::~nsMathMLmtableFrame() = default; nsMathMLmtableFrame::~nsMathMLmtableFrame() = default;
void nsMathMLmtableFrame::SetInitialChildList(ChildListID aListID, void nsMathMLmtableFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
nsTableFrame::SetInitialChildList(aListID, aChildList); nsTableFrame::SetInitialChildList(aListID, std::move(aChildList));
MapAllAttributesIntoCSS(this); MapAllAttributesIntoCSS(this);
} }

View File

@ -72,8 +72,8 @@ class nsMathMLmtableFrame final : public nsTableFrame {
// Overloaded nsTableFrame methods // Overloaded nsTableFrame methods
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override { nsFrameList& aFrameList) override {

View File

@ -118,7 +118,7 @@ nsTableColGroupFrame* nsTableColGroupFrame::GetLastRealColGroup(
// don't set mColCount here, it is done in AddColsToTable // don't set mColCount here, it is done in AddColsToTable
void nsTableColGroupFrame::SetInitialChildList(ChildListID aListID, void nsTableColGroupFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
MOZ_ASSERT(mFrames.IsEmpty(), MOZ_ASSERT(mFrames.IsEmpty(),
"unexpected second call to SetInitialChildList"); "unexpected second call to SetInitialChildList");
MOZ_ASSERT(aListID == kPrincipalList, "unexpected child list"); MOZ_ASSERT(aListID == kPrincipalList, "unexpected child list");

View File

@ -84,8 +84,8 @@ class nsTableColGroupFrame final : public nsContainerFrame {
/** @see nsIFrame::DidSetComputedStyle */ /** @see nsIFrame::DidSetComputedStyle */
virtual void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override; virtual void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override; nsFrameList& aFrameList) override;
virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,

View File

@ -300,9 +300,9 @@ void nsTableFrame::UnregisterPositionedTablePart(nsIFrame* aFrame,
// XXX this needs to be cleaned up so that the frame constructor breaks out col // XXX this needs to be cleaned up so that the frame constructor breaks out col
// group frames into a separate child list, bug 343048. // group frames into a separate child list, bug 343048.
void nsTableFrame::SetInitialChildList(ChildListID aListID, void nsTableFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
if (aListID != kPrincipalList) { if (aListID != kPrincipalList) {
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
return; return;
} }

View File

@ -194,8 +194,8 @@ class nsTableFrame : public nsContainerFrame {
/** @see nsIFrame::DidSetComputedStyle */ /** @see nsIFrame::DidSetComputedStyle */
virtual void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override; virtual void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override; nsFrameList& aFrameList) override;
virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,

View File

@ -83,7 +83,7 @@ void nsTableWrapperFrame::GetChildLists(nsTArray<ChildList>* aLists) const {
} }
void nsTableWrapperFrame::SetInitialChildList(ChildListID aListID, void nsTableWrapperFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
if (kCaptionList == aListID) { if (kCaptionList == aListID) {
#ifdef DEBUG #ifdef DEBUG
nsIFrame::VerifyDirtyBitSet(aChildList); nsIFrame::VerifyDirtyBitSet(aChildList);
@ -101,7 +101,7 @@ void nsTableWrapperFrame::SetInitialChildList(ChildListID aListID,
aChildList.FirstChild() == aChildList.LastChild() && aChildList.FirstChild() == aChildList.LastChild() &&
aChildList.FirstChild()->IsTableFrame()), aChildList.FirstChild()->IsTableFrame()),
"expected a single table frame in principal child list"); "expected a single table frame in principal child list");
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
} }
} }

View File

@ -42,8 +42,8 @@ class nsTableWrapperFrame : public nsContainerFrame {
virtual const nsFrameList& GetChildList(ChildListID aListID) const override; virtual const nsFrameList& GetChildList(ChildListID aListID) const override;
virtual void GetChildLists(nsTArray<ChildList>* aLists) const override; virtual void GetChildLists(nsTArray<ChildList>* aLists) const override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override; nsFrameList& aFrameList) override;
virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,

View File

@ -141,8 +141,8 @@ nsIFrame* nsBoxFrame::SlowOrdinalGroupAwareSibling(nsIFrame* aBox, bool aNext) {
} }
void nsBoxFrame::SetInitialChildList(ChildListID aListID, void nsBoxFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
nsContainerFrame::SetInitialChildList(aListID, aChildList); nsContainerFrame::SetInitialChildList(aListID, std::move(aChildList));
if (aListID == kPrincipalList) { if (aListID == kPrincipalList) {
// initialize our list of infos. // initialize our list of infos.
nsBoxLayoutState state(PresContext()); nsBoxLayoutState state(PresContext());

View File

@ -82,8 +82,8 @@ class nsBoxFrame : public nsContainerFrame {
const ReflowInput& aReflowInput, const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override; nsReflowStatus& aStatus) override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override; nsFrameList& aFrameList) override;
virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,

View File

@ -255,7 +255,7 @@ void nsMenuFrame::SetPopupFrame(nsFrameList& aFrameList) {
} }
void nsMenuFrame::SetInitialChildList(ChildListID aListID, void nsMenuFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
if (aListID == kPrincipalList || aListID == kPopupList) { if (aListID == kPrincipalList || aListID == kPopupList) {
NS_ASSERTION(!HasPopup(), "SetInitialChildList called twice?"); NS_ASSERTION(!HasPopup(), "SetInitialChildList called twice?");
#ifdef DEBUG #ifdef DEBUG
@ -265,7 +265,7 @@ void nsMenuFrame::SetInitialChildList(ChildListID aListID,
#endif #endif
SetPopupFrame(aChildList); SetPopupFrame(aChildList);
} }
nsBoxFrame::SetInitialChildList(aListID, aChildList); nsBoxFrame::SetInitialChildList(aListID, std::move(aChildList));
} }
void nsMenuFrame::DestroyFrom(nsIFrame* aDestructRoot, void nsMenuFrame::DestroyFrom(nsIFrame* aDestructRoot,

View File

@ -109,8 +109,8 @@ class nsMenuFrame final : public nsBoxFrame, public nsIReflowCallback {
mozilla::WidgetGUIEvent* aEvent, mozilla::WidgetGUIEvent* aEvent,
nsEventStatus* aEventStatus) override; nsEventStatus* aEventStatus) override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override; nsFrameList& aFrameList) override;
virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,

View File

@ -66,14 +66,14 @@ void nsPopupSetFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
} }
void nsPopupSetFrame::SetInitialChildList(ChildListID aListID, void nsPopupSetFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
if (aListID == kPopupList) { if (aListID == kPopupList) {
NS_ASSERTION(mPopupList.IsEmpty(), NS_ASSERTION(mPopupList.IsEmpty(),
"SetInitialChildList on non-empty child list"); "SetInitialChildList on non-empty child list");
AddPopupFrameList(aChildList); AddPopupFrameList(aChildList);
return; return;
} }
nsBoxFrame::SetInitialChildList(aListID, aChildList); nsBoxFrame::SetInitialChildList(aListID, std::move(aChildList));
} }
const nsFrameList& nsPopupSetFrame::GetChildList(ChildListID aListID) const { const nsFrameList& nsPopupSetFrame::GetChildList(ChildListID aListID) const {

View File

@ -30,8 +30,8 @@ class nsPopupSetFrame final : public nsBoxFrame {
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override; nsFrameList& aFrameList) override;
virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override;

View File

@ -1044,8 +1044,8 @@ void nsSliderFrame::SetCurrentPositionInternal(nsIContent* aScrollbar,
} }
void nsSliderFrame::SetInitialChildList(ChildListID aListID, void nsSliderFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) { nsFrameList&& aChildList) {
nsBoxFrame::SetInitialChildList(aListID, aChildList); nsBoxFrame::SetInitialChildList(aListID, std::move(aChildList));
if (aListID == kPrincipalList) { if (aListID == kPrincipalList) {
AddListener(); AddListener();
} }

View File

@ -85,8 +85,8 @@ class nsSliderFrame final : public nsBoxFrame {
nsEventStatus* aEventStatus) override; nsEventStatus* aEventStatus) override;
// nsContainerFrame overrides // nsContainerFrame overrides
virtual void SetInitialChildList(ChildListID aListID, void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) override; nsFrameList&& aChildList) override;
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) override; nsFrameList& aFrameList) override;
virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,