Bug 1226875 - Remove nsIFrame::GetLastChild(). r=mats

--HG--
extra : commitid : J8NTL74JosY
extra : rebase_source : ea686ef5e1bd5d59701ffb4c309c9ff9d0435beb
This commit is contained in:
Ting-Yu Lin 2015-11-26 17:12:39 +08:00
Родитель 79afc81f6e
Коммит 78fb3c80ac
5 изменённых файлов: 6 добавлений и 10 удалений

Просмотреть файл

@ -6023,7 +6023,7 @@ AdjustAppendParentForAfterContent(nsFrameManager* aFrameManager,
// Ensure that all normal flow children are on the principal child list.
parent->DrainSelfOverflowList();
nsIFrame* child = parent->GetLastChild(nsIFrame::kPrincipalList);
nsIFrame* child = parent->GetChildList(nsIFrame::kPrincipalList).LastChild();
if (child && child->IsPseudoFrame(aContainer) &&
!child->IsGeneratedContentFrame()) {
// Drill down into non-generated pseudo frames of aContainer.
@ -6116,7 +6116,7 @@ FindAppendPrevSibling(nsIFrame* aParentFrame, nsIFrame* aAfterFrame)
aParentFrame->DrainSelfOverflowList();
return aParentFrame->GetLastChild(kPrincipalList);
return aParentFrame->GetChildList(kPrincipalList).LastChild();
}
/**
@ -11932,7 +11932,7 @@ nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
// Try to find one after all
nsIFrame* parentPrevCont = aFrame->GetPrevContinuation();
while (parentPrevCont) {
prevSibling = parentPrevCont->GetLastChild(kPrincipalList);
prevSibling = parentPrevCont->GetChildList(kPrincipalList).LastChild();
if (prevSibling) {
break;
}

Просмотреть файл

@ -1432,7 +1432,7 @@ nsLayoutUtils::GetAfterFrameForContent(nsIFrame* aFrame,
LastContinuationWithChild(static_cast<nsContainerFrame*>(
LastContinuationOrIBSplitSibling(genConParentFrame)));
nsIFrame* childFrame =
lastParentContinuation->GetLastChild(nsIFrame::kPrincipalList);
lastParentContinuation->GetChildList(nsIFrame::kPrincipalList).LastChild();
if (childFrame &&
childFrame->IsPseudoFrame(aContent) &&
!childFrame->IsGeneratedContentFrame()) {

Просмотреть файл

@ -6557,7 +6557,7 @@ FindBlockFrameOrBR(nsIFrame* aFrame, nsDirection aDirection)
// Iterate over children and call ourselves recursively
if (aDirection == eDirPrevious) {
nsIFrame* child = aFrame->GetLastChild(nsIFrame::kPrincipalList);
nsIFrame* child = aFrame->GetChildList(nsIFrame::kPrincipalList).LastChild();
while(child && !result.mContent) {
result = FindBlockFrameOrBR(child, aDirection);
child = child->GetPrevSibling();

Просмотреть файл

@ -1067,10 +1067,6 @@ public:
*/
void GetCrossDocChildLists(nsTArray<ChildList>* aLists);
// XXXmats this method should also go away then
nsIFrame* GetLastChild(ChildListID aListID) const {
return GetChildList(aListID).LastChild();
}
nsIFrame* GetFirstPrincipalChild() const {
return GetChildList(kPrincipalList).FirstChild();
}

Просмотреть файл

@ -391,7 +391,7 @@ nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
}
if (isRTL) {
childFrame = this->GetLastChild(nsIFrame::kPrincipalList);
childFrame = this->GetChildList(nsIFrame::kPrincipalList).LastChild();
} else {
childFrame = firstChild;
}