Changed Reflow to check for whether it is native mode or not. InGFX mode it now call the base class' (nsLeafFrame)
Reflow so it does a better job of laying out. git-svn-id: svn://10.0.0.236/trunk@44840 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -233,20 +233,27 @@ nsFormControlFrame::Reflow(nsIPresContext& aPresContext,
|
||||
nsFormFrame::AddFormControlFrame(aPresContext, *this);
|
||||
}
|
||||
|
||||
GetDesiredSize(&aPresContext, aReflowState, aDesiredSize, mWidgetSize);
|
||||
nsWidgetRendering mode;
|
||||
aPresContext.GetWidgetRenderingMode(&mode);
|
||||
if (eWidgetRendering_Native == mode) {
|
||||
GetDesiredSize(&aPresContext, aReflowState, aDesiredSize, mWidgetSize);
|
||||
|
||||
if (!mDidInit) {
|
||||
PostCreateWidget(&aPresContext, aDesiredSize.width, aDesiredSize.height);
|
||||
mDidInit = PR_TRUE;
|
||||
}
|
||||
|
||||
aDesiredSize.ascent = aDesiredSize.height;
|
||||
aDesiredSize.descent = 0;
|
||||
if (!mDidInit) {
|
||||
PostCreateWidget(&aPresContext, aDesiredSize.width, aDesiredSize.height);
|
||||
mDidInit = PR_TRUE;
|
||||
}
|
||||
aDesiredSize.ascent = aDesiredSize.height;
|
||||
aDesiredSize.descent = 0;
|
||||
|
||||
if (nsnull != aDesiredSize.maxElementSize) {
|
||||
//XXX aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding);
|
||||
} else {
|
||||
GetDesiredSize(&aPresContext, aReflowState, aDesiredSize);
|
||||
if (!mDidInit) {
|
||||
PostCreateWidget(&aPresContext, aDesiredSize.width, aDesiredSize.height);
|
||||
mDidInit = PR_TRUE;
|
||||
}
|
||||
return nsLeafFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
}
|
||||
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user