Use new PropagateContentOffsets API

This commit is contained in:
kipp 1998-06-30 20:22:44 +00:00
Родитель 30f8f69d23
Коммит 11fba76f60
4 изменённых файлов: 22 добавлений и 10 удалений

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

@ -54,10 +54,6 @@ void nsPageFrame::CreateFirstChild(nsIPresContext* aPresContext)
mChildCount = 1;
mFirstContentOffset = i;
mLastContentOffset = i;
// We are always a pseudo-frame; make sure our content offset is
// properly pushed upwards
PropagateContentOffsets();
}
NS_RELEASE(cd);
}
@ -169,6 +165,12 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext* aPresContext,
aDesiredSize.height = aReflowState.maxSize.height;
}
// We are always a pseudo-frame; make sure our content offset is
// properly pushed upwards
nsContainerFrame* parent = (nsContainerFrame*) mGeometricParent;
parent->PropagateContentOffsets(this, mFirstContentOffset,
mLastContentOffset, mLastContentIsComplete);
#ifdef NS_DEBUG
PostReflowCheck(aStatus);
#endif

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

@ -54,10 +54,6 @@ void nsPageFrame::CreateFirstChild(nsIPresContext* aPresContext)
mChildCount = 1;
mFirstContentOffset = i;
mLastContentOffset = i;
// We are always a pseudo-frame; make sure our content offset is
// properly pushed upwards
PropagateContentOffsets();
}
NS_RELEASE(cd);
}
@ -169,6 +165,12 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext* aPresContext,
aDesiredSize.height = aReflowState.maxSize.height;
}
// We are always a pseudo-frame; make sure our content offset is
// properly pushed upwards
nsContainerFrame* parent = (nsContainerFrame*) mGeometricParent;
parent->PropagateContentOffsets(this, mFirstContentOffset,
mLastContentOffset, mLastContentIsComplete);
#ifdef NS_DEBUG
PostReflowCheck(aStatus);
#endif

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

@ -1491,7 +1491,11 @@ PRBool nsTableOuterFrame::DeleteChildsNextInFlow(nsIFrame* aChild)
if (nsnull != parent->mFirstChild) {
parent->SetFirstContentOffset(parent->mFirstChild);
if (parent->IsPseudoFrame()) {
parent->PropagateContentOffsets();
// Tell the parent's parent to update its content offsets
nsContainerFrame* pp = (nsContainerFrame*) parent->mGeometricParent;
pp->PropagateContentOffsets(parent, parent->mFirstContentOffset,
parent->mLastContentOffset,
parent->mLastContentIsComplete);
}
}

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

@ -1491,7 +1491,11 @@ PRBool nsTableOuterFrame::DeleteChildsNextInFlow(nsIFrame* aChild)
if (nsnull != parent->mFirstChild) {
parent->SetFirstContentOffset(parent->mFirstChild);
if (parent->IsPseudoFrame()) {
parent->PropagateContentOffsets();
// Tell the parent's parent to update its content offsets
nsContainerFrame* pp = (nsContainerFrame*) parent->mGeometricParent;
pp->PropagateContentOffsets(parent, parent->mFirstContentOffset,
parent->mLastContentOffset,
parent->mLastContentIsComplete);
}
}