Make iframes and objects obey CSS max-width/height and min-width/height if
their sizes are unconstrained. Bug 181875, r+sr=roc+moz git-svn-id: svn://10.0.0.236/trunk@141192 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -457,13 +457,17 @@ nsHTMLFrameOuterFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
||||
aDesiredSize.width = aReflowState.mComputedWidth;
|
||||
}
|
||||
else {
|
||||
aDesiredSize.width = NSIntPixelsToTwips(300, p2t);
|
||||
aDesiredSize.width = PR_MIN(PR_MAX(NSIntPixelsToTwips(300, p2t),
|
||||
aReflowState.mComputedMinWidth),
|
||||
aReflowState.mComputedMaxWidth);
|
||||
}
|
||||
if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedHeight) {
|
||||
aDesiredSize.height = aReflowState.mComputedHeight;
|
||||
}
|
||||
else {
|
||||
aDesiredSize.height = NSIntPixelsToTwips(150, p2t);
|
||||
aDesiredSize.height = PR_MIN(PR_MAX(NSIntPixelsToTwips(150, p2t),
|
||||
aReflowState.mComputedMinHeight),
|
||||
aReflowState.mComputedMaxHeight);
|
||||
}
|
||||
aDesiredSize.ascent = aDesiredSize.height;
|
||||
aDesiredSize.descent = 0;
|
||||
|
||||
Reference in New Issue
Block a user