зеркало из https://github.com/mozilla/pjs.git
Getting rid of all the printfs and complaints that fire in mailnews by making
the fixed table layout algorithm smarter about unconstrained width reflow.
This commit is contained in:
Родитель
07fdb05f24
Коммит
ca9519fb92
|
@ -108,7 +108,7 @@ PRBool FixedTableLayoutStrategy::AssignPreliminaryColumnWidths(nscoord aComputed
|
|||
nscoord* colWidths = new PRBool[mNumCols];
|
||||
nsCRT::memset(colWidths, -1, mNumCols*sizeof(nscoord));
|
||||
|
||||
// for every column, determine it's specified width
|
||||
// for every column, determine its specified width
|
||||
for (colX = 0; colX < mNumCols; colX++) {
|
||||
// Get column information
|
||||
nsTableColFrame* colFrame = mTableFrame->GetColFrame(colX);
|
||||
|
@ -157,6 +157,11 @@ PRBool FixedTableLayoutStrategy::AssignPreliminaryColumnWidths(nscoord aComputed
|
|||
|
||||
nscoord lastColAllocated = -1;
|
||||
nscoord remainingWidth = availWidth - totalColWidth;
|
||||
if (CRAZY_WIDTH(remainingWidth)) {
|
||||
// let's put a cap on the width so that it doesn't become insane.
|
||||
remainingWidth = 100;
|
||||
}
|
||||
|
||||
if (tableIsFixedWidth && (0 < remainingWidth)) {
|
||||
if (mNumCols > specifiedCols) {
|
||||
// allocate the extra space to the columns which have no width specified
|
||||
|
|
|
@ -108,7 +108,7 @@ PRBool FixedTableLayoutStrategy::AssignPreliminaryColumnWidths(nscoord aComputed
|
|||
nscoord* colWidths = new PRBool[mNumCols];
|
||||
nsCRT::memset(colWidths, -1, mNumCols*sizeof(nscoord));
|
||||
|
||||
// for every column, determine it's specified width
|
||||
// for every column, determine its specified width
|
||||
for (colX = 0; colX < mNumCols; colX++) {
|
||||
// Get column information
|
||||
nsTableColFrame* colFrame = mTableFrame->GetColFrame(colX);
|
||||
|
@ -157,6 +157,11 @@ PRBool FixedTableLayoutStrategy::AssignPreliminaryColumnWidths(nscoord aComputed
|
|||
|
||||
nscoord lastColAllocated = -1;
|
||||
nscoord remainingWidth = availWidth - totalColWidth;
|
||||
if (CRAZY_WIDTH(remainingWidth)) {
|
||||
// let's put a cap on the width so that it doesn't become insane.
|
||||
remainingWidth = 100;
|
||||
}
|
||||
|
||||
if (tableIsFixedWidth && (0 < remainingWidth)) {
|
||||
if (mNumCols > specifiedCols) {
|
||||
// allocate the extra space to the columns which have no width specified
|
||||
|
|
Загрузка…
Ссылка в новой задаче