fixed bug 111872 - 2nd patch to allow the special reflow logic to apply to resize reflows in addition to incremental reflows. sr=attinasi, r=alexsavulov

This commit is contained in:
karnaze%netscape.com 2001-12-11 15:02:36 +00:00
Родитель 9d10ef405e
Коммит 8d51d27dbe
2 изменённых файлов: 14 добавлений и 4 удалений

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

@ -886,7 +886,8 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
nscoord computedPaginatedHeight = 0;
if (aReflowState.mFlags.mSpecialHeightReflow ||
(HadSpecialReflow() && (eReflowReason_Incremental == aReflowState.reason))) {
(HadSpecialReflow() && ((eReflowReason_Incremental == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason)))) {
((nsHTMLReflowState&)aReflowState).mComputedHeight = mRect.height - topInset - bottomInset;
DISPLAY_REFLOW_CHANGE();
}
@ -1090,11 +1091,15 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
SetNeedSpecialReflow(PR_FALSE);
SetHadSpecialReflow(PR_TRUE);
}
else if (HadSpecialReflow() && (eReflowReason_Incremental == aReflowState.reason)) {
else if (HadSpecialReflow() && ((eReflowReason_Incremental == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason))) {
// if the block height value hasn't changed, use the last height of the cell, otherwise ignore it
if (GetLastBlockHeight() == priorBlockHeight) {
aDesiredSize.height = mRect.height;
}
else {
SetHadSpecialReflow(PR_FALSE);
}
}
else if (computedPaginatedHeight > 0) {
nscoord height = computedPaginatedHeight + topInset + bottomInset - CalcHeightOfPrevInFlows(*this);

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

@ -886,7 +886,8 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
nscoord computedPaginatedHeight = 0;
if (aReflowState.mFlags.mSpecialHeightReflow ||
(HadSpecialReflow() && (eReflowReason_Incremental == aReflowState.reason))) {
(HadSpecialReflow() && ((eReflowReason_Incremental == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason)))) {
((nsHTMLReflowState&)aReflowState).mComputedHeight = mRect.height - topInset - bottomInset;
DISPLAY_REFLOW_CHANGE();
}
@ -1090,11 +1091,15 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
SetNeedSpecialReflow(PR_FALSE);
SetHadSpecialReflow(PR_TRUE);
}
else if (HadSpecialReflow() && (eReflowReason_Incremental == aReflowState.reason)) {
else if (HadSpecialReflow() && ((eReflowReason_Incremental == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason))) {
// if the block height value hasn't changed, use the last height of the cell, otherwise ignore it
if (GetLastBlockHeight() == priorBlockHeight) {
aDesiredSize.height = mRect.height;
}
else {
SetHadSpecialReflow(PR_FALSE);
}
}
else if (computedPaginatedHeight > 0) {
nscoord height = computedPaginatedHeight + topInset + bottomInset - CalcHeightOfPrevInFlows(*this);