mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-08 12:22:34 +00:00
fixes bug #15265, changes reviewed by kmcclusk. Changes in the way it used the computed values
This commit is contained in:
parent
a3b54e240a
commit
d79137420a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user