diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 9d4081ac951c..59601b8e5bec 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -2966,7 +2966,7 @@ ContainerState::FindFixedPosFrameForLayerData(AnimatedGeometryRoot* aAnimatedGeo return viewport; } // Viewports with no fixed-pos frames are not relevant. - if (!viewport->GetFirstChild(nsIFrame::kFixedList)) { + if (!viewport->GetChildList(nsIFrame::kFixedList).FirstChild()) { return nullptr; } for (const nsIFrame* f = *aAnimatedGeometryRoot; f; f = f->GetParent()) { diff --git a/layout/base/nsBidiPresUtils.cpp b/layout/base/nsBidiPresUtils.cpp index ef9cf0f10c6b..0ac1bb6b3a1b 100644 --- a/layout/base/nsBidiPresUtils.cpp +++ b/layout/base/nsBidiPresUtils.cpp @@ -1187,7 +1187,7 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame, } else { // For a non-leaf frame, recurse into TraverseFrames nsIFrame* kid = frame->GetFirstPrincipalChild(); - MOZ_ASSERT(!frame->GetFirstChild(nsIFrame::kOverflowList), + MOZ_ASSERT(!frame->GetChildList(nsIFrame::kOverflowList).FirstChild(), "should have drained the overflow list above"); if (kid) { const nsStyleTextReset* text = frame->StyleTextReset(); diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index fffa9479b6bc..0bd6558ba419 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -8765,7 +8765,7 @@ nsCSSFrameConstructor::ReplicateFixedFrames(nsPageContentFrame* aParentFrame) } nsFrameItems fixedPlaceholders; - nsIFrame* firstFixed = prevPageContentFrame->GetFirstChild(nsIFrame::kFixedList); + nsIFrame* firstFixed = prevPageContentFrame->GetChildList(nsIFrame::kFixedList).FirstChild(); if (!firstFixed) { return NS_OK; } @@ -9045,13 +9045,13 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame, // pseudo parent was created for the space, and should now be removed. (IsWhitespaceFrame(aFrame) && parent->PrincipalChildList().OnlyChild()) || - // If we're a table-column-group, then the GetFirstChild check above is + // If we're a table-column-group, then the OnlyChild check above is // not going to catch cases when we're the first child. (inFlowFrame->GetType() == nsGkAtoms::tableColGroupFrame && - parent->GetFirstChild(nsIFrame::kColGroupList) == inFlowFrame) || + parent->GetChildList(nsIFrame::kColGroupList).FirstChild() == inFlowFrame) || // Similar if we're a table-caption. (inFlowFrame->IsTableCaption() && - parent->GetFirstChild(nsIFrame::kCaptionList) == inFlowFrame)) { + parent->GetChildList(nsIFrame::kCaptionList).FirstChild() == inFlowFrame)) { // We're the first or last frame in the pseudo. Need to reframe. // Good enough to recreate frames for |parent|'s content *aResult = RecreateFramesForContent(parent->GetContent(), true, aFlags, diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index ddbed8373031..35fac4778256 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -1316,7 +1316,7 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame) if (parent->GetType() == nsGkAtoms::popupSetFrame) { id = nsIFrame::kPopupList; } else { - nsIFrame* firstPopup = parent->GetFirstChild(nsIFrame::kPopupList); + nsIFrame* firstPopup = parent->GetChildList(nsIFrame::kPopupList).FirstChild(); MOZ_ASSERT(!firstPopup || !firstPopup->GetNextSibling(), "We assume popupList only has one child, but it has more."); id = firstPopup == aChildFrame @@ -3626,7 +3626,7 @@ AddBoxesForFrame(nsIFrame* aFrame, if (pseudoType == nsCSSAnonBoxes::tableOuter) { AddBoxesForFrame(aFrame->GetFirstPrincipalChild(), aCallback); - nsIFrame* kid = aFrame->GetFirstChild(nsIFrame::kCaptionList); + nsIFrame* kid = aFrame->GetChildList(nsIFrame::kCaptionList).FirstChild(); if (kid) { AddBoxesForFrame(kid, aCallback); } @@ -3662,7 +3662,7 @@ nsLayoutUtils::GetFirstNonAnonymousFrame(nsIFrame* aFrame) if (f) { return f; } - nsIFrame* kid = aFrame->GetFirstChild(nsIFrame::kCaptionList); + nsIFrame* kid = aFrame->GetChildList(nsIFrame::kCaptionList).FirstChild(); if (kid) { f = GetFirstNonAnonymousFrame(kid); if (f) { diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index affe8e271d88..d1145138acb9 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -105,7 +105,7 @@ static bool BlockHasAnyFloats(nsIFrame* aFrame) nsBlockFrame* block = nsLayoutUtils::GetAsBlock(aFrame); if (!block) return false; - if (block->GetFirstChild(nsIFrame::kFloatList)) + if (block->GetChildList(nsIFrame::kFloatList).FirstChild()) return true; nsLineList::iterator line = block->begin_lines(); @@ -6290,7 +6290,7 @@ nsBlockFrame::RecoverFloats(nsFloatManager& aFloatManager, WritingMode aWM, } // Recurse into our overflow container children - for (nsIFrame* oc = GetFirstChild(kOverflowContainersList); + for (nsIFrame* oc = GetChildList(kOverflowContainersList).FirstChild(); oc; oc = oc->GetNextSibling()) { RecoverFloatsFor(oc, aFloatManager, aWM, aContainerSize); } @@ -7210,7 +7210,7 @@ nsBlockFrame::DoCollectFloats(nsIFrame* aFrame, nsFrameList& aList, } DoCollectFloats(aFrame->GetFirstPrincipalChild(), aList, true); - DoCollectFloats(aFrame->GetFirstChild(kOverflowList), aList, true); + DoCollectFloats(aFrame->GetChildList(kOverflowList).FirstChild(), aList, true); } if (!aCollectSiblings) break; diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index 53a1d1bfc3c4..2e5372180825 100644 --- a/layout/generic/nsFlexContainerFrame.cpp +++ b/layout/generic/nsFlexContainerFrame.cpp @@ -904,13 +904,13 @@ GetFirstNonAnonBoxDescendant(nsIFrame* aFrame) // the table, for use in DOM comparisons to things outside of the table.) if (MOZ_UNLIKELY(aFrame->GetType() == nsGkAtoms::tableOuterFrame)) { nsIFrame* captionDescendant = - GetFirstNonAnonBoxDescendant(aFrame->GetFirstChild(kCaptionList)); + GetFirstNonAnonBoxDescendant(aFrame->GetChildList(kCaptionList).FirstChild()); if (captionDescendant) { return captionDescendant; } } else if (MOZ_UNLIKELY(aFrame->GetType() == nsGkAtoms::tableFrame)) { nsIFrame* colgroupDescendant = - GetFirstNonAnonBoxDescendant(aFrame->GetFirstChild(kColGroupList)); + GetFirstNonAnonBoxDescendant(aFrame->GetChildList(kColGroupList).FirstChild()); if (colgroupDescendant) { return colgroupDescendant; } diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index d29b9e35cea9..fab73a550198 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -4763,7 +4763,7 @@ ScrollFrameHelper::ReflowFinished() mMayHaveDirtyFixedChildren = false; nsIFrame* parentFrame = mOuter->GetParent(); for (nsIFrame* fixedChild = - parentFrame->GetFirstChild(nsIFrame::kFixedList); + parentFrame->GetChildList(nsIFrame::kFixedList).FirstChild(); fixedChild; fixedChild = fixedChild->GetNextSibling()) { // force a reflow of the fixed child presContext->PresShell()-> diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 2f7e5f480015..1a0923e88b3b 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -1067,16 +1067,12 @@ public: */ void GetCrossDocChildLists(nsTArray* aLists); - // XXXbz this method should go away - nsIFrame* GetFirstChild(ChildListID aListID) const { - return GetChildList(aListID).FirstChild(); - } // XXXmats this method should also go away then nsIFrame* GetLastChild(ChildListID aListID) const { return GetChildList(aListID).LastChild(); } nsIFrame* GetFirstPrincipalChild() const { - return GetFirstChild(kPrincipalList); + return GetChildList(kPrincipalList).FirstChild(); } // The individual concrete child lists. diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index e9f505eec978..6c4c580e55f0 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -1141,7 +1141,7 @@ CanTextCrossFrameBoundary(nsIFrame* aFrame, nsIAtom* aType) if (continuesTextRun) { result.mFrameToScan = aFrame->GetFirstPrincipalChild(); result.mOverflowFrameToScan = - aFrame->GetFirstChild(nsIFrame::kOverflowList); + aFrame->GetChildList(nsIFrame::kOverflowList).FirstChild(); NS_WARN_IF_FALSE(!result.mOverflowFrameToScan, "Scanning overflow inline frames is something we should avoid"); result.mScanSiblings = true;