зеркало из https://github.com/mozilla/pjs.git
Fix for bug #21703. r=karnaze, a=chofmann
This commit is contained in:
Родитель
adb74c199d
Коммит
b1d37ddf32
|
@ -597,10 +597,12 @@ void nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext* aPresContext,
|
||||||
PRBool hasRowSpanningCell = PR_FALSE;
|
PRBool hasRowSpanningCell = PR_FALSE;
|
||||||
PRInt32 numRows;
|
PRInt32 numRows;
|
||||||
GetRowCount(numRows, PR_FALSE);
|
GetRowCount(numRows, PR_FALSE);
|
||||||
if (numRows <= 0) return;
|
nscoord* rowHeights = nsnull;
|
||||||
nscoord *rowHeights = new nscoord[numRows];
|
if (numRows > 0) {
|
||||||
if (!rowHeights) return;
|
rowHeights = new nscoord[numRows];
|
||||||
nsCRT::memset (rowHeights, 0, numRows*sizeof(nscoord));
|
if (!rowHeights) return;
|
||||||
|
nsCRT::memset (rowHeights, 0, numRows*sizeof(nscoord));
|
||||||
|
}
|
||||||
|
|
||||||
/* Step 1: get the height of the tallest cell in the row and save it for
|
/* Step 1: get the height of the tallest cell in the row and save it for
|
||||||
* pass 2. This height is for table cells that originate in this
|
* pass 2. This height is for table cells that originate in this
|
||||||
|
@ -1538,12 +1540,12 @@ NS_METHOD nsTableRowGroupFrame::IR_TargetIsChild(nsIPresContext* aPresConte
|
||||||
} else {
|
} else {
|
||||||
// Adjust the frames that follow...
|
// Adjust the frames that follow...
|
||||||
AdjustSiblingsAfterReflow(aPresContext, aReflowState, aNextFrame,
|
AdjustSiblingsAfterReflow(aPresContext, aReflowState, aNextFrame,
|
||||||
aDesiredSize.maxElementSize,
|
aDesiredSize.maxElementSize,
|
||||||
desiredSize.height - oldKidRect.height);
|
desiredSize.height - oldKidRect.height);
|
||||||
|
|
||||||
// Now recalculate the row heights
|
// Now recalculate the row heights
|
||||||
CalculateRowHeights(aPresContext, aDesiredSize, aReflowState.reflowState);
|
CalculateRowHeights(aPresContext, aDesiredSize, aReflowState.reflowState);
|
||||||
|
|
||||||
// Because we don't know what changed repaint everything.
|
// Because we don't know what changed repaint everything.
|
||||||
// XXX We should change CalculateRowHeights() to return the bounding
|
// XXX We should change CalculateRowHeights() to return the bounding
|
||||||
// rect of what changed. Or whether anything moved or changed size...
|
// rect of what changed. Or whether anything moved or changed size...
|
||||||
|
|
|
@ -597,10 +597,12 @@ void nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext* aPresContext,
|
||||||
PRBool hasRowSpanningCell = PR_FALSE;
|
PRBool hasRowSpanningCell = PR_FALSE;
|
||||||
PRInt32 numRows;
|
PRInt32 numRows;
|
||||||
GetRowCount(numRows, PR_FALSE);
|
GetRowCount(numRows, PR_FALSE);
|
||||||
if (numRows <= 0) return;
|
nscoord* rowHeights = nsnull;
|
||||||
nscoord *rowHeights = new nscoord[numRows];
|
if (numRows > 0) {
|
||||||
if (!rowHeights) return;
|
rowHeights = new nscoord[numRows];
|
||||||
nsCRT::memset (rowHeights, 0, numRows*sizeof(nscoord));
|
if (!rowHeights) return;
|
||||||
|
nsCRT::memset (rowHeights, 0, numRows*sizeof(nscoord));
|
||||||
|
}
|
||||||
|
|
||||||
/* Step 1: get the height of the tallest cell in the row and save it for
|
/* Step 1: get the height of the tallest cell in the row and save it for
|
||||||
* pass 2. This height is for table cells that originate in this
|
* pass 2. This height is for table cells that originate in this
|
||||||
|
@ -1538,12 +1540,12 @@ NS_METHOD nsTableRowGroupFrame::IR_TargetIsChild(nsIPresContext* aPresConte
|
||||||
} else {
|
} else {
|
||||||
// Adjust the frames that follow...
|
// Adjust the frames that follow...
|
||||||
AdjustSiblingsAfterReflow(aPresContext, aReflowState, aNextFrame,
|
AdjustSiblingsAfterReflow(aPresContext, aReflowState, aNextFrame,
|
||||||
aDesiredSize.maxElementSize,
|
aDesiredSize.maxElementSize,
|
||||||
desiredSize.height - oldKidRect.height);
|
desiredSize.height - oldKidRect.height);
|
||||||
|
|
||||||
// Now recalculate the row heights
|
// Now recalculate the row heights
|
||||||
CalculateRowHeights(aPresContext, aDesiredSize, aReflowState.reflowState);
|
CalculateRowHeights(aPresContext, aDesiredSize, aReflowState.reflowState);
|
||||||
|
|
||||||
// Because we don't know what changed repaint everything.
|
// Because we don't know what changed repaint everything.
|
||||||
// XXX We should change CalculateRowHeights() to return the bounding
|
// XXX We should change CalculateRowHeights() to return the bounding
|
||||||
// rect of what changed. Or whether anything moved or changed size...
|
// rect of what changed. Or whether anything moved or changed size...
|
||||||
|
|
Загрузка…
Ссылка в новой задаче