Changed DidReflow() so we size and position our view before we call

the child frame's DidReflow() function. This ensures that the parent view
is properly positioned before positioning the child views. This is
important when positioning the widgets
This commit is contained in:
troy%netscape.com 1999-04-11 00:56:28 +00:00
Родитель bc9673671a
Коммит 56b81ad01e
2 изменённых файлов: 10 добавлений и 8 удалений

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

@ -88,6 +88,10 @@ nsContainerFrame::DidReflow(nsIPresContext& aPresContext,
NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS,
("enter nsContainerFrame::DidReflow: status=%d",
aStatus));
// Let nsFrame position and size our view (if we have one), and clear
// the NS_FRAME_IN_REFLOW bit
nsresult result = nsFrame::DidReflow(aPresContext, aStatus);
if (NS_FRAME_REFLOW_FINISHED == aStatus) {
// Apply DidReflow to each and every list that this frame implements
nsIAtom* listName = nsnull;
@ -110,10 +114,7 @@ nsContainerFrame::DidReflow(nsIPresContext& aPresContext,
}
NS_FRAME_TRACE_OUT("nsContainerFrame::DidReflow");
// Let nsFrame position and size our view (if we have one), and clear
// the NS_FRAME_IN_REFLOW bit
return nsFrame::DidReflow(aPresContext, aStatus);
return result;
}
/////////////////////////////////////////////////////////////////////////////

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

@ -88,6 +88,10 @@ nsContainerFrame::DidReflow(nsIPresContext& aPresContext,
NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS,
("enter nsContainerFrame::DidReflow: status=%d",
aStatus));
// Let nsFrame position and size our view (if we have one), and clear
// the NS_FRAME_IN_REFLOW bit
nsresult result = nsFrame::DidReflow(aPresContext, aStatus);
if (NS_FRAME_REFLOW_FINISHED == aStatus) {
// Apply DidReflow to each and every list that this frame implements
nsIAtom* listName = nsnull;
@ -110,10 +114,7 @@ nsContainerFrame::DidReflow(nsIPresContext& aPresContext,
}
NS_FRAME_TRACE_OUT("nsContainerFrame::DidReflow");
// Let nsFrame position and size our view (if we have one), and clear
// the NS_FRAME_IN_REFLOW bit
return nsFrame::DidReflow(aPresContext, aStatus);
return result;
}
/////////////////////////////////////////////////////////////////////////////