зеркало из https://github.com/mozilla/pjs.git
Use new PropagateContentOffsets API
This commit is contained in:
Родитель
30f8f69d23
Коммит
11fba76f60
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче