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:
Родитель
9d10ef405e
Коммит
8d51d27dbe
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче