Fix for bug 46368. Fixed cellMet.mMaximumWidth for incremental reflow. r=karnaze

This commit is contained in:
peterlubczynski%netscape.com 2000-09-11 22:58:59 +00:00
Родитель 09a4bb02bb
Коммит 144fd4e5e9
2 изменённых файлов: 0 добавлений и 24 удалений

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

@ -1360,18 +1360,6 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext* aPresContext,
// then inform the table that its maximum width needs to be recomputed
((nsTableCellFrame *)aNextFrame)->SetPass1MaxElementSize(kidMaxElementSize);
if (cellMet.mFlags & NS_REFLOW_CALC_MAX_WIDTH) {
// If the cell is not auto-width, then the natural width is the
// desired width. XXX what about Pct width?
PRBool isAutoWidth = eStyleUnit_Auto == kidRS.mStylePosition->mWidth.GetUnit();
if (!isAutoWidth) {
// Reset the natural width to be the desired width
// XXX This isn't the best thing to do, but if we don't then the table
// layout strategy will compute a different maximum content width than we
// computed for the initial reflow. That's because the table layout
// strategy doesn't check whether the cell is auto-width...
cellMet.mMaximumWidth = PR_MIN(cellMet.mMaximumWidth, cellMet.width);
}
((nsTableCellFrame *)aNextFrame)->SetMaximumWidth(cellMet.mMaximumWidth);
if (oldCellMaximumWidth != cellMet.mMaximumWidth) {
aReflowState.tableFrame->InvalidateMaximumWidth();

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

@ -1360,18 +1360,6 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext* aPresContext,
// then inform the table that its maximum width needs to be recomputed
((nsTableCellFrame *)aNextFrame)->SetPass1MaxElementSize(kidMaxElementSize);
if (cellMet.mFlags & NS_REFLOW_CALC_MAX_WIDTH) {
// If the cell is not auto-width, then the natural width is the
// desired width. XXX what about Pct width?
PRBool isAutoWidth = eStyleUnit_Auto == kidRS.mStylePosition->mWidth.GetUnit();
if (!isAutoWidth) {
// Reset the natural width to be the desired width
// XXX This isn't the best thing to do, but if we don't then the table
// layout strategy will compute a different maximum content width than we
// computed for the initial reflow. That's because the table layout
// strategy doesn't check whether the cell is auto-width...
cellMet.mMaximumWidth = PR_MIN(cellMet.mMaximumWidth, cellMet.width);
}
((nsTableCellFrame *)aNextFrame)->SetMaximumWidth(cellMet.mMaximumWidth);
if (oldCellMaximumWidth != cellMet.mMaximumWidth) {
aReflowState.tableFrame->InvalidateMaximumWidth();