bug 133756 - always return last height during special height reflow. a=roc+moz, sr=attinasi, r=alexsavulov

This commit is contained in:
karnaze%netscape.com 2002-03-31 17:44:57 +00:00
Родитель 0ccc1df6f1
Коммит 306b3b8eae
4 изменённых файлов: 14 добавлений и 4 удалений

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

@ -893,7 +893,6 @@ nsTableRowFrame::ReflowChildren(nsIPresContext* aPresContext,
PRBool aDirtyOnly) PRBool aDirtyOnly)
{ {
aStatus = NS_FRAME_COMPLETE; aStatus = NS_FRAME_COMPLETE;
if (!mFrames.FirstChild()) return NS_OK;
GET_PIXELS_TO_TWIPS(aPresContext, p2t); GET_PIXELS_TO_TWIPS(aPresContext, p2t);
PRBool borderCollapse = (((nsTableFrame*)aTableFrame.GetFirstInFlow())->IsBorderCollapse()); PRBool borderCollapse = (((nsTableFrame*)aTableFrame.GetFirstInFlow())->IsBorderCollapse());
@ -1137,7 +1136,10 @@ nsTableRowFrame::ReflowChildren(nsIPresContext* aPresContext,
// just set our width to what was available. The table will calculate the width and not use our value. // just set our width to what was available. The table will calculate the width and not use our value.
aDesiredSize.width = aReflowState.availableWidth; aDesiredSize.width = aReflowState.availableWidth;
if (NS_UNCONSTRAINEDSIZE == aReflowState.availableHeight) { if (aReflowState.mFlags.mSpecialHeightReflow) {
aDesiredSize.height = mRect.height;
}
else if (NS_UNCONSTRAINEDSIZE == aReflowState.availableHeight) {
aDesiredSize.height = CalcHeight(aReflowState); aDesiredSize.height = CalcHeight(aReflowState);
if (mPrevInFlow) { if (mPrevInFlow) {
nscoord height = CalcHeightFromUnpaginatedHeight(aPresContext, *this); nscoord height = CalcHeightFromUnpaginatedHeight(aPresContext, *this);

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

@ -493,6 +493,9 @@ nsTableRowGroupFrame::ReflowChildren(nsIPresContext* aPresContext,
} }
} }
if (aReflowState.reflowState.mFlags.mSpecialHeightReflow) {
aDesiredSize.height = mRect.height;
}
return rv; return rv;
} }

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

@ -893,7 +893,6 @@ nsTableRowFrame::ReflowChildren(nsIPresContext* aPresContext,
PRBool aDirtyOnly) PRBool aDirtyOnly)
{ {
aStatus = NS_FRAME_COMPLETE; aStatus = NS_FRAME_COMPLETE;
if (!mFrames.FirstChild()) return NS_OK;
GET_PIXELS_TO_TWIPS(aPresContext, p2t); GET_PIXELS_TO_TWIPS(aPresContext, p2t);
PRBool borderCollapse = (((nsTableFrame*)aTableFrame.GetFirstInFlow())->IsBorderCollapse()); PRBool borderCollapse = (((nsTableFrame*)aTableFrame.GetFirstInFlow())->IsBorderCollapse());
@ -1137,7 +1136,10 @@ nsTableRowFrame::ReflowChildren(nsIPresContext* aPresContext,
// just set our width to what was available. The table will calculate the width and not use our value. // just set our width to what was available. The table will calculate the width and not use our value.
aDesiredSize.width = aReflowState.availableWidth; aDesiredSize.width = aReflowState.availableWidth;
if (NS_UNCONSTRAINEDSIZE == aReflowState.availableHeight) { if (aReflowState.mFlags.mSpecialHeightReflow) {
aDesiredSize.height = mRect.height;
}
else if (NS_UNCONSTRAINEDSIZE == aReflowState.availableHeight) {
aDesiredSize.height = CalcHeight(aReflowState); aDesiredSize.height = CalcHeight(aReflowState);
if (mPrevInFlow) { if (mPrevInFlow) {
nscoord height = CalcHeightFromUnpaginatedHeight(aPresContext, *this); nscoord height = CalcHeightFromUnpaginatedHeight(aPresContext, *this);

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

@ -493,6 +493,9 @@ nsTableRowGroupFrame::ReflowChildren(nsIPresContext* aPresContext,
} }
} }
if (aReflowState.reflowState.mFlags.mSpecialHeightReflow) {
aDesiredSize.height = mRect.height;
}
return rv; return rv;
} }