b=25245 Changed Reflow() to return 0 for a max-element-width if the

image has a percentage based width
This commit is contained in:
troy%netscape.com 2000-01-30 18:28:38 +00:00
Родитель 0437b82128
Коммит 459938a056
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -239,7 +239,12 @@ nsImageFrame::Reflow(nsIPresContext* aPresContext,
GetDesiredSize(aPresContext, aReflowState, aMetrics);
AddBordersAndPadding(aPresContext, aReflowState, aMetrics, mBorderPadding);
if (nsnull != aMetrics.maxElementSize) {
aMetrics.maxElementSize->width = aMetrics.width;
// If we have a percentage based width, then our maximum width is 0
if (eStyleUnit_Percent == aReflowState.mStylePosition->mWidth.GetUnit()) {
aMetrics.maxElementSize->width = 0;
} else {
aMetrics.maxElementSize->width = aMetrics.width;
}
aMetrics.maxElementSize->height = aMetrics.height;
}
aStatus = NS_FRAME_COMPLETE;

Просмотреть файл

@ -239,7 +239,12 @@ nsImageFrame::Reflow(nsIPresContext* aPresContext,
GetDesiredSize(aPresContext, aReflowState, aMetrics);
AddBordersAndPadding(aPresContext, aReflowState, aMetrics, mBorderPadding);
if (nsnull != aMetrics.maxElementSize) {
aMetrics.maxElementSize->width = aMetrics.width;
// If we have a percentage based width, then our maximum width is 0
if (eStyleUnit_Percent == aReflowState.mStylePosition->mWidth.GetUnit()) {
aMetrics.maxElementSize->width = 0;
} else {
aMetrics.maxElementSize->width = aMetrics.width;
}
aMetrics.maxElementSize->height = aMetrics.height;
}
aStatus = NS_FRAME_COMPLETE;