fixes bug #15265, changes reviewed by kmcclusk. Changes in the way it used the computed values

This commit is contained in:
rods%netscape.com 1999-10-04 13:49:00 +00:00
parent a3b54e240a
commit d79137420a

View File

@ -927,12 +927,13 @@ nsGfxTextControlFrame::Reflow(nsIPresContext& aPresContext,
aStatus = NS_FRAME_COMPLETE;
} else {
#if 0 // this is the right way
// this is the right way
// Quirks mode will NOT obey CSS border and padding
// GetDesiredSize calculates the size without CSS borders
// the nsLeafFrame::Reflow will add in the borders
if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedWidth &&
NS_UNCONSTRAINEDSIZE != aReflowState.mComputedWidth) {
NS_UNCONSTRAINEDSIZE != aReflowState.mComputedHeight) {
aMetrics.width = aReflowState.mComputedWidth;
aMetrics.height = aReflowState.mComputedHeight;
} else {
@ -945,19 +946,12 @@ nsGfxTextControlFrame::Reflow(nsIPresContext& aPresContext,
if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedWidth) {
aMetrics.width = aReflowState.mComputedWidth;
}
if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedWidth) {
if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedHeight) {
aMetrics.height = aReflowState.mComputedHeight;
}
}
aStatus = NS_FRAME_COMPLETE;
#else // this is the old way
if (eCompatibility_NavQuirks == mode) {
GetDesiredSize(&aPresContext, aReflowState, aMetrics);
aStatus = NS_FRAME_COMPLETE;
} else {
rv = nsLeafFrame::Reflow(aPresContext, aMetrics, aReflowState, aStatus);
}
#endif
// Now resize the widget if there is one, in this case it is
// the webshell for the editor
if (!mDidInit) {