зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1226875 - Remove nsIFrame::GetFirstChild(). r=mats
--HG-- extra : commitid : J8NTL74JosY extra : rebase_source : 50a196905ac06d09fea17bb1aa17efe821cc7cbb
This commit is contained in:
Родитель
34315674ac
Коммит
79afc81f6e
|
@ -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()) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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()->
|
||||
|
|
|
@ -1067,16 +1067,12 @@ public:
|
|||
*/
|
||||
void GetCrossDocChildLists(nsTArray<ChildList>* 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.
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче