Make image controls splittable just like regular images. Bug 409659, r+sr=roc,

a=dsicore


git-svn-id: svn://10.0.0.236/trunk@242428 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2008-01-05 06:44:38 +00:00
parent 3bef1efa33
commit 36a70da56f
9 changed files with 57 additions and 9 deletions

View File

@@ -834,12 +834,10 @@ nsImageFrame::Reflow(nsPresContext* aPresContext,
((loadStatus & imgIRequest::STATUS_SIZE_AVAILABLE) || (mState & IMAGE_SIZECONSTRAINED)) &&
NS_UNCONSTRAINEDSIZE != aReflowState.availableHeight &&
aMetrics.height > aReflowState.availableHeight) {
// split an image frame but not an image control frame
if (nsGkAtoms::imageFrame == GetType()) {
// our desired height was greater than 0, so to avoid infinite splitting, use 1 pixel as the min
aMetrics.height = PR_MAX(nsPresContext::CSSPixelsToAppUnits(1), aReflowState.availableHeight);
aStatus = NS_FRAME_NOT_COMPLETE;
}
// our desired height was greater than 0, so to avoid infinite
// splitting, use 1 pixel as the min
aMetrics.height = PR_MAX(nsPresContext::CSSPixelsToAppUnits(1), aReflowState.availableHeight);
aStatus = NS_FRAME_NOT_COMPLETE;
}
aMetrics.mOverflowArea.SetRect(0, 0, aMetrics.width, aMetrics.height);